@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff1eb 0%, #ace0f9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 0.35s ease;
}

/* Dark mode base */
body.dark {
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
}

.calculator-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
    margin-bottom: 120px;
    box-sizing: border-box;
}

.calculator-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Dark container */
body.dark .calculator-container {
    background: #0b1220;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}
body.dark label { color: #cbd5e1; }

input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}
body.dark input[type="date"] {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #1f2937;
}

input[type="date"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

button {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

button:hover {
    background: linear-gradient(to right, #5a67d8, #6b46c1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1f2937;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
body.dark .btn-secondary {
    background: #111827;
    color: #e5e7eb;
}
body.dark .btn-secondary:hover { background: #1f2937; }

.result-container {
    margin-top: 30px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.result-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.result-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}
body.dark .result-box { background: #0f172a; }

.result-item {
    padding: 10px;
}

.result-value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    white-space: nowrap;
    display: inline-block;
}
body.dark .result-value { color: #93c5fd; }

.result-label {
    font-size: 14px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
}
body.dark .result-label { color: #94a3b8; }

/* Inline age row */
.age-inline {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: baseline;
    margin-top: 15px;
    padding: 10px 6px;
    background: #f8fafc;
    border-radius: 12px;
    flex-wrap: wrap;
}
body.dark .age-inline { background: #0f172a; }
.age-chip { 
    white-space: nowrap; 
    min-width: 80px;
    text-align: center;
}
.inline-label { margin-left: 6px; font-size: 14px; color: #718096; }
body.dark .inline-label { color: #94a3b8; }

/* Custom date input with placeholder and calendar icon */
.date-wrapper { position: relative; width: 100%; }
.date-input { padding-right: 54px; box-sizing: border-box; width: 100%; }
.date-input::-webkit-calendar-picker-indicator { opacity: 0; display: none; pointer-events: none; }
.date-input::-ms-clear { display: none; }
.date-input::-ms-reveal { display: none; }
.date-input:focus + .date-placeholder { display: none; }
.date-placeholder {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
    font-size: 16px;
}
.date-wrapper:focus-within .date-placeholder { display: none; }
.date-wrapper:hover .date-placeholder { display: none; }
body.dark .date-placeholder { color: #64748b; }
.date-button {
    position: absolute;
    top: 2px;
    bottom: 2px;
    right: 6px;
    transform: none;
    border: none;
    background: transparent;
    width: 40px;
    height: auto;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    will-change: background;
    z-index: 2;
}
.date-button:hover { background: rgba(0,0,0,0.05); }
.date-button:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }
body.dark .date-button:hover { background: rgba(255,255,255,0.06); }
.date-button svg { width: 18px; height: 18px; fill: #4b5563; pointer-events: none; }
body.dark .date-button svg { fill: #cbd5e1; }

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}
body.dark .error-message { color: #f87171; }

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

.title {
    text-align: center;
    margin-bottom: 25px;
    color: #2d3748;
    font-size: 28px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark .title { color: #e5e7eb; }

.subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 16px;
}
body.dark .subtitle { color: #94a3b8; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.toggle {
    width: auto;
    padding: 8px 14px;
}
.actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}
.section-title {
    margin-top: 24px;
    font-weight: 600;
    color: #374151;
}
body.dark .section-title { color: #e5e7eb; }

/* Prevent layout shift by reserving space for numbers */
#years, #months, #days { min-width: 3.5ch; }
#hoursTotal { min-width: 9ch; }
#minutesTotal { min-width: 10ch; }
#secondsTotal { min-width: 12ch; }

/* Allow totals to wrap instead of overflowing */
#hoursTotal, #minutesTotal, #secondsTotal {
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
    line-height: 1.15;
}

/* Slightly smaller numbers in totals box for better fit */
.totals-box .result-value { font-size: 22px; }
@media (max-width: 900px) { .totals-box .result-value { font-size: 20px; } }

/* Next Birthday Section - Enhanced Styling */
.next-birthday-section {
    margin-top: 20px;
}

.next-birthday-section .result-box {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    padding: 15px 10px;
    gap: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.next-birthday-section .result-item {
    padding: 8px 6px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.next-birthday-section .result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.next-birthday-section .result-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
    line-height: 1.1;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

.next-birthday-section .result-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Dark mode support for Next Birthday */
body.dark .next-birthday-section .result-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

body.dark .next-birthday-section .result-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .next-birthday-section .result-value {
    color: #93c5fd;
}

body.dark .next-birthday-section .result-label {
    color: #94a3b8;
}

/* Mobile responsive for Next Birthday */
@media (max-width: 640px) {
    .next-birthday-section .result-box {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 8px;
    }
    
    .next-birthday-section .result-item {
        padding: 10px 8px;
        min-height: 50px;
    }
    
    .next-birthday-section .result-value {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .next-birthday-section .result-label {
        font-size: 0.7rem;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .next-birthday-section .result-box {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .next-birthday-section .result-value {
        font-size: 1.1rem;
    }
}

/* Responsive layout */
@media (max-width: 480px) {
    .title { 
        font-size: 18px; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 8px;
    }
    
    /* Footer social icons mobile fix */
    .footer .social-link {
        width: 32px;
        height: 32px;
        margin: 0 4px;
    }
    
    .footer .social-icon {
        font-size: 16px;
    }
    
    .social-links {
        margin-top: 8px;
        padding: 0 10px;
    }
    
    /* Ultra-mobile performance optimizations */
    .calculator-container {
        padding: 20px;
        margin-bottom: 100px;
    }
    
    .result-container {
        margin-top: 20px;
    }
    
    /* Reduce animations on very small screens */
    .badge,
    .timeline-item,
    .age-unit-item {
        animation: none;
        transition: none;
    }
    
    /* Optimize grid layouts for very small screens */
    .age-units-grid,
    .challenges-grid,
    .social-content-grid,
    .achievement-share-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 640px) {
    .result-box { 
        grid-template-columns: 1fr; 
        gap: 12px;
        padding: 15px;
    }
    .actions { grid-template-columns: 1fr; }
    .title { 
        font-size: 20px; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 10px;
    }
    .subtitle { font-size: 14px; }
    
    /* Footer social icons medium mobile fix */
    .footer .social-link {
        width: 34px;
        height: 34px;
        margin: 0 5px;
    }
    
    .footer .social-icon {
        font-size: 17px;
    }
    
    /* Age inline mobile fix - keep horizontal */
    .age-inline {
        gap: 8px;
        padding: 6px 4px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        flex-wrap: nowrap;
    }
    
    .age-chip {
        min-width: 60px;
        padding: 6px 8px;
        background: transparent;
        border-radius: 8px;
        box-shadow: none;
        flex: 1;
        max-width: 80px;
        border: none;
    }
    
    .age-chip .result-value {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .age-chip .inline-label {
        font-size: 12px;
    }
    
    /* Countdown mobile fix */
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .countdown-item {
        padding: 8px 6px;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    .countdown-number {
        font-size: 18px;
    }
    
    .countdown-label {
        font-size: 11px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .result-box { grid-template-columns: repeat(2, 1fr); }
    
    /* Age inline tablet fix */
    .age-inline {
        gap: 15px;
    }
    
    .age-chip {
        min-width: 100px;
    }
    
    /* Countdown tablet fix */
    .countdown-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    /* Title fix for medium screens */
    .title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 15px;
    }
}

/* Utility */
.hidden { display: none !important; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Enable hardware acceleration for smooth scrolling */
    .calculator-container,
    .result-container,
    .age-inline,
    .countdown-grid {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
    }
    
    /* Optimize touch interactions */
    button,
    .theme-option,
    .challenge-btn,
    .content-btn,
    .share-achievement-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        cursor: pointer;
    }
    
    /* Optimize animations for mobile */
    .floating-particle {
        animation-duration: 30s !important;
        animation-timing-function: linear !important;
    }
    
    /* Reduce shadow complexity on mobile */
    .calculator-container {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Optimize transitions for mobile */
    .result-container,
    .age-chip,
    .badge,
    .timeline-item {
        transition: all 0.2s ease;
    }
    
    /* Reduce backdrop-filter usage on mobile for better performance */
    .footer {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.95);
    }
    
    body.dark .footer {
        background: rgba(15, 23, 42, 0.95);
    }
    
    /* Optimize hover effects for mobile */
    .age-unit-item:hover,
    .challenge-item:hover,
    .content-item:hover,
    .achievement-share-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Reduce particle count on mobile */
    .animated-bg {
        display: none;
    }
    
    /* Optimize confetti for mobile */
    .confetti {
        width: 6px;
        height: 6px;
        animation-duration: 2s;
    }
}

/* VISUAL IMPROVEMENTS */

/* 1. Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall 3s linear forwards;
}

.confetti:nth-child(2n) { background: #4ecdc4; }
.confetti:nth-child(3n) { background: #45b7d1; }
.confetti:nth-child(4n) { background: #96ceb4; }
.confetti:nth-child(5n) { background: #feca57; }
.confetti:nth-child(6n) { background: #ff9ff3; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 2. Progress Bar */
.progress-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}
body.dark .progress-section { background: #0f172a; }

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}
body.dark .progress-bar { background: #1f2937; }

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 3. Age Milestones */
.milestones-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}
body.dark .milestones-section { background: #0f172a; }

.milestone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}
body.dark .milestone { border-bottom-color: #1f2937; }

.milestone:last-child { border-bottom: none; }

.milestone-age {
    font-weight: 600;
    color: #667eea;
}
body.dark .milestone-age { color: #93c5fd; }

.milestone-time {
    font-size: 14px;
    color: #718096;
}
body.dark .milestone-time { color: #94a3b8; }

/* 4. Zodiac Sign */
.zodiac-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}
body.dark .zodiac-section { background: #0f172a; }

.zodiac-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.zodiac-name {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}
body.dark .zodiac-name { color: #93c5fd; }

.zodiac-dates {
    font-size: 14px;
    color: #718096;
}
body.dark .zodiac-dates { color: #94a3b8; }

/* 5. Birthday Countdown */
.countdown-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}
body.dark .countdown-section { background: #0f172a; }

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.countdown-item {
    background: transparent;
    padding: 10px;
    border-radius: 8px;
    box-shadow: none;
    border: none;
}
body.dark .countdown-item { 
    background: transparent; 
    box-shadow: none;
}

.countdown-number {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark .countdown-number { color: #93c5fd; }

.countdown-label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark .countdown-label { color: #94a3b8; }

/* ADDITIONAL FEATURES */

/* 1. Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.floating-particle:nth-child(2n) {
    background: rgba(118, 75, 162, 0.3);
    animation-duration: 25s;
}

.floating-particle:nth-child(3n) {
    background: rgba(255, 107, 107, 0.3);
    animation-duration: 30s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* 2. Achievement Badges */
.achievements-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}
body.dark .achievements-section { background: #0f172a; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 5px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: badgePop 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.badge.unlocked {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge.locked {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
}
body.dark .badge.locked {
    background: #374151;
    color: #9ca3af;
}

.badge-icon {
    font-size: 16px;
}

@keyframes badgePop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* 3. Life Timeline */
.timeline-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}
body.dark .timeline-section { background: #0f172a; }

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
body.dark .timeline::before { background: #374151; }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}
body.dark .timeline-item {
    background: #1f2937;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 15px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
}
body.dark .timeline-item::before { border-color: #0f172a; }

.timeline-item.past {
    border-left-color: #10b981;
}
.timeline-item.past::before { background: #10b981; }

.timeline-item.future {
    border-left-color: #f59e0b;
}
.timeline-item.future::before { background: #f59e0b; }

.timeline-age {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}
body.dark .timeline-age { color: #93c5fd; }

.timeline-event {
    font-size: 14px;
    color: #374151;
}
body.dark .timeline-event { color: #e5e7eb; }

.timeline-date {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}
body.dark .timeline-date { color: #9ca3af; }

/* Creator Info Styles */
.creator-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.creator-text {
    color: #6b7280;
}
body.dark .creator-text { color: #9ca3af; }

.creator-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
body.dark .creator-link { color: #93c5fd; }

.creator-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}
body.dark .creator-link:hover { color: #60a5fa; }

/* Footer Styles */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
    z-index: 100;
}
body.dark .footer {
    background: rgba(15, 23, 42, 0.9);
    border-top-color: #374151;
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.footer-content p {
    margin: 5px 0;
    color: #c6d9ff;
}
body.dark .footer-content p { color: #9ca3af; }

.footer-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
body.dark .footer-link { color: #93c5fd; }

.footer-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}
body.dark .footer-link:hover { color: #60a5fa; }

.social-links {
    margin-top: 10px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.social-links::-webkit-scrollbar {
    display: none;
}

.social-link {
    display: inline-block;
    margin: 0 8px;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-link:hover {
    transform: scale(1.2);
}

/* Footer social icons styling */
.footer .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 6px;
    border-radius: 50%;
    background: transparent;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.footer .social-icon {
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
}

.footer .social-link:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

/* Optional brand accent on hover */
.footer .social-link[title="YouTube"]:hover .social-icon { color: #ff4d4f; }
.footer .social-link[title="Instagram"]:hover .social-icon { color: #e1306c; }
.footer .social-link[title="Facebook"]:hover .social-icon { color: #1877f2; }
.footer .social-link[title="LinkedIn"]:hover .social-icon { color: #0a66c2; }
.footer .social-link[title="WhatsApp"]:hover .social-icon { color: #25d366; }
.footer .social-link[title="GitHub"]:hover .social-icon { color: #ffffff; }
.footer .social-link[title="Website"]:hover .social-icon { color: #60a5fa; }

/* ===== NEW VISUAL ENHANCEMENTS STYLES ===== */

/* Subsection titles */
.subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 1rem 0;
    text-align: center;
}

/* Age Units Section */
.age-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.age-unit-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0.75rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.age-unit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.unit-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
}

.unit-label {
    font-size: 0.85rem;
    opacity: 0.9;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
}

/* Seasonal Theme Section */
.seasonal-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

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

.season-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.season-dates {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Theme Selector */
.theme-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.theme-option {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-option:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* ===== NEW SOCIAL FEATURES STYLES ===== */

/* Age Challenges */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.challenge-item {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    transition: transform 0.3s ease;
}

.challenge-item:hover {
    transform: translateY(-3px);
}

.challenge-icon {
    font-size: 1.5rem;
}

.challenge-text {
    flex: 1;
    font-weight: 500;
}

.challenge-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Social Content */
.social-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.content-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.content-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.content-item h5 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.content-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-text {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

.content-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.content-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Achievement Sharing */
.achievement-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.achievement-share-item {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.3);
    transition: transform 0.3s ease;
}

.achievement-share-item:hover {
    transform: translateY(-3px);
}

.achievement-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.achievement-text {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
}

.share-achievement-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-achievement-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .age-units-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .age-unit-item {
        min-height: 100px;
        padding: 1rem 0.5rem;
    }
    
    .unit-value {
        font-size: 1.4rem;
    }
    
    .unit-label {
        font-size: 0.8rem;
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .social-content-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .theme-options {
        gap: 0.25rem;
    }
    
    .theme-option {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== CUSTOM THEMES ===== */

/* Ocean Theme */
.theme-ocean {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-ocean .calculator-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.theme-ocean .title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sunset Theme */
.theme-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.theme-sunset .calculator-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(250, 112, 154, 0.3);
}

.theme-sunset .title {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forest Theme */
.theme-forest {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.theme-forest .calculator-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(79, 172, 254, 0.3);
}

.theme-forest .title {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ANIMATIONS ===== */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== ASTROLOGY & LIFE PREDICTIONS STYLES ===== */

.astrology-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    border: 2px solid #667eea;
    color: white;
}

body.dark .astrology-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

/* Birth Time Input Styles */
.birth-time-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.birth-time-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-input-group label {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.time-input, .place-input {
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    transition: all 0.3s ease;
}

.time-input:focus, .place-input:focus {
    border-color: #fbbf24;
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}

.prediction-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.prediction-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

/* Zodiac & Planetary Info */
.zodiac-planetary-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.planetary-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.planetary-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.planetary-details {
    flex: 1;
}

.planetary-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.planetary-value {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* Predictions Container */
.predictions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-5px);
}

.prediction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.prediction-icon {
    font-size: 1.5rem;
}

.prediction-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.prediction-content {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.prediction-remedy {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #fbbf24;
}

/* Lucky Elements */
.lucky-elements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.lucky-element {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lucky-element-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.lucky-element-value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Daily Horoscope */
.daily-horoscope {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.horoscope-content {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .birth-time-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .zodiac-planetary-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .predictions-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .lucky-elements {
        grid-template-columns: 1fr;
    }
    
    .astrology-section {
        padding: 15px;
    }
    
    .birth-time-container {
        padding: 15px;
    }
}

/* ===== LIFE LINE & LOVE LIFE LINE STYLES ===== */

.life-love-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

body.dark .life-love-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

/* Life Line Styles */
.life-line-container {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark .life-line-container {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.life-line-progress {
    margin: 15px 0;
}

.life-line-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

body.dark .life-line-bar {
    background: #334155;
}

.life-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 6px;
    transition: width 1s ease;
    position: relative;
}

.life-line-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.life-line-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.life-stat {
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

body.dark .life-stat {
    background: #0f172a;
    border-color: #334155;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 5px;
}

body.dark .stat-value {
    color: #6ee7b7;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark .stat-label {
    color: #94a3b8;
}

/* Love Life Line Styles */
.love-life-container {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark .love-life-container {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.love-life-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.love-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.love-input-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

body.dark .love-input-group label {
    color: #e5e7eb;
}

.love-select, .love-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

body.dark .love-select, body.dark .love-input {
    background: #0f172a;
    border-color: #334155;
    color: #e5e7eb;
}

.love-select:focus, .love-input:focus {
    border-color: #ec4899;
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.love-life-progress {
    margin: 15px 0;
}

.love-life-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

body.dark .love-life-bar {
    background: #334155;
}

.love-life-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #be185d);
    border-radius: 6px;
    transition: width 1s ease;
    position: relative;
}

.love-life-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.love-life-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.love-stat {
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

body.dark .love-stat {
    background: #0f172a;
    border-color: #334155;
}

.love-stat .stat-value {
    color: #ec4899;
}

body.dark .love-stat .stat-value {
    color: #f9a8d4;
}

/* Life vs Love Comparison */
.life-love-comparison {
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark .life-love-comparison {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.comparison-chart {
    margin: 15px 0;
}

.comparison-item {
    margin-bottom: 15px;
}

.comparison-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

body.dark .comparison-label {
    color: #e5e7eb;
}

.comparison-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

body.dark .comparison-bar {
    background: #334155;
}

.comparison-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.comparison-fill.life-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.comparison-fill.love-fill {
    background: linear-gradient(90deg, #ec4899, #be185d);
}

/* Insights Styles */
.life-insights, .love-insights, .comparison-insight {
    margin-top: 15px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #0369a1;
}

body.dark .life-insights, body.dark .love-insights, body.dark .comparison-insight {
    background: #0c4a6e;
    border-color: #0ea5e9;
    color: #7dd3fc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .life-line-stats, .love-life-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .love-life-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .life-love-section {
        padding: 15px;
    }
    
    .life-line-container, .love-life-container, .life-love-comparison {
        padding: 12px;
    }
}

/* ===== HEIGHT & WEIGHT CALCULATOR STYLES ===== */

.height-weight-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

body.dark .height-weight-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

.hw-input-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.hw-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hw-input-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

body.dark .hw-input-group label {
    color: #e5e7eb;
}

.hw-select, .hw-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

body.dark .hw-select, body.dark .hw-input {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}

.hw-select:focus, .hw-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.height-input-wrapper, .weight-input-wrapper {
    display: flex;
    gap: 8px;
}

.hw-input {
    flex: 1;
}

.hw-unit-select {
    padding: 10px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 60px;
}

body.dark .hw-unit-select {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}

.hw-calculate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    grid-column: 1 / -1;
    margin-top: 10px;
}

.hw-calculate-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.hw-results {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

body.dark .hw-results {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hw-results-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
}

body.dark .hw-results-title {
    color: #e5e7eb;
}

.hw-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.hw-result-item {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

body.dark .hw-result-item {
    background: #0f172a;
    border-color: #334155;
}

.hw-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

body.dark .hw-result-value {
    color: #93c5fd;
}

.hw-result-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

body.dark .hw-result-label {
    color: #94a3b8;
}

.hw-result-status {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 15px;
    display: inline-block;
}

.hw-result-status.healthy {
    background: #dcfce7;
    color: #166534;
}

.hw-result-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.hw-result-status.attention {
    background: #fee2e2;
    color: #991b1b;
}

body.dark .hw-result-status.healthy {
    background: #064e3b;
    color: #6ee7b7;
}

body.dark .hw-result-status.warning {
    background: #78350f;
    color: #fbbf24;
}

body.dark .hw-result-status.attention {
    background: #7f1d1d;
    color: #fca5a5;
}

.hw-recommendations {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

body.dark .hw-recommendations {
    background: #0c4a6e;
    border-color: #0ea5e9;
}

.hw-recommendations h5 {
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

body.dark .hw-recommendations h5 {
    color: #7dd3fc;
}

.hw-recommendations ul {
    margin: 0;
    padding-left: 20px;
    color: #0369a1;
    font-size: 13px;
    line-height: 1.5;
}

body.dark .hw-recommendations ul {
    color: #7dd3fc;
}

.hw-recommendations li {
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hw-input-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hw-results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .height-input-wrapper, .weight-input-wrapper {
        flex-direction: column;
        gap: 6px;
    }
    
    .hw-unit-select {
        width: 100%;
        min-width: auto;
    }
}
