/* Age Calculator Main Styles */
.age-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.age-calculator-form {
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 18px;
    z-index: 2;
}

.birth-datetime-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.birth-datetime-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.calculate-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Age Result Styles */
.age-result {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.result-header i {
    font-size: 40px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.result-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.age-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.age-unit {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.age-unit:hover {
    transform: translateY(-5px);
    background: #e9ecef;
}

.age-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.age-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Error Message Styles */
.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    animation: shake 0.5s ease;
}

.error-message i {
    margin-right: 10px;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.flatpickr-month {
    border-radius: 15px 15px 0 0;
}

.flatpickr-day.selected {
    background: #667eea;
    border-color: #667eea;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .age-calculator-container {
        margin: 20px;
        padding: 20px;
    }
    
    .age-breakdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .age-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .age-calculator-container {
        margin: 10px;
        padding: 15px;
    }
    
    .age-breakdown {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .birth-datetime-input {
        padding: 12px 12px 12px 45px;
        font-size: 14px;
    }
    
    .calculate-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Loading State */
.calculate-btn.loading {
    position: relative;
    color: transparent;
}

.calculate-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}