/* Investment Basics - GenZ Modern Design */
:root {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f0f5;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --accent-primary: #6c5ce7;
  --accent-secondary: #a29bfe;
  --accent-tertiary: #fd79a8;
  --accent-green: #00b894;
  --accent-red: #ff6b6b;
  --accent-orange: #fdcb6e;
  --accent-blue: #74b9ff;
  --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --border-color: #e0e0e8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --nav-bg: rgba(255,255,255,0.85);
  --glass-bg: rgba(255,255,255,0.7);
}

[data-theme="dark"] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a28;
  --bg-card: #16161f;
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c0;
  --text-muted: #6a6a80;
  --accent-primary: #a29bfe;
  --accent-secondary: #6c5ce7;
  --border-color: #2a2a3a;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --nav-bg: rgba(18,18,26,0.9);
  --glass-bg: rgba(22,22,31,0.8);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--accent-primary); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--accent-secondary); }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem; transition: all 0.3s;
}
.navbar.scrolled { padding: 0.75rem 2rem; box-shadow: var(--shadow-md); }
.nav-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-logo {
  font-size: 1.5rem; font-weight: 800;
  background: var(--gradient-primary); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo svg {
  width: 28px !important; height: 28px !important; max-width: 28px !important; max-height: 28px !important;
  flex-shrink: 0;
  stroke: var(--accent-primary);
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-secondary); font-weight: 500; padding: 0.5rem 0; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gradient-primary); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

.theme-toggle {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 50px; padding: 0.5rem; cursor: pointer;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.theme-toggle:hover { background: var(--accent-primary); border-color: var(--accent-primary); }
.theme-toggle:hover svg { stroke: white; }
.theme-toggle svg { width: 20px; height: 20px; stroke: var(--text-primary); }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: all 0.3s; }

.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 8rem 2rem 4rem; position: relative; overflow: hidden;
}
.hero::before { content: ''; position: absolute; inset: 0; background: var(--gradient-hero); opacity: 0.05; }
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; }
.hero-bg-shapes .shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.4; animation: float 20s infinite ease-in-out; }
.shape-1 { width: 400px; height: 400px; background: var(--accent-primary); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: var(--accent-tertiary); bottom: -50px; left: -50px; animation-delay: -5s; }
.shape-3 { width: 200px; height: 200px; background: var(--accent-green); top: 50%; left: 30%; animation-delay: -10s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10px, 20px) scale(0.95); } }

.hero-content { max-width: 900px; text-align: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--glass-bg); backdrop-filter: blur(10px);
  padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.875rem;
  color: var(--accent-primary); margin-bottom: 1.5rem; font-weight: 600;
}
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-description { font-size: 1.25rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem 2rem; border-radius: 12px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all 0.3s; border: none;
}
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-md), 0 0 20px rgba(108, 92, 231, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 30px rgba(108, 92, 231, 0.4); color: white; }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-tertiary); border-color: var(--accent-primary); color: var(--accent-primary); }

.ticker-section { background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); overflow: hidden; padding: 1rem 0; }
.ticker-wrapper { display: flex; animation: ticker 40s linear infinite; }
.ticker-item { display: flex; align-items: center; gap: 1rem; padding: 0 2rem; white-space: nowrap; }
.ticker-item .symbol { font-weight: 700; color: var(--text-primary); }
.ticker-item .change { font-size: 0.875rem; padding: 0.25rem 0.5rem; border-radius: 4px; }
.ticker-item .change.positive { color: var(--accent-green); background: rgba(0, 184, 148, 0.1); }
.ticker-item .change.negative { color: var(--accent-red); background: rgba(255, 107, 107, 0.1); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.section { padding: 5rem 2rem; max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-header .badge { display: inline-block; background: rgba(108, 92, 231, 0.1); color: var(--accent-primary); padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 20px; padding: 2rem; transition: all 0.3s;
  position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient-primary); opacity: 0; transition: opacity 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-primary); }
.card:hover::before { opacity: 1; }
.card-icon { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.card-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent-primary); font-weight: 600; }
.card-link:hover { gap: 0.75rem; }

