/* Track Record Page Styles */

/* Hero Stats - Single centered card */
.track-record-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4aa, #00b894);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Best Period Highlight */
.hero-stat-card.best-period {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(0, 184, 148, 0.1));
  border: 2px solid rgba(0, 212, 170, 0.5);
  position: relative;
  padding: 0.875rem 2rem;
}

.hero-stat-card.best-period .hero-stat-value {
  font-size: 2rem;
}

.best-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #00d4aa, #00b894);
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-stat-period {
  font-size: 0.7rem;
  color: rgba(0, 212, 170, 0.9);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Track Record Section */
.track-record-section {
  padding: 4rem 0;
  background: var(--bg-primary, #0f0f23);
}

/* Table Wrapper */
.track-record-table-wrapper {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2rem;
}

/* Table Styles */
.track-record-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}

.track-record-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.track-record-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.track-record-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.track-record-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

/* Row States */
.prediction-hit {
  background: rgba(0, 212, 170, 0.03);
}

.prediction-miss {
  background: rgba(255, 107, 107, 0.03);
}

/* Cell Styles */
.date-cell {
  white-space: nowrap;
}

.date-value {
  font-weight: 500;
  display: block;
}

.market-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.market-badge.us {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.market-badge.europe {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.stock-cell {
  min-width: 150px;
}

.stock-symbol {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  color: #fff;
}

.stock-name {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-top: 0.15rem;
}

/* Direction Arrows */
.direction-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0.5rem;
  font-size: 0.75rem;
}

.direction-arrow.up {
  background: rgba(0, 212, 170, 0.2);
  color: #00d4aa;
}

.direction-arrow.down {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.price-value {
  font-weight: 500;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

/* Accuracy Badge */
.accuracy-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.accuracy-badge.excellent {
  background: rgba(0, 212, 170, 0.2);
  color: #00d4aa;
}

.accuracy-badge.good {
  background: rgba(250, 204, 21, 0.2);
  color: #fbbf24;
}

.accuracy-badge.fair {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.accuracy-badge.miss-diff {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.hit {
  background: rgba(0, 212, 170, 0.15);
  color: #00d4aa;
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.status-badge.miss {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Meta */
.track-record-meta {
  margin-top: 1.5rem;
  text-align: center;
}

.last-updated {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.last-updated i {
  margin-right: 0.5rem;
}

/* Methodology Section */
.methodology-section {
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.methodology-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.methodology-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 184, 148, 0.2));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: #00d4aa;
}

.methodology-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}

.methodology-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* Disclaimer Section */
.disclaimer-section {
  padding: 3rem 0;
}

.disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: rgba(250, 204, 21, 0.05);
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 12px;
  padding: 1.5rem 2rem;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(250, 204, 21, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-size: 1.1rem;
}

.disclaimer-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

.disclaimer-content p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

/* ================================================
   TRACK RECORD PREVIEW (Landing Page Section)
   ================================================ */

.track-record-preview-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.02) 0%, transparent 100%);
}

.track-record-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.track-record-preview-header .section-header {
  flex: 1;
  min-width: 300px;
}

/* Accuracy Highlight */
.accuracy-highlight {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 184, 148, 0.05));
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 16px;
  padding: 1.5rem 2.5rem;
  text-align: center;
  flex-shrink: 0;
}

.accuracy-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00d4aa, #00b894);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.accuracy-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #00d4aa;
  margin-top: 0.25rem;
}

