/* ===== CSS Variables ===== */
:root,
[data-theme="dark"] {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-color: rgba(55, 65, 81, 0.5);
  --border-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --green-border: rgba(34, 197, 94, 0.3);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --red-border: rgba(239, 68, 68, 0.3);
  --yellow: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(226, 232, 240, 0.8);
  --border-glow: rgba(59, 130, 246, 0.2);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-cyan: #0891b2;
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.08);
  --green-border: rgba(22, 163, 74, 0.2);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.08);
  --red-border: rgba(220, 38, 38, 0.2);
  --yellow: #d97706;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ===== Background Pattern ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.logo-icon {
  color: var(--accent-blue);
  width: 1.75rem;
  height: 1.75rem;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px var(--border-glow);
  transform: scale(1.05);
}

.theme-icon {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  transition: all 0.4s ease;
  color: var(--text-secondary);
}

[data-theme="dark"] .dark-icon { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .light-icon { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .dark-icon { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .light-icon { opacity: 1; transform: rotate(0); }

/* ===== Main Layout ===== */
.main {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* ===== Market Summary Bar ===== */
.market-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.market-summary::-webkit-scrollbar { display: none; }

.summary-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 160px;
  transition: all 0.2s ease;
}

.summary-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

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

.summary-value {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.summary-change {
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.news-section {
  grid-column: 1 / -1;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--glass-bg);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.crypto-icon { color: #f59e0b; }
.stock-icon { color: var(--accent-blue); }
.news-icon { color: var(--accent-purple); }

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-body {
  padding: 1rem;
}

/* ===== Crypto Grid ===== */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.crypto-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: default;
}

.crypto-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.crypto-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crypto-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.crypto-symbol {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.crypto-price {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.crypto-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.15rem;
}

.crypto-change {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.crypto-volume {
  font-size: 0.7rem;
  color: var(--text-muted);
}

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

.negative {
  color: var(--red);
}

.positive-bg {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.negative-bg {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

/* ===== Stocks Grid ===== */
.stocks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.stock-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.stock-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stock-info {
  display: flex;
  flex-direction: column;
}

.stock-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.stock-symbol {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stock-market-state {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.market-open {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.market-closed {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.stock-price {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stock-change {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ===== News Section ===== */
.news-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.filter-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.news-list::-webkit-scrollbar {
  width: 4px;
}

.news-list::-webkit-scrollbar-track {
  background: transparent;
}

.news-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.news-item {
  display: flex;
  gap: 1rem;
  padding: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.news-item:hover {
  border-color: var(--accent-blue);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.news-time {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  gap: 0.15rem;
}

.news-date {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-hour {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-blue);
}

.news-content {
  flex: 1;
  min-width: 0;
}

.news-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.news-source {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.news-category {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.news-link-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.2s;
}

.news-item:hover .news-link-icon {
  color: var(--accent-blue);
}

.news-link-icon svg {
  width: 1rem;
  height: 1rem;
}

/* ===== Loading State ===== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Error State ===== */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.error-state .error-icon {
  color: var(--red);
  width: 2rem;
  height: 2rem;
}

.retry-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* ===== Price Flash Animation ===== */
.flash-green {
  animation: flashGreen 0.6s ease;
}

.flash-red {
  animation: flashRed 0.6s ease;
}

@keyframes flashGreen {
  0% { background: var(--green-bg); }
  100% { background: transparent; }
}

@keyframes flashRed {
  0% { background: var(--red-bg); }
  100% { background: transparent; }
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */

/* ===== Legal Modal ===== */
.legal-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.legal-modal-overlay.active { display: flex; }
.legal-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.legal-modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.legal-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.legal-modal-tabs, .legal-tabs {
  display: flex;
  gap: 0.5rem;
}
.legal-tab, .legal-tab-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.legal-tab:hover, .legal-tab-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.legal-tab.active, .legal-tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}
.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}
.legal-content, .legal-rendered {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.legal-content p, .legal-rendered p {
  margin-bottom: 0.75rem;
}
.legal-content ol, .legal-rendered ol,
.legal-content ul, .legal-rendered ul {
  margin: 0.5rem 0 0.75rem 1.5rem;
}
.legal-content li, .legal-rendered li {
  margin-bottom: 0.5rem;
}
.legal-content strong, .legal-rendered strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-content hr, .legal-rendered hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}
.legal-modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}
.legal-accept-btn {
  padding: 0.6rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.legal-accept-btn:hover { opacity: 0.9; transform: scale(1.02); }
.legal-section { margin-top: 1.5rem; }
.legal-rendered {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.legal-rendered::-webkit-scrollbar { width: 4px; }
.legal-rendered::-webkit-scrollbar-track { background: transparent; }
.legal-rendered::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .header {
    padding: 0.75rem 1rem;
  }
  .main {
    padding: 1rem;
  }
  .subtitle {
    display: none;
  }
}

@media (max-width: 640px) {
  .crypto-grid,
  .stocks-grid {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .market-summary {
    gap: 0.5rem;
  }
  .summary-item {
    min-width: 130px;
    padding: 0.5rem 0.75rem;
  }
}

/* ===== Scrollbar Global ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== News count badge ===== */
.news-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* ===== Entrance Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.1); }
  50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.25); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--border-color); }
  50% { border-color: var(--accent-blue); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes textShimmer {
  0% { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}

/* Header entrance */
.header {
  animation: slideDown 0.5s ease-out;
}

/* Main content stagger */
.main {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Market summary items stagger */
.summary-item {
  animation: fadeInUp 0.4s ease-out both;
}
.summary-item:nth-child(1) { animation-delay: 0.15s; }
.summary-item:nth-child(2) { animation-delay: 0.25s; }
.summary-item:nth-child(3) { animation-delay: 0.35s; }
.summary-item:nth-child(4) { animation-delay: 0.45s; }
.summary-item:nth-child(5) { animation-delay: 0.55s; }

/* Cards entrance stagger */
.dashboard-grid .card:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.2s both; }
.dashboard-grid .card:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.35s both; }
.dashboard-grid .card:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.5s both; }

/* Enhanced card hover */
.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08), var(--shadow-md);
  transform: translateY(-2px);
}

/* Crypto card stagger entrance */
.crypto-card {
  animation: fadeInScale 0.35s ease-out both;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.crypto-card:nth-child(1) { animation-delay: 0.05s; }
.crypto-card:nth-child(2) { animation-delay: 0.1s; }
.crypto-card:nth-child(3) { animation-delay: 0.15s; }
.crypto-card:nth-child(4) { animation-delay: 0.2s; }
.crypto-card:nth-child(5) { animation-delay: 0.25s; }
.crypto-card:nth-child(6) { animation-delay: 0.3s; }
.crypto-card:nth-child(7) { animation-delay: 0.35s; }
.crypto-card:nth-child(8) { animation-delay: 0.4s; }
.crypto-card:nth-child(9) { animation-delay: 0.45s; }
.crypto-card:nth-child(10) { animation-delay: 0.5s; }

.crypto-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12), var(--shadow-md);
}

.crypto-card:hover .crypto-price {
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* News item stagger entrance */
.news-item {
  animation: fadeInLeft 0.35s ease-out both;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:nth-child(4) { animation-delay: 0.2s; }
.news-item:nth-child(5) { animation-delay: 0.25s; }
.news-item:nth-child(6) { animation-delay: 0.3s; }
.news-item:nth-child(7) { animation-delay: 0.35s; }
.news-item:nth-child(8) { animation-delay: 0.4s; }
.news-item:nth-child(9) { animation-delay: 0.45s; }
.news-item:nth-child(10) { animation-delay: 0.5s; }

.news-item:hover {
  border-color: var(--accent-blue);
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08), var(--shadow-sm);
}

/* Logo floating icon */
.logo-icon {
  animation: float 3s ease-in-out infinite;
}

/* Filter button press effect */
.filter-btn:active {
  transform: scale(0.95);
}

/* Badge shimmer */
.badge {
  position: relative;
  overflow: hidden;
}
.badge::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* Status indicator glow */
.status-indicator {
  box-shadow: 0 0 6px var(--green);
}

/* Theme toggle active state */
.theme-toggle:active {
  transform: scale(0.9);
}

/* Legal modal entrance */
.legal-modal-overlay.active .legal-modal {
  animation: fadeInScale 0.35s ease-out;
}

/* Legal accept button glow */
.legal-accept-btn {
  position: relative;
  overflow: hidden;
}
.legal-accept-btn::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.1), transparent 30%);
  animation: spin 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}
.legal-accept-btn:hover::before {
  opacity: 1;
}
.legal-accept-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.legal-accept-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

/* Retry button pulse */
.retry-btn {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Footer entrance */
.footer {
  animation: fadeInUp 0.5s ease-out 0.6s both;
}

/* Price update number pop */
.crypto-price {
  transition: all 0.3s ease;
}

/* Loading spinner enhanced */
.spinner {
  border-width: 3px;
  border-style: solid;
  border-color: var(--border-color);
  border-top-color: var(--accent-blue);
  border-right-color: var(--accent-purple);
}

/* Smooth page background transition */
body {
  transition: background 0.5s ease, color 0.3s ease;
}