.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.data-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; }
.data-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.data-card-title { font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.data-card-value { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.25rem; }
.data-card-change { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; font-weight: 600; }
.data-card-change.positive { color: var(--accent-green); }
.data-card-change.negative { color: var(--accent-red); }

.live-badge { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; color: var(--accent-green); text-transform: uppercase; font-weight: 600; }
.live-badge::before { content: ''; width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.topics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.topic-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; transition: all 0.3s; color: var(--text-primary); }
.topic-card:hover { transform: translateX(5px); border-color: var(--accent-primary); box-shadow: var(--shadow-md); }
.topic-icon { width: 50px; height: 50px; background: var(--bg-tertiary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.topic-content h4 { margin-bottom: 0.25rem; font-size: 1rem; }
.topic-content span { font-size: 0.875rem; color: var(--text-muted); }

.page-hero { background: var(--bg-secondary); padding: 8rem 2rem 4rem; text-align: center; position: relative; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: var(--gradient-hero); opacity: 0.03; }
.page-hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; justify-content: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-primary); }

.article { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }
.article-content { font-size: 1.1rem; line-height: 1.8; }
.article-content h2 { margin-top: 3rem; margin-bottom: 1rem; }
.article-content h3 { margin-top: 2rem; }
.article-content ul, .article-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.article-content li { margin-bottom: 0.5rem; color: var(--text-secondary); }
.article-content blockquote { border-left: 4px solid var(--accent-primary); padding: 1rem 1.5rem; margin: 2rem 0; background: var(--bg-tertiary); border-radius: 0 12px 12px 0; }

.live-widget { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 2rem; margin: 2rem 0; }
.live-widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.live-widget-title { font-size: 1.25rem; font-weight: 700; }

.chart-container { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; margin: 2rem 0; min-height: 300px; }

.calculator-widget { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 2rem; margin: 2rem 0; }
.calculator-form { display: grid; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-weight: 600; font-size: 0.875rem; color: var(--text-secondary); }
.form-group input, .form-group select { padding: 1rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-secondary); color: var(--text-primary); font-size: 1rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1); }
.calculator-result { margin-top: 1.5rem; padding: 1.5rem; background: var(--bg-tertiary); border-radius: 12px; text-align: center; }
.result-value { font-size: 2rem; font-weight: 700; color: var(--accent-green); }

.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th { font-weight: 600; color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; }
.data-table tr:hover { background: var(--bg-tertiary); }

.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 4rem 2rem 2rem; }
.footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 3rem; }
.footer-brand p { margin-top: 1rem; font-size: 0.95rem; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-primary); }
.footer-bottom { max-width: 1400px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.875rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { width: 40px; height: 40px; background: var(--bg-tertiary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--accent-primary); }
.footer-social a:hover svg { stroke: white; }
.footer-social svg { width: 20px; height: 20px; stroke: var(--text-secondary); }

.loading { display: flex; justify-content: center; align-items: center; min-height: 200px; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card) 50%, var(--bg-tertiary) 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 8px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 1024px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--nav-bg); flex-direction: column; padding: 1rem 2rem; border-bottom: 1px solid var(--border-color); }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
  .mobile-menu-btn { display: block; }
  .hero { padding: 6rem 1rem 3rem; }
  .hero-cta { flex-direction: column; }
  .section { padding: 3rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* Quiz Styles */
.quiz-question { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text-primary); }
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option { background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 12px; padding: 1rem 1.25rem; font-size: 1rem; text-align: left; cursor: pointer; transition: all 0.3s; color: var(--text-primary); font-family: inherit; }
.quiz-option:hover:not(:disabled) { border-color: var(--accent-primary); background: var(--bg-tertiary); }
.quiz-option:disabled { cursor: not-allowed; opacity: 0.9; }
.quiz-option.correct { border-color: var(--accent-green); background: rgba(0, 184, 148, 0.15); color: var(--accent-green); }
.quiz-option.incorrect { border-color: var(--accent-red); background: rgba(255, 107, 107, 0.15); color: var(--accent-red); }
.result-value { font-size: 2.5rem; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