.accuracy-period {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

/* Preview Table */
.track-record-preview-table {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.preview-table-header {
  display: grid;
  grid-template-columns: 100px 120px 1fr 1fr 120px;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-table-row {
  display: grid;
  grid-template-columns: 100px 120px 1fr 1fr 120px;
  padding: 1rem 1.5rem;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.preview-table-row:last-child {
  border-bottom: none;
}

.preview-table-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.preview-table-row.row-hit {
  background: rgba(0, 212, 170, 0.02);
}

.preview-table-row.row-miss {
  background: rgba(255, 107, 107, 0.02);
}

.date-text {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.col-stock {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.col-stock .stock-symbol {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  display: block;
}

.col-stock .stock-name {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.direction-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 0.5rem;
  font-size: 0.7rem;
}

.direction-indicator.up {
  background: rgba(0, 212, 170, 0.2);
  color: #00d4aa;
}

.direction-indicator.down {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.hit {
  background: rgba(0, 212, 170, 0.15);
  color: #00d4aa;
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.status-pill.miss {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Preview Footer */
.track-record-preview-footer {
  margin-top: 2rem;
  text-align: center;
}

.btn-track-record {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  background: transparent;
  border: 2px solid rgba(0, 212, 170, 0.5);
  border-radius: 12px;
  color: #00d4aa;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-track-record:hover {
  background: rgba(0, 212, 170, 0.1);
  border-color: #00d4aa;
  transform: translateY(-2px);
}

.track-record-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.track-record-note i {
  margin-right: 0.5rem;
  color: #00d4aa;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .hero-stat-card {
    padding: 0.75rem 1.5rem;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-stat-card.best-period .hero-stat-value {
    font-size: 1.75rem;
  }

  .hero-stat-label {
    font-size: 0.65rem;
  }

  .hero-stat-period {
    font-size: 0.65rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-stat-card {
    padding: 0.625rem 1.25rem;
  }

  .hero-stat-value {
    font-size: 1.35rem;
  }

  .hero-stat-card.best-period {
    padding: 0.625rem 1.5rem;
  }

  .hero-stat-card.best-period .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-stat-label {
    font-size: 0.6rem;
  }

  .hero-stat-period {
    font-size: 0.6rem;
  }

  .track-record-table-wrapper {
    overflow-x: auto;
  }

  .track-record-table {
    min-width: 700px;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .disclaimer-box {
    flex-direction: column;
    text-align: center;
  }

  .disclaimer-icon {
    margin: 0 auto;
  }

  /* Preview section mobile */
  .track-record-preview-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .track-record-preview-header .section-header {
    text-align: center;
  }

  .preview-table-header,
  .preview-table-row {
    grid-template-columns: 70px 80px 1fr 1fr 80px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  .preview-table-header {
    font-size: 0.65rem;
  }

  .stock-symbol {
    font-size: 0.85rem;
  }

  .direction-indicator {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    margin-right: 0.25rem;
  }

  .status-pill {
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
  }
}

/* Day Pagination Styles */
.day-pagination-header,
.day-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.day-pagination-footer {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.current-day-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.day-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.page-indicator {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.pagination-summary {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.day-navigation {
  display: flex;
  gap: 0.75rem;
}

.day-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.day-nav-btn:hover {
  background: rgba(0, 212, 170, 0.15);
  border-color: rgba(0, 212, 170, 0.4);
  color: #00d4aa;
}

.day-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.market-cell {
  text-align: center;
}

.no-data-cell {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* Mobile Day Pagination */
@media (max-width: 768px) {
  .day-pagination-header,
  .day-pagination-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .current-day-info {
    align-items: center;
  }

  .day-label {
    font-size: 1.1rem;
  }

  .day-nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* ================================================
   LIGHT MODE OVERRIDES
   ================================================ */

[data-theme="light"] {
  /* Hero stat card */
  .hero-stat-card {
    background: var(--bg-card-solid);
    border-color: var(--border-color);
  }

  .hero-stat-label {
    color: var(--text-muted);
  }

  /* Best period card */
  .hero-stat-card.best-period {
    background: linear-gradient(135deg, rgba(0, 160, 128, 0.08), rgba(0, 160, 128, 0.04));
    border-color: rgba(0, 160, 128, 0.4);
  }

  .hero-stat-period {
    color: var(--accent-primary);
  }

  /* Table wrapper */
  .track-record-table-wrapper {
    background: var(--bg-card-solid);
    border-color: var(--border-color);
  }

  /* Table */
  .track-record-table {
    color: var(--text-primary);
  }

  .track-record-table thead {
    background: var(--bg-input);
  }

  .track-record-table th {
    color: var(--text-muted);
    border-bottom-color: var(--border-color);
  }

  .track-record-table td {
    border-bottom-color: var(--border-color);
  }

  .track-record-table tbody tr:hover {
    background: var(--bg-input);
  }

  /* Stock cell text */
  .stock-symbol {
    color: var(--text-primary);
  }

  .stock-name {
    color: var(--text-muted);
  }

  .col-stock .stock-symbol {
    color: var(--text-primary);
  }

  .col-stock .stock-name {
    color: var(--text-muted);
  }

  /* Accuracy badge — "miss" state needs a visible contrast on light bg */
  .accuracy-badge.miss-diff {
    background: var(--bg-input);
    color: var(--text-muted);
  }

  /* Meta */
  .last-updated {
    color: var(--text-muted);
  }

  /* Methodology section */
  .methodology-section {
    background: var(--bg-input);
  }

  .methodology-card {
    background: var(--bg-card-solid);
    border-color: var(--border-color);
  }

  .methodology-card h3 {
    color: var(--text-primary);
  }

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

  /* Disclaimer */
  .disclaimer-content p {
    color: var(--text-secondary);
  }

  /* Preview table */
  .track-record-preview-table {
    background: var(--bg-card-solid);
    border-color: var(--border-color);
  }

  .preview-table-header {
    background: var(--bg-input);
    color: var(--text-muted);
    border-bottom-color: var(--border-color);
  }

  .preview-table-row {
    border-bottom-color: var(--border-color);
  }

  .preview-table-row:hover {
    background: var(--bg-input);
  }

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

  /* Track record note */
  .track-record-note {
    color: var(--text-muted);
  }

  /* Day pagination */
  .day-pagination-header,
  .day-pagination-footer {
    background: var(--bg-card-solid);
    border-color: var(--border-color);
  }

  .day-label {
    color: var(--text-primary);
  }

  .page-indicator {
    color: var(--text-muted);
  }

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

  .day-nav-btn {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
  }

  .day-nav-btn:hover {
    background: rgba(0, 160, 128, 0.1);
    border-color: rgba(0, 160, 128, 0.4);
    color: var(--accent-primary);
  }

  /* No data cell */
  .no-data-cell {
    color: var(--text-muted);
  }

  /* Accuracy period label */
  .accuracy-period {
    color: var(--text-muted);
  }
}

