/* Reset and base styles - optimized for performance */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimization: Use transform instead of changing layout properties */
.time-item {
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    padding: 2rem 0;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.nav-links {
    text-align: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-links a {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* SEO Content Section */
.intro-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.intro-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #333;
}

.usage-section,
.examples-section {
    margin-top: 2rem;
}

.usage-section h3,
.examples-section h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.usage-section h3::before,
.examples-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.usage-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.usage-section li {
    margin-bottom: 0.75rem;
    color: #555;
    line-height: 1.6;
}

.examples-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.examples-section li {
    margin-bottom: 0.75rem;
    color: #555;
    line-height: 1.6;
}

/* Form styles */
.age-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.age-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Date selector styles */
.date-selector-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-field {
    display: flex;
    flex-direction: column;
}

.date-field label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.date-field input[type="number"],
.date-field select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.date-field input[type="number"]:focus,
.date-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.date-field input[type="number"] {
    text-align: center;
}

.date-field select {
    cursor: pointer;
}



.toggle-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.toggle-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.toggle-group label {
    display: inline;
    margin-bottom: 0;
    font-weight: normal;
}

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.calculate-btn:hover::before {
    left: 100%;
}

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

/* Results styles */
.results {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.main-result {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.main-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.main-result:hover::before {
    transform: translateX(100%);
}

.main-result h2 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-section {
    margin-bottom: 2rem;
}

.result-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.result-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.time-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: fit-content;
    min-width: 180px;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.time-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.time-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Special handling for each time unit to ensure proper centering and border adaptation */
.months-item, .weeks-item, .days-item, .hours-item, .minutes-item, .seconds-item {
    width: fit-content;
    min-width: 180px;
    max-width: 100%;
    flex-shrink: 0;
}

.months-item .number, .weeks-item .number, .days-item .number, 
.hours-item .number, .minutes-item .number, .seconds-item .number {
    word-break: break-all;
    hyphens: auto;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.time-item .number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 0 0.5rem;
    letter-spacing: -0.02em;
}

/* Special handling for large numbers */
.time-item .number[id="totalSeconds"] {
    font-size: 1.5rem;
}

.time-item .number[id="totalMinutes"] {
    font-size: 1.7rem;
}

.time-item .number[id="totalHours"] {
    font-size: 1.8rem;
}

.time-item .number[id="totalDays"] {
    font-size: 1.9rem;
}

.time-item .number[id="totalWeeks"] {
    font-size: 1.9rem;
}

.time-item .number[id="totalMonths"] {
    font-size: 2rem;
}

.time-item .label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.birthday-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.birthday-info > div {
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.birthday-info > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.birthday-info > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.birthday-info .label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.birthday-info span:not(.label) {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

/* Error styles */
.error {
    background: #fee;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fed7d7;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .age-form,
    .results,
    .intro-section,
    .faq-section {
        padding: 1.5rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .time-item {
        min-height: 90px;
        padding: 1rem 0.75rem;
        min-width: 160px;
    }
    
    .time-item .number {
        font-size: 1.8rem;
    }
    
    .time-item .number[id="totalSeconds"] {
        font-size: 1.3rem;
    }
    
    .time-item .number[id="totalMinutes"] {
        font-size: 1.5rem;
    }
    
    .time-item .number[id="totalHours"] {
        font-size: 1.6rem;
    }
    
    .time-item .number[id="totalDays"] {
        font-size: 1.7rem;
    }
    
    .time-item .number[id="totalWeeks"] {
        font-size: 1.7rem;
    }
    
    .time-item .number[id="totalMonths"] {
        font-size: 1.8rem;
    }
    
    .birthday-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .time-item {
        min-height: 80px;
        padding: 0.75rem;
        min-width: 140px;
    }
    
    .time-item .number {
        font-size: 1.6rem;
    }
    
    .time-item .number[id="totalSeconds"] {
        font-size: 1.1rem;
    }
    
    .time-item .number[id="totalMinutes"] {
        font-size: 1.3rem;
    }
    
    .time-item .number[id="totalHours"] {
        font-size: 1.4rem;
    }
    
    .time-item .number[id="totalDays"] {
        font-size: 1.5rem;
    }
    
    .time-item .number[id="totalWeeks"] {
        font-size: 1.5rem;
    }
    
    .time-item .number[id="totalMonths"] {
        font-size: 1.6rem;
    }
    
    .time-item .label {
        font-size: 0.8rem;
    }
    
    .main-result h2 {
        font-size: 2rem;
    }
    
    .intro-section,
    .faq-section {
        padding: 1rem;
    }
    
    .faq-container summary {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .faq-container p {
        padding: 0.75rem 1rem;
    }
} 

/* FAQ Section Styles */
.faq-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.faq-section h2 {
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
}

.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.faq-container details {
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-container details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.faq-container summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.faq-container summary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.faq-container summary:focus {
    outline: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.faq-container summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.faq-container details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-container p {
    padding: 1.5rem;
    margin: 0;
    color: #333;
    line-height: 1.7;
    background: white;
    font-size: 1rem;
}

/* Footer styles */
.site-footer {
    text-align: center;
    color: white;
    padding: 2rem 0;
    opacity: 0.8;
}

.site-footer p {
    margin: 0;
    font-size: 1rem;
}

.site-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
summary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Adjusted Age Calculator Specific Styles */
.calculator-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.mode-switch {
    display: flex;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.mode-button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.mode-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.mode-button span {
    position: relative;
    z-index: 1;
}

.mode-button.active {
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.mode-button.active::before {
    opacity: 1;
}

.mode-button:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.mode-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.date-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 1rem;
}

.date-input-group label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.date-segment {
    display: flex;
    gap: 4px;
    align-items: center;
}

.date-input {
    width: 60px;
    padding: 12px 8px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.date-input.input-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.date-input.input-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.date-separator {
    font-weight: bold;
    color: #666;
}

.ga-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 1rem;
}

.ga-input-group label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.ga-input {
    width: 50px;
    padding: 12px 8px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ga-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.ga-input.input-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ga-input.input-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ga-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
    border-left: 4px solid #2196f3;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc02;
    border-left: 4px solid #ff9800;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-left: 4px solid #f44336;
}

.alert strong {
    font-weight: 600;
}

.age-display-modes {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.display-mode-button {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.display-mode-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.display-mode-button span {
    position: relative;
    z-index: 1;
}

.display-mode-button.active {
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.display-mode-button.active::before {
    opacity: 1;
}

.display-mode-button:hover:not(.active) {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: translateY(-1px);
}

.display-mode-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.age-result {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.age-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.age-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.age-label {
    font-size: 1.2rem;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.countdown-sentence {
    text-align: center;
    margin-top: 1rem;
    font-size: 1rem;
    color: #555;
    font-style: italic;
}

.corrected-birth-date {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e8f5e8;
    border-radius: 6px;
    color: #2e7d32;
    font-weight: 500;
}

.reset-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.reset-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.reset-button:hover::before {
    left: 100%;
}

.reset-button:active {
    transform: translateY(0);
}

.reset-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Responsive adjustments for adjusted age calculator */
@media (max-width: 768px) {
    .date-input-group,
    .ga-input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .date-segment {
        width: 100%;
        justify-content: center;
    }
    
    .age-display-modes {
        flex-direction: column;
        align-items: center;
    }
    
    .display-mode-button {
        width: 200px;
    }
}

/* Dog Age Calculator Specific Styles */
.age-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.age-input-wrapper input[type="number"] {
    width: 80px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.age-input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.age-unit {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.weight-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weight-input-wrapper input[type="number"] {
    width: 120px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.weight-input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.weight-input-wrapper select {
    width: 80px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.weight-input-wrapper select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.age-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.breakdown-item {
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.breakdown-item .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.breakdown-item span:not(.label) {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.life-stage-info {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stage-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.care-tips h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.care-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.care-tips li {
    padding: 0.5rem 0;
    color: #555;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.care-tips li::before {
    content: '🐕';
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* Mobile responsive adjustments for dog age calculator */
@media (max-width: 768px) {
    .age-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .age-input-wrapper input[type="number"] {
        width: 120px;
    }
    
    .weight-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .weight-input-wrapper input[type="number"],
    .weight-input-wrapper select {
        width: 100%;
    }
    
    .age-breakdown {
        grid-template-columns: 1fr;
    }
    
    .breakdown-item {
        text-align: center;
        padding: 1.25rem;
    }
    
    .life-stage-info {
        padding: 1.25rem;
    }
    
    .care-tips li {
        padding: 0.75rem 0;
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .age-input-wrapper {
        align-items: center;
    }
    
    .age-input-wrapper input[type="number"] {
        width: 100px;
        font-size: 1rem;
    }
    
    .age-unit {
        font-size: 0.9rem;
    }
    
    .breakdown-item .label {
        font-size: 0.8rem;
    }
    
    .breakdown-item span:not(.label) {
        font-size: 1rem;
    }
}

/* Mobile responsive adjustments for navigation */
@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .nav-links a {
        width: 200px;
        text-align: center;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}