/**
 * Age Calculator - Specific styles
 * Theme-aware with light/dark mode support
 */

.age-calculator-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e5e7eb;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid #374151;
    border-radius: 8px;
    font-size: 1rem;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.9);
    transition: all 0.2s ease;
}

.form-input:hover {
    border-color: #4b5563;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .form-input {
    flex: 1;
}

.btn-today {
    padding: 0.75rem 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid #374151;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-today:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: #4b5563;
}

.calculate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

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

.calculate-btn svg {
    width: 20px;
    height: 20px;
}

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid #1f2937;
    border-radius: 16px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

/* Age Display */
.age-display {
    text-align: center;
}

.age-exact {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 12px;
    border: 2px solid #6366f1;
}

.age-exact-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.age-exact-value {
    font-size: 2rem;
    font-weight: 700;
    color: #818cf8;
    line-height: 1.2;
}

/* Age Breakdown */
.age-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.age-breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid #1f2937;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.age-breakdown-item:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.breakdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #818cf8;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.breakdown-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Age Units */
.age-units {
    padding-top: 1rem;
    border-top: 2px solid #1f2937;
}

.units-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0 0 1rem 0;
}

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

.unit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

.unit-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.unit-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
}

/* Next Birthday */
.next-birthday {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
}

.birthday-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0 0 1rem 0;
}

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

.birthday-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.birthday-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.birthday-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #34d399;
}

/* Custom Modal Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    background: #0f172a;
    border: 2px solid #1f2937;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.modal-icon svg {
    width: 48px;
    height: 48px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0 0 0.5rem 0;
}

.modal-message {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0 0 1.5rem 0;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background: #6366f1;
    color: white;
}

.modal-btn-primary:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .age-breakdown {
        grid-template-columns: 1fr;
    }

    .breakdown-value {
        font-size: 2rem;
    }

    .age-exact-value {
        font-size: 1.5rem;
    }

    .units-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .birthday-info {
        grid-template-columns: 1fr;
    }

    .input-with-button {
        flex-direction: column;
    }

    .btn-today {
        width: 100%;
    }

    .result-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .breakdown-value {
        font-size: 1.75rem;
    }

    .age-exact-value {
        font-size: 1.25rem;
    }

    .unit-value {
        font-size: 1.25rem;
    }
}

