/* Age Calculator Main Styles */
.age-calculator-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

.age-calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.age-calculator-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.age-calculator-header h2 i {
    margin-right: 15px;
    color: #ffd700;
}

.description {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Form Styles */
.age-calculator-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
}

.form-group label i {
    margin-right: 10px;
    color: #6e8efb;
}

.birth-date-picker,
.birth-time-select {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.birth-date-picker:focus,
.birth-time-select:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 45px;
    color: #6e8efb;
    font-size: 18px;
}

/* Button Styles */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(110, 142, 251, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Results Styles */
.age-result-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.result-header h3 i {
    color: #ff6b6b;
    margin-right: 10px;
}

.age-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.age-unit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.age-unit:hover {
    transform: translateY(-5px);
}

.unit-value {
    font-size: 2.5em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.unit-value.changing {
    color: #ffd700;
    transform: scale(1.1);
}

.unit-label {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unit-icon {
    font-size: 1.5em;
    color: #ffd700;
}

.detailed-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #6e8efb;
}

.detailed-result p {
    margin: 0;
    color: #333;
    font-size: 1.1em;
}

.detailed-result i {
    color: #6e8efb;
    margin-right: 10px;
}

#detailed_age {
    font-weight: 600;
    color: #667eea;
}

/* Footer */
.age-calculator-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.age-calculator-footer p {
    margin: 0;
    opacity: 0.8;
}

.age-calculator-footer i {
    margin-right: 8px;
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .age-calculator-container {
        padding: 20px;
        margin: 15px;
    }
    
    .age-calculator-header h2 {
        font-size: 2em;
    }
    
    .age-result {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .age-calculator-form,
    .age-result-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .age-calculator-header h2 {
        font-size: 1.6em;
    }
    
    .age-result {
        grid-template-columns: 1fr;
    }
    
    .birth-date-picker,
    .birth-time-select {
        padding: 12px 40px 12px 15px;
    }
    
    .input-icon {
        right: 15px;
        top: 42px;
    }
}

/* Datepicker Customization */
.ui-datepicker {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ui-datepicker-header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 8px 8px 0 0;
}

.ui-datepicker-title select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
}

.ui-state-default,
.ui-widget-content .ui-state-default {
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    color: #333;
    text-align: center;
    border-radius: 4px;
}

.ui-state-highlight,
.ui-widget-content .ui-state-highlight {
    border: 1px solid #6e8efb;
    background: #6e8efb;
    color: white;
}

.ui-state-active,
.ui-widget-content .ui-state-active {
    border: 1px solid #a777e3;
    background: #a777e3;
    color: white;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}