/* Modern Professional Design for Predict-A-Coin */

/* CSS Variables for consistent theming */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --dark-card: #1e293b;
  --dark-lighter: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Top Navigation */
.top-nav {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px var(--shadow);
}

.top-nav > div {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-nav .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.top-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 14px;
}

.top-nav a:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
}

.top-nav .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.top-nav .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.4);
}

.top-nav .btn-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

/* Header */
header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}

header h1 {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

/* Filters */
header label {
  display: inline-block;
  margin: 0 12px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

header input[type="number"] {
  background: var(--dark-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  width: 120px;
  font-size: 14px;
  margin-left: 8px;
  transition: all 0.2s;
}

header input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#last-updated {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Main Content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

section {
  margin-bottom: 48px;
}

section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Card Grid */
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  height: 100%;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 25px -5px var(--shadow), 0 10px 10px -5px var(--shadow);
}

.card h2 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-align: center;
}

.coin-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 6px auto 8px;
  display: block;
  box-shadow: 0 4px 6px -1px var(--shadow);
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  text-align: center;
}

.card p {
  color: var(--text-secondary);
  margin: 4px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card p:first-of-type {
  margin-top: 8px;
}

/* Badges and Indicators */
.ai-sentiment {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  margin: 6px auto;
  text-align: center;
  min-height: 28px;
  height: 28px;
  white-space: nowrap;
  width: fit-content;
  max-width: 95%;
  letter-spacing: -0.3px;
}

.market-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  color: var(--secondary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 auto 8px;
  text-align: center;
  min-height: 28px;
  height: 28px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-blue {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.badge-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  color: white;
}

/* Price Changes */
.price-change {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.positive {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.negative {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.positive::before {
  content: '↗ ';
}

.negative::before {
  content: '↘ ';
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px var(--shadow);
}

#modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
}

#modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

#modal-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
  box-shadow: 0 8px 16px -4px var(--shadow);
}

.modal-content h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.modal-content p {
  color: var(--text-secondary);
  margin: 12px 0;
  font-size: 15px;
}

#modal-chart {
  margin-top: 24px;
  height: 300px;
}

/* Leaderboard */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--dark-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.leaderboard-table thead {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.leaderboard-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.leaderboard-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.leaderboard-table tbody tr {
  transition: background 0.2s;
}

.leaderboard-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

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

.leaderboard-table td strong {
  color: var(--text-primary);
}

/* FAQ Section */
.faq-section {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px;
}

.faq-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

details {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

details:hover {
  border-color: var(--primary);
}

details[open] {
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px var(--shadow);
}

summary {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

details code {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}

/* Loading States */
.loading-container {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-container p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Cache Warning */
.cache-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
  padding: 12px 20px;
  margin: 16px 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.cache-warning::before {
  content: '⏰';
  font-size: 20px;
}

/* Error Message */
.error-message {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 20px;
  margin: 20px 0;
  border-radius: 12px;
  text-align: center;
}

.error-message h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 36px;
  }
  
  .card-row {
    grid-template-columns: 1fr;
  }
  
  header label {
    display: block;
    margin: 12px 0;
  }
  
  header input[type="number"] {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
  
  .top-nav .nav-links {
    flex-wrap: wrap;
  }
  
  .leaderboard-table {
    font-size: 12px;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 8px;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: white;
}
/* Disclaimer Banner */
.disclaimer-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 1400px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.disclaimer-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.disclaimer-content {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

.disclaimer-content strong {
  color: #f59e0b;
}

/* Preview Mode Overlay */
.preview-card {
  position: relative;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
  pointer-events: none;
}

.preview-card:hover .preview-overlay,
.leaderboard-table:hover + .preview-overlay,
div:has(> .leaderboard-table):hover .preview-overlay {
  opacity: 1;
}

.preview-lock {
  font-size: 48px;
  margin-bottom: 6px;
  animation: pulse 2s ease-in-out infinite;
}

.preview-text {
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  padding: 0 20px;
}

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

/* ===== Custom SVG Icon Styles ===== */
.header-icon, .section-icon {
  vertical-align: middle;
  margin-right: 8px;
  color: #00D4FF;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

.header-icon {
  color: #FF3366;
  filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.6));
  animation: pulse-glow 2s ease-in-out infinite;
}

.section-icon {
  transition: transform 0.3s ease, filter 0.3s ease;
}


.disclaimer-icon svg {
  color: #FF3366;
  animation: alert-pulse 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.9));
  }
}

@keyframes alert-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Icon color variants */
.icon-success {
  color: #00FF88;
}

.icon-warning {
  color: #FFD700;
}

.icon-danger {
  color: #FF3366;
}

.icon-primary {
  color: #00D4FF;
}

/* ===== Main Site Logo Styles ===== */
.site-logo {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease, filter 0.3s ease;

.site-logo svg {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}


/* FAQ Icon Styles */
.faq-icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
}

.faq-item:hover .faq-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.6));
}

.faq-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.faq-header:hover {
    background: rgba(0, 212, 255, 0.1);
    border-left: 4px solid #00D4FF;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.faq-item.active .faq-content {
    max-height: 500px;
    padding: 20px;
}

.toggle-icon {
    margin-left: auto;
    font-size: 24px;
    transition: transform 0.3s ease;
    color: #00D4FF;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}


/* ===== Header Logotype Styles ===== */
.header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.header-logo svg {
  width: 600px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 30px rgba(0, 212, 255, 0.5));
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .header-logo svg {
    width: 300px;
  }
}

/* ===== Market Regime Badge Styles ===== */
.market-regime-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.market-regime-badge svg {
  flex-shrink: 0;
}

.regime-markup {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid #00FF88;
  color: #00FF88;
}

.regime-markdown {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid #FF3366;
  color: #FF3366;
}

.regime-accumulation {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid #00D4FF;
  color: #00D4FF;
}

.regime-neutral {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid #FFD700;
  color: #FFD700;
}

/* Regime badge in header */
#last-updated .market-regime-badge {
  vertical-align: middle;
  margin-left: 8px;
}
