/* Age Calculator Styles */
.age-calculator-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.age-calculator-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: white;
}

.age-calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.age-calculator-header i {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.age-calculator-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 300;
}

.age-calculator-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group label i {
    color: #ffd700;
}

.birth-date-picker {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
}

.birth-date-picker:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.manual-input-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.manual-input-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.input-field input, .input-field select {
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.input-field select {
    cursor: pointer;
}

.manual-input-section button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.manual-input-section button:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.calculate-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.age-result {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.result-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.result-content i {
    font-size: 2em;
    color: #ffd700;
}

.result-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 500;
}

#age-display {
    font-size: 1.3em;
    font-weight: 600;
    color: #ffd700;
}

.detailed-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.result-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.birthday-info {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.birthday-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.birthday-content i {
    font-size: 2em;
    color: #ffd700;
}

.birthday-text h4 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #ffd700;
}

.birthday-countdown {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
    margin: 10px 0;
}

.birthday-message {
    font-size: 1.1em;
    margin: 10px 0;
}

.today-birthday {
    background: rgba(255, 105, 180, 0.3);
    border: 2px solid #ff69b4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.error-message {
    background: rgba(255, 87, 87, 0.2);
    border: 1px solid rgba(255, 87, 87, 0.5);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    color: #ff5757;
}

/* Loading Animation */
.calculate-btn.loading {
    position: relative;
    color: transparent;
}

.calculate-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.toggle-section {
    margin-top: 10px;
    text-align: center;
}

.toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.current-selection {
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .age-calculator-container {
        padding: 15px;
        max-width: 100%;
    }
    
    .age-calculator-card {
        padding: 20px;
    }
    
    .age-calculator-header h3 {
        font-size: 1.3em;
    }
    
    .birth-date-picker,
    .calculate-btn {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .result-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .result-content i {
        font-size: 1.8em;
    }

    .detailed-results {
        grid-template-columns: 1fr 1fr;
    }

    .manual-input-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .birthday-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .age-calculator-card {
        padding: 15px;
    }
    
    .age-calculator-header i {
        font-size: 2em;
    }
    
    .age-calculator-header h3 {
        font-size: 1.2em;
    }
    
    .input-group label {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .detailed-results {
        grid-template-columns: 1fr;
    }
}