:root {
    --primary-hue: 210;
    /* Blue */
    --primary: hsl(var(--primary-hue), 90%, 50%);
    --primary-dark: hsl(var(--primary-hue), 90%, 40%);
    --accent: hsl(180, 80%, 45%);
    /* Teal */
    --bg-light: hsl(210, 20%, 96%);
    --text-dark: hsl(210, 20%, 20%);
    --text-dim: hsl(210, 10%, 50%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: hsl(210, 100%, 90%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: hsl(180, 100%, 90%);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: hsl(250, 100%, 92%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.calculator-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

header p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Form Elements */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

input[type="number"] {
    width: 100%;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    padding: 1rem;
    padding-right: 2.5rem;
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-hue), 90%, 50%, 0.1);
}

.currency-symbol,
.percent-symbol {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

/* Radio Cards */
.radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.radio-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.radio-card.selected {
    background: rgba(var(--primary-hue), 90%, 50%, 0.05);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-hue), 90%, 50%, 0.1);
}

.radio-card .year {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.radio-card .rate {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.radio-card.selected .rate {
    color: var(--primary);
    font-weight: 500;
}

/* Button */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), hsl(230, 80%, 60%));
    border: none;
    border-radius: var(--radius);
    padding: 1rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(var(--primary-hue), 90%, 50%, 0.2);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(var(--primary-hue), 90%, 50%, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Info Text */
.info-text {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.info-text strong {
    color: var(--text-dark);
}

/* Results */
.result-section {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.result-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-row span:first-child {
    color: var(--text-dim);
}

.result-row .value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.highlight {
    color: var(--primary);
}

.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 1rem 0;
}

.total .value {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.legal-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
}

.hidden {
    display: none;
}