/* Age Calculator Styles */

.age-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.age-calculator-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: white;
    position: relative;
    overflow: hidden;
}

.age-calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.age-calculator-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.age-calculator-header h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.age-calculator-header i {
    margin-right: 10px;
    color: #ffd700;
}

.age-calculator-form {
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.form-group label i {
    margin-right: 8px;
    color: #ffd700;
}

.birth-datetime-picker {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.birth-datetime-picker::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.birth-datetime-picker:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.calculate-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 12px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 215, 0, 0.4);
}

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

.calculate-btn i {
    margin-right: 10px;
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.age-result {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-header h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffd700;
}

.result-header i {
    margin-right: 10px;
}

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

.age-unit {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.age-unit:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.age-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.age-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.last-updated {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.last-updated i {
    margin-right: 5px;
    color: #ffd700;
}

.loading-spinner {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 600;
}

.loading-spinner i {
    margin-right: 10px;
    color: #ffd700;
    font-size: 20px;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: none;
    font-family: inherit;
}

.flatpickr-day.selected {
    background: #667eea;
    border-color: #667eea;
}

.flatpickr-day.selected:hover {
    background: #5a6fd8;
}

.flatpickr-time input {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .age-calculator-container {
        padding: 15px;
    }
    
    .age-calculator-card {
        padding: 25px 20px;
    }
    
    .age-calculator-header h3 {
        font-size: 24px;
    }
    
    .age-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .age-number {
        font-size: 20px;
    }
    
    .age-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .age-calculator-card {
        padding: 20px 15px;
    }
    
    .age-calculator-header h3 {
        font-size: 20px;
    }
    
    .birth-datetime-picker {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .calculate-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .age-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .age-unit {
        padding: 10px 8px;
    }
    
    .age-number {
        font-size: 18px;
    }
    
    .age-label {
        font-size: 10px;
    }
}

/* Animation for age updates */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.age-result {
    animation: fadeInUp 0.5s ease-out;
}

.age-number {
    transition: all 0.3s ease;
}

.age-number.updated {
    animation: pulse 0.6s ease-in-out;
}

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

/* Error message styling */
.error-message {
    background: rgba(255, 99, 71, 0.2);
    border: 1px solid rgba(255, 99, 71, 0.5);
    color: #ff6347;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

/* Success message styling */
.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
} 