:root {
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-hover: #eef2f7;
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --secondary: #7c3aed;
  --accent: #f97316;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--background);
  color: var(--text-primary);
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user {
  color: var(--text-secondary);
  font-weight: 600;
}

main {
  display: block;
}

.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0 5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f0f4ff 45%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.layout {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  width: 100%;
}

.backgroundEffects {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.gridPattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 42%, transparent 80%);
}

.glowPrimary {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.glowSecondary {
  position: absolute;
  bottom: -10%;
  right: 20%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out reverse;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1100px;
  width: 100%;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
  padding: 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  animation: fadeInDown 0.8s ease-out;
}

.badgeDot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 0.75rem;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2s infinite;
}

.badgeText {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.metaRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.pillGroup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  padding: 0;
  animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.statRow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

.statCard {
  padding: 1rem 1.25rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  text-align: left;
}

.statValue {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.statLabel {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.positive {
  color: var(--success);
}

.previewPanel {
  width: 100%;
  margin-top: 2rem;
  text-align: left;
  background: #f7f9ff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.previewHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.previewLabel {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.previewSub {
  color: var(--text-secondary);
}

.previewTag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 10px 24px var(--primary-glow);
}

.previewGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.previewItem {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.previewTitle {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.previewMeta {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.previewDelta {
  margin-top: 0.35rem;
  color: var(--primary);
  font-weight: 700;
}

.section {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
}

.volume-header {
  margin-bottom: 3rem;
  text-align: center;
}

.heading {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #0f172a, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subheading {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-hover);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.icon {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.card:hover .icon {
  color: var(--primary);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: auto;
  color: var(--text-primary);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.value {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.progressContainer {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progressBar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.filterContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.searchBar {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}

.searchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
  padding: 0.5rem 0.25rem;
}

.searchInput::placeholder {
  color: var(--text-muted);
}

.clearButton,
.searchButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.clearButton:hover,
.searchButton:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.clearButton {
  background: transparent;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 2rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  flex-wrap: wrap;
}

.segmentBtn {
  padding: 0.5rem 1.5rem;
  border-radius: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.segmentBtn:hover {
  color: var(--text-primary);
}

.active {
  background: var(--surface-hover);
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border);
}

.tableContainer {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--surface);
}

.table th {
  padding: 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.sortButton {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.sortButton:hover {
  color: var(--text-primary);
}

.sortActive {
  color: var(--primary);
}

.table td {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  background: var(--surface);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--surface-hover);
}

.titleCell {
  max-width: 400px;
}

.titleLink {
  color: inherit;
  text-decoration: none;
  display: block;
  transition: all var(--transition-fast);
}

.titleLink:hover .marketTitle {
  color: var(--primary);
}

.marketTitle {
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color var(--transition-fast);
}

.marketSubtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.price {
  font-weight: 700;
  color: var(--success);
}

.noPrice {
  font-weight: 700;
  color: var(--danger);
}

.priceCell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.trendUp {
  color: var(--success);
}

.trendDown {
  color: var(--danger);
}

.delta {
  font-variant-numeric: tabular-nums;
}

.loadingState {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  color: var(--primary);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.pageButton {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pageButton:hover:enabled {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pageButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pageButton.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.pageIndicator {
  color: var(--text-muted);
  font-weight: 500;
}

.dateFilterContainer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dateSelect {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f2ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.dateSelect:hover {
  color: var(--primary);
}

.dateSelect option {
  background: #fff;
  color: var(--text-primary);
  padding: 0.5rem;
}

.marketMeta {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detailsPage {
  padding: 2.5rem 0 4rem;
}

.backLink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1.25rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.backLink:hover {
  color: var(--primary);
  transform: translateX(-2px);
}

.detailsHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  background: var(--surface);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 1.75rem;
}

.detailsTitle {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.detailsSubtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.eyebrow {
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.pillRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.statusPill, .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.statusPill.muted {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
}

.statusPill.outline, .pill.outline {
  background: transparent;
  border: 1px solid var(--border);
}

.pill.success {
  background: rgba(16, 185, 129, 0.12);
  color: #0f9f6e;
}

.pill.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.priceSummary {
  min-width: 220px;
  display: grid;
  gap: 0.65rem;
}

.summaryLine {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 700;
}

.summaryLine .label {
  color: var(--text-muted);
  font-weight: 600;
}

.summaryLine .value {
  color: var(--text-primary);
  font-size: 1.05rem;
}

.priceGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.priceCard {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.yesCard {
  border-color: rgba(16, 185, 129, 0.25);
}

.noCard {
  border-color: rgba(220, 38, 38, 0.25);
}

.neutralCard {
  border-color: rgba(37, 99, 235, 0.2);
}

.cardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.priceValue {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.bookRow {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.deltaBadge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.trendUp {
  background: rgba(16, 185, 129, 0.14);
  color: #0f9f6e;
}

.trendDown {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.detailsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.statCard {
  background: var(--surface);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

.statCard h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.statValue {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.statSub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detailPanels {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.2rem 1.4rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.panel h3 {
  margin-bottom: 0.75rem;
}

.timelineCard dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem 1.2rem;
}

.timelineCard dt {
  font-weight: 700;
  color: var(--text-secondary);
}

.timelineCard dd {
  margin: 0.2rem 0 0;
  color: var(--text-primary);
}

.orderbookCard table {
  width: 100%;
  border-collapse: collapse;
}

.orderbookCard th, .orderbookCard td {
  text-align: left;
  padding: 0.5rem 0.25rem;
}

.orderbookCard thead {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.orderbookCard tbody tr + tr {
  border-top: 1px solid var(--border);
}

.emptyState {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
}

.emptyState h1 {
  margin-bottom: 0.5rem;
}

.emptyState p {
  color: var(--text-secondary);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(20px, 20px); }
  50% { transform: translate(-10px, 40px); }
  75% { transform: translate(-30px, 10px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .layout { align-items: center; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { padding: 4rem 0; min-height: auto; }
  .title { font-size: 2.5rem; }
  .content { gap: 1.5rem; padding: 2rem; }
  .statRow { grid-template-columns: 1fr; }
  .previewHeader { flex-direction: column; align-items: flex-start; }
  .actions { flex-direction: column; width: 100%; max-width: 300px; align-items: center; }
  .actions button { width: 100%; }
  .controls { justify-content: center; }
  .searchBar { flex-direction: column; align-items: stretch; }
  .clearButton, .searchButton { width: 100%; justify-content: center; }
  .detailsHeader { flex-direction: column; }
  .priceSummary { width: 100%; }
  .bookRow { flex-direction: column; align-items: flex-start; }
  .detailPanels { grid-template-columns: 1fr; }
}

.login-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f0f4ff 45%, #f8fafc 100%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
  text-align: center;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  background: linear-gradient(to right, #0f172a, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.login-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  min-height: 2.5rem;
}

.login-status.success {
  background: rgba(16, 185, 129, 0.12);
  color: #0f9f6e;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.login-status.error {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-google:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .login-card {
    padding: 2rem;
  }

  .login-title {
    font-size: 1.75rem;
  }
}

/* Account Dropdown */
.account-dropdown {
  position: relative;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
}

.account-btn svg {
  width: 16px;
  height: 16px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 1000;
}

.account-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.account-username-item {
  font-weight: 600;
  color: var(--text-primary);
  cursor: default;
  border-bottom: 1px solid var(--border);
}

.account-username-item:hover {
  background: transparent !important;
}

.account-menu-item {
  padding: 0.75rem 1.25rem;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.account-menu-item:not(.account-logout-btn):hover {
  background: var(--surface-hover);
}

.account-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.account-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--danger);
  cursor: pointer;
  text-align: left;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.account-logout-btn:hover {
  background: rgba(220, 38, 38, 0.05);
}

.account-logout-btn svg {
  width: 16px;
  height: 16px;
}

/* Username Form */
.username-form {
  width: 100%;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.username-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.username-prefix {
  position: absolute;
  left: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  display: none;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.1);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

/* Account page */
.page-section {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.account-card h2 {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
}

.account-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px dashed var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}

.account-detail-row:last-child {
  border-bottom: none;
}

.account-detail-row .label {
  color: var(--text-muted);
}

.account-detail-row .value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  margin-left: 1rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #0f9f6e;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-error {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.account-form .form-group {
  text-align: left;
}

.account-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
