@charset "UTF-8";

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
    --input-bg: rgba(0, 0, 0, 0.2);
}

body.light-mode {
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #0891b2;
    --input-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.icon-sun {
    display: block;
}

.icon-moon {
    display: none;
}

body.light-mode .icon-sun {
    display: none;
}

body.light-mode .icon-moon {
    display: block;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.calculator-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.input-group {
    margin-bottom: 1.2rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.date-select-row {
    display: flex;
    gap: 0.5rem;
}

.select-mes {
    flex: 2;
}

.select-anio {
    flex: 1;
}


.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

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

.result-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.result-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    animation: fadeIn 0.5s ease forwards;
}

.hidden {
    display: none;
}

.result-header {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    text-align: center;
}

.result-item {
    display: flex;
    flex-direction: column;
}

.result-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.result-item strong {
    font-size: 1.1rem;
    color: var(--text-main);
}

#montoActualizado {
    color: var(--success);
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.animate-pop {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.detail-text {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chart-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    animation: fadeIn 0.5s ease forwards;
}

#evolutionChart {
    max-height: 300px;
    width: 100% !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    transition: all 0.2s ease;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.radio-label input[type="radio"] {
    width: auto;
    cursor: pointer;
    margin: 0;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 480px) {
    .grid-inputs {
        grid-template-columns: 1fr;
        gap: 0;
    }
}