/* ========================================
   CSS Variables for Theme Support
   ======================================== */
:root {
    /* Light Theme Colors */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf1;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);

    /* Accent Colors */
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* Component Specific */
    --age-display-bg: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    --stat-highlight: #fef3c7;
    --birthday-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);

    --age-display-bg: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --stat-highlight: #422006;
    --birthday-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-primary);
    z-index: -2;
    transition: background 0.3s ease;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header Styles
   ======================================== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    justify-self: start;
}

.logo:hover {
    opacity: 0.8;
}

.logo svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-self: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.95rem;
}

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

.nav-link.active {
    background: var(--color-primary);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
}

.settings-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.settings-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.settings-btn:hover {
    background: var(--color-primary);
    transform: scale(1.05);
}

.settings-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px var(--shadow);
    z-index: 200;
    padding: 0.5rem 0;
    display: none;
}

.settings-dropdown.open {
    display: block;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.settings-label {
    flex: 1;
}

.settings-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.settings-toggle-btn:hover {
    background: var(--color-primary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.btn-icon:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   Tool Container
   ======================================== */
.tool-container {
    padding: 3rem 0;
}

.tool-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* ========================================
   Input Section
   ======================================== */
.input-section {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
}

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

.input-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.date-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.date-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.date-input:hover {
    border-color: var(--color-primary);
}

/* Date of Birth row: Day | Month | Year */
.dob-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 1rem;
    align-items: end;
}

.dob-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dob-field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dob-input,
.dob-select {
    width: 100%;
    padding: 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.dob-input:focus,
.dob-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.dob-input:hover,
.dob-select:hover {
    border-color: var(--color-primary);
}

.dob-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

[data-theme="dark"] .dob-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.today-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.today-label {
    color: var(--text-muted);
    font-weight: 500;
}

.today-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    flex: 1;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-icon-text {
    font-size: 1.25rem;
}

/* ========================================
   Error Message
   ======================================== */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease;
}

[data-theme="dark"] .error-message {
    background: #451a1a;
    border-color: #7f1d1d;
}

.error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-text {
    color: var(--color-danger);
    font-weight: 500;
    font-size: 0.95rem;
}

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

/* ========================================
   Results Section
   ======================================== */
.results-section {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Main Age Display
   ======================================== */
.age-display {
    background: var(--age-display-bg);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px var(--shadow);
    margin-bottom: 2rem;
}

.age-heading {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.age-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.age-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.age-value {
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.age-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.age-separator {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin-top: -1.5rem;
}

/* ========================================
   Stats Display
   ======================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.stat-card.highlight {
    background: var(--stat-highlight);
    border: 2px solid var(--color-warning);
}

.stat-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value.live {
    color: var(--color-success);
}

/* ========================================
   Birthday Section
   ======================================== */
.birthday-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.birthday-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.birthday-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.countdown-card {
    background: var(--birthday-gradient);
}

.countdown-card .birthday-label {
    color: rgba(255, 255, 255, 0.85);
}

.countdown-card .birthday-value {
    color: white;
}

.birthday-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.birthday-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.birthday-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.birthday-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   Tool Description Section (theme-aware, dark mode supported)
   ======================================== */
.tool-description {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2rem;
    margin-top: 3rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.8;
}
.tool-description h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}
.tool-description h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem 0;
}
.tool-description p,
.tool-description li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.tool-description ul,
.tool-description ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}
.tool-description a {
    color: var(--color-primary);
    text-decoration: underline;
}
.tool-description a:hover {
    opacity: 0.9;
}

/* ========================================
   Footer Styles
   ======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    padding: 3rem 0 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .header {
        position: relative;
    }

    .header-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .nav-toggle {
        display: flex;
        order: 1;
        flex-shrink: 0;
    }

    .logo {
        justify-self: unset;
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
        min-width: 0;
    }

    .header-controls {
        justify-self: unset;
        order: 3;
        flex-shrink: 0;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 25px var(--shadow);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 99;
    }

    .nav-menu.open {
        max-height: 320px;
        opacity: 1;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
        display: block;
        text-align: left;
    }

    .settings-dropdown {
        right: 0;
        left: auto;
        min-width: min(200px, calc(100vw - 2rem));
    }

    .container {
        padding: 0 1rem;
    }

    .tool-container {
        padding: 2rem 0;
    }

    .tool-title {
        font-size: 1.75rem;
    }

    .tool-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .input-section {
        padding: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .age-display {
        padding: 2rem 1.5rem;
    }

    .age-value {
        font-size: 3rem;
    }

    .age-separator {
        font-size: 2rem;
        margin-top: -1rem;
    }

    .age-unit {
        min-width: 70px;
    }

    .age-main {
        gap: 1rem;
    }

    .stats-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .stat-value {
        font-size: clamp(1rem, 3.5vw, 1.35rem);
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .birthday-section {
        grid-template-columns: 1fr;
    }

    .birthday-card {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-section {
        align-items: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer {
        padding: 2rem 0 1.25rem;
        margin-top: 2rem;
    }

    .tool-description {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

    .tool-description h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.6rem 0.75rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo svg {
        width: 20px;
        height: 20px;
    }

    .container {
        padding: 0 0.75rem;
    }

    .tool-container {
        padding: 1.5rem 0;
    }

    .tool-title {
        font-size: 1.5rem;
    }

    .tool-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .input-section {
        padding: 1.25rem;
    }

    .date-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .dob-row {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 0.75rem;
    }

    .dob-input,
    .dob-select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .today-display {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    .age-display {
        padding: 1.5rem 1rem;
    }

    .age-heading {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .age-main {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .age-value {
        font-size: 2.25rem;
    }

    .age-separator {
        font-size: 1.35rem;
        margin-top: -0.75rem;
    }

    .age-unit {
        min-width: 60px;
    }

    .age-label {
        font-size: 0.8rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        margin: 1.5rem 0;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-value {
        font-size: 1.05rem;
    }

    .stat-icon {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .birthday-section {
        margin: 1.5rem 0;
    }

    .birthday-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .birthday-icon {
        font-size: 2.5rem;
    }

    .birthday-value {
        font-size: 1.1rem;
    }

    .footer-container {
        padding: 0 0.75rem;
    }

    .footer-brand {
        font-size: 1.25rem;
    }

    .footer-text {
        font-size: 0.8rem;
    }

    .tool-description {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }

    .tool-description h2 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }

    .tool-description p,
    .tool-description li {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .error-message {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }

    .tool-title {
        font-size: 1.35rem;
    }

    .age-value {
        font-size: 2rem;
    }

    .age-unit {
        min-width: 52px;
    }

    .age-separator {
        font-size: 1.2rem;
    }

    .input-section {
        padding: 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Number count-up effect */
@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.animate-value {
    animation: countUp 0.4s ease-out;
}

/* ========================================
   Accessibility
   ======================================== */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
