/* YT Money Calculator - Complete Optimized Stylesheet 2026 */
/* ============================================================
   FONT FIX: @import REMOVED (render-blocking 580ms tha)
   Fonts ab header.php se async load hote hain (DM Sans + Space Grotesk)
   body font-family: Inter → DM Sans (consistent with header.php)
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  /* ── Original variables (calculators + old pages) ── */
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-secondary: #4F46E5;
  --color-accent: #10B981;
  --color-error: #F43F5E;
  --color-success: #10B981;
  --color-warning: #f59e0b;
  --bg-body: #F8FAFC;
  --bg-base: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.95);
  --border-color: #E2E8F0;
  --text-primary: #0F172A;
  --text-main: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-on-primary: #FFFFFF;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-primary: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
  --container-width: 1280px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── NEW aliases for blog/pages (--c-* variables) ── */
  --c-primary: #2563EB;
  --c-primary-d: #1D4ED8;
  --c-success: #10B981;
  --c-warning: #f59e0b;
  --c-error: #ef4444;
  --c-accent: #6366f1;
  --c-text: #1a1a2e;
  --c-muted: #64748B;
  --c-border: #E2E8F0;
  --c-surface: #FFFFFF;
  --c-card: #FFFFFF;
  --c-bg: #F8FAFC;
  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --sh-sm: 0 2px 8px rgba(0,0,0,.06);
  --sh-md: 0 4px 16px rgba(0,0,0,.08);
  --sh-lg: 0 8px 40px rgba(0,0,0,.13);
}

[data-theme="dark"] {
  --bg-body: #0F172A;
  --bg-base: #0F172A;
  --bg-surface: #1E293B;
  --bg-surface-elevated: #334155;
  --bg-header: rgba(15, 23, 42, 0.95);
  --border-color: #334155;
  --text-primary: #F8FAFC;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-secondary: #94A3B8;
  --text-light: #64748B;
  /* dark aliases */
  --c-bg: #0f1117;
  --c-surface: #1a1d27;
  --c-card: #1e2235;
  --c-text: #f1f5f9;
  --c-muted: #94a3b8;
  --c-border: #2d3349;
  --sh-md: 0 4px 16px rgba(0,0,0,.4);
  --sh-lg: 0 8px 40px rgba(0,0,0,.55);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  flex: 1;
  padding: 0;
}

.section {
  padding: 5rem 0;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.25rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

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

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo span {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVIGATION ===== */
.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}

.nav-item { position: relative; }

.nav-link, .nav-toggle {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.nav-link:hover, .nav-toggle:hover { color: var(--color-primary); }

/* ===== MEGA MENU ===== */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-width: 800px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-top: 1rem;
  z-index: 50;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0.5rem;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.mega-menu-column h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mega-menu-links { list-style: none; padding: 0; }
.mega-menu-links li { margin-bottom: 0.75rem; }
.mega-menu-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: var(--transition);
}
.mega-menu-links a:hover { color: var(--color-primary); transform: translateX(5px); }

/* ===== HEADER ACTIONS ===== */
.header-actions { display: flex; align-items: center; gap: 1rem; }

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
}

.theme-toggle:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 0.5rem;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: var(--text-on-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: rgba(37, 99, 235, 0.05);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.5rem;
}

.mobile-menu {
  position: fixed;
  top: 73px;
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  transform: translateY(-150%);
  transition: transform 0.3s ease;
  z-index: 99;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 73px);
  overflow-y: auto;
}

.mobile-menu.active { transform: translateY(0); }

.mobile-nav-link {
  display: block;
  padding: 1rem 0;
  font-weight: 500;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.mobile-nav-link:hover { color: var(--color-primary); background-color: var(--bg-body); }

/* ===== CARDS ===== */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: block;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.card-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.card p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0; }

/* ===== CALCULATOR BOX ===== */
.calculator-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.input-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

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

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-prefix, .input-suffix {
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  position: absolute;
}

.input-prefix { left: 0; }
.input-suffix { right: 0; }
.input-with-prefix .input-field { padding-left: 2.5rem; }
.input-with-suffix .input-field { padding-right: 2.5rem; }

/* ===== RESULT BOX ===== */
.result-box {
  background-color: var(--bg-body);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
  border: 1px solid var(--border-color);
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.result-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ===== TABLE ===== */
.earnings-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-width: 600px;
}

.earnings-table th {
  background: var(--color-primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9375rem;
}

.earnings-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9375rem;
}

.earnings-table tr:last-child td { border-bottom: none; }
.earnings-table tr:hover { background-color: var(--bg-body); }

/* ===== TRUST SIGNALS ===== */
.trust-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.trust-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.trust-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.trust-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.trust-item h3 { font-size: 2rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-primary); }
.trust-item p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #f9fafb;
  border-top: 3px solid var(--color-primary);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

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

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: #f9fafb;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links { padding: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
  color: #9ca3af;
  font-size: 0.9375rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid rgba(156,163,175,0.2);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.copyright { color: #9ca3af; font-size: 0.875rem; }

.social-icons { display: flex; gap: 0.75rem; }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.3);
  color: #2563eb;
  transition: var(--transition);
  font-size: 1.25rem;
}

.social-icon:hover { background: #2563eb; color: white; transform: translateY(-3px); }

/* ===== RESPONSIVE - TABLET ===== */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 3.75rem; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ===== RESPONSIVE - DESKTOP ===== */
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .mobile-menu-btn { display: none; }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 1024px) {
  .mega-menu {
    position: relative;
    left: 0;
    transform: none;
    min-width: auto;
    width: 100%;
    margin-top: 1rem;
    padding: 1.5rem;
  }
  .mega-menu.active { opacity: 1; visibility: visible; display: block; }
  .mega-menu-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .header-actions .btn-primary { display: none; }
  .earnings-table { font-size: 0.875rem; }
  .earnings-table th, .earnings-table td { padding: 0.75rem 0.5rem; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .trust-signals { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .earnings-table { font-size: 0.8125rem; min-width: 500px; }
  .earnings-table th, .earnings-table td { padding: 0.65rem 0.4rem; }
  .card { padding: 1.5rem; }
  .calculator-box { padding: 1.5rem; }
}

/* ===== PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .header, .footer, .mobile-menu, .btn, .social-icons { display: none; }
  .main-content { padding: 0; }
}
