:root {
    --bg: #0c0a09; --bg-elevated: #1c1917; --card: #292524; --card-hover: #33302e;
    --border: #44403c; --fg: #fafaf9; --fg-muted: #a8a29e; --accent: #f59e0b;
    --accent-dim: rgba(245, 158, 11, 0.15); --accent-glow: rgba(245, 158, 11, 0.3);
    --success: #22c55e; --info: #38bdf8; --rose: #fb7185; --violet: #a78bfa;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Space Grotesk', sans-serif; background: var(--bg); color: var(--fg); min-height: 100vh; overflow-x: hidden; position: relative; }
/* ... (Keep all your original CSS here) ... */
.main-footer { margin-top: 40px; text-align: center; padding: 40px 20px; border-top: 1px solid var(--border); }
.main-footer nav a { color: var(--fg-muted); margin: 0 10px; text-decoration: none; font-size: 14px; transition: 0.3s; }
.main-footer nav a:hover { color: var(--accent); }
.main-footer p { margin-top: 15px; font-size: 12px; color: var(--fg-muted); }


  :root {
    --bg: #0c0a09;
    --bg-elevated: #1c1917;
    --card: #292524;
    --card-hover: #33302e;
    --border: #44403c;
    --fg: #fafaf9;
    --fg-muted: #a8a29e;
    --accent: #f59e0b;
    --accent-dim: rgba(245, 158, 11, 0.15);
    --accent-glow: rgba(245, 158, 11, 0.3);
    --success: #22c55e;
    --info: #38bdf8;
    --rose: #fb7185;
    --violet: #a78bfa;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
  }

  /* Animated background */
  .bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }

  .bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: blobFloat 20s ease-in-out infinite alternate;
  }

  .bg-blob:nth-child(1) {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.25), transparent 70%);
    top: -10%; left: -5%;
    animation-duration: 25s;
  }

  .bg-blob:nth-child(2) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(251,113,133,0.15), transparent 70%);
    bottom: -10%; right: -5%;
    animation-duration: 30s;
    animation-delay: -5s;
  }

  .bg-blob:nth-child(3) {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(56,189,248,0.12), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 22s;
    animation-delay: -10s;
  }

  @keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 40px) scale(0.95); }
    100% { transform: translate(30px, 20px) scale(1.05); }
  }

  /* Grid pattern overlay */
  .bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(245,158,11,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(245,158,11,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  /* Floating particles */
  .particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  /* Main content */
  .app-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
  }

  /* Header */
  .app-header {
    text-align: center;
    margin-bottom: 48px;
  }

  .app-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-dim);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInDown 0.6s ease;
  }

  .app-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 7vw, 60px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    animation: fadeInDown 0.6s ease 0.1s both;
  }

  .app-header h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #fbbf24, var(--rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .app-header p {
    color: var(--fg-muted);
    font-size: 16px;
    margin-top: 12px;
    animation: fadeInDown 0.6s ease 0.2s both;
  }

  @keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Input Section */
  .input-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.3s both;
    position: relative;
    overflow: hidden;
  }

  .input-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
  }

  @media (max-width: 600px) {
    .input-row { grid-template-columns: 1fr; }
  }

  .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .input-group label i {
    color: var(--accent);
    font-size: 14px;
  }

  .input-group input[type="date"] {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--fg);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
  }

  .input-group input[type="date"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }

  .input-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(10deg);
    cursor: pointer;
  }

  /* Mode toggle */
  .mode-toggle {
    display: flex;
    background: var(--card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
  }

  .mode-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--fg-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mode-btn.active {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 4px 20px var(--accent-glow);
  }

  .mode-btn:not(.active):hover {
    color: var(--fg);
    background: var(--card-hover);
  }

  .calculate-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: var(--bg);
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
  }

  .calculate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
  }

  .calculate-btn:hover::before {
    transform: translateX(100%);
  }

  .calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
  }

  .calculate-btn:active {
    transform: translateY(0);
  }

  /* Results section */
  .results-section {
    display: none;
    animation: fadeInUp 0.5s ease;
  }

  .results-section.visible {
    display: block;
  }

  /* Live indicator */
  .live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 100px;
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 20px;
  }

  .live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
  }

  @keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  }

  /* Primary age display */
  .primary-age {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
  }

  .primary-age::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--rose), var(--info), var(--violet));
  }

  .primary-age .age-label {
    font-size: 14px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 16px;
  }

  .primary-age .age-values {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }

  .age-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px;
  }

  .age-unit .number {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(48px, 10vw, 80px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, var(--fg), var(--fg-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
  }

  .age-unit.years .number {
    background: linear-gradient(180deg, var(--accent), #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(64px, 14vw, 100px);
  }

  .age-unit .unit-label {
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .age-separator {
    font-size: 48px;
    font-weight: 200;
    color: var(--border);
    padding: 0 2px;
    align-self: flex-start;
    margin-top: 8px;
  }

  /* Live clock row */
  .live-time-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
  }

  @media (max-width: 500px) {
    .live-time-row { grid-template-columns: repeat(2, 1fr); }
  }

  .time-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.3s, transform 0.2s;
  }

  .time-box:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }

  .time-box .t-num {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--fg);
    line-height: 1.2;
  }

  .time-box .t-label {
    font-size: 11px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
  }

  /* Secondary stats grid */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }

  @media (max-width: 600px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
  }

  .stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
  }

  .stat-card:nth-child(1)::before { background: var(--accent); }
  .stat-card:nth-child(2)::before { background: var(--rose); }
  .stat-card:nth-child(3)::before { background: var(--info); }
  .stat-card:nth-child(4)::before { background: var(--violet); }
  .stat-card:nth-child(5)::before { background: var(--success); }
  .stat-card:nth-child(6)::before { background: #fb923c; }

  .stat-card:hover {
    border-color: rgba(245,158,11,0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  .stat-card .stat-icon {
    font-size: 20px;
    margin-bottom: 10px;
    display: block;
  }

  .stat-card:nth-child(1) .stat-icon { color: var(--accent); }
  .stat-card:nth-child(2) .stat-icon { color: var(--rose); }
  .stat-card:nth-child(3) .stat-icon { color: var(--info); }
  .stat-card:nth-child(4) .stat-icon { color: var(--violet); }
  .stat-card:nth-child(5) .stat-icon { color: var(--success); }
  .stat-card:nth-child(6) .stat-icon { color: #fb923c; }

  .stat-card .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--fg);
    line-height: 1.2;
  }

  .stat-card .stat-label {
    font-size: 12px;
    color: var(--fg-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Fun facts section */
  .facts-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
  }

  .facts-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .facts-section h3 i { color: var(--accent); }

  .facts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  @media (max-width: 600px) {
    .facts-list { grid-template-columns: 1fr; }
  }

  .fact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
  }

  .fact-item:hover {
    border-color: var(--border);
    transform: translateX(4px);
  }

  .fact-item .fact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
  }

  .fact-item .fact-text {
    font-size: 14px;
    color: var(--fg-muted);
    line-height: 1.4;
  }

  .fact-item .fact-text strong {
    color: var(--fg);
    font-weight: 600;
  }

  /* Birthday countdown */
  .birthday-card {
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,113,133,0.06));
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
  }

  .birthday-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(245,158,11,0.03), transparent, rgba(251,113,133,0.03), transparent);
    animation: birthdaySpin 15s linear infinite;
  }

  @keyframes birthdaySpin {
    to { transform: rotate(360deg); }
  }

  .birthday-card > * { position: relative; z-index: 1; }

  .birthday-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .birthday-card .countdown-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
  }

  .cd-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    min-width: 72px;
  }

  .cd-box .cd-num {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
  }

  .cd-box .cd-label {
    font-size: 11px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
  }

  /* Progress bar */
  .progress-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
  }

  .progress-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .progress-section h3 i { color: var(--accent); }

  .progress-item {
    margin-bottom: 18px;
  }

  .progress-item:last-child { margin-bottom: 0; }

  .progress-item .p-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .progress-item .p-header .p-label { color: var(--fg-muted); }
  .progress-item .p-header .p-value { color: var(--fg); font-weight: 600; }

  .progress-bar {
    height: 8px;
    background: var(--card);
    border-radius: 100px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s ease;
    position: relative;
  }

  .progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 0 100px 100px 0;
  }

  /* Toast */
  .toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--rose);
    color: white;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(251,113,133,0.3);
  }

  .toast.show {
    transform: translateX(-50%) translateY(0);
  }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }




/* Navigation Styles */
.top-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(12, 10, 9, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo i {
  color: var(--accent);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}

.nav-btn {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.3);
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .nav-links {
    display: none; /* Hide links on small mobile to keep it clean */
  }
}