@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: 15px;
    --accent: #fda085;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 20px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Background Blobs */
.bg-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 450px;
    height: 450px;
    background: var(--primary-gradient);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.15;
    animation: move 18s infinite alternate;
}

.blob-2 {
    right: -5%;
    bottom: -10%;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    animation-delay: -9s;
}

@keyframes move {
    from {
        transform: translate(-10%, -5%);
    }

    to {
        transform: translate(10%, 15%);
    }
}

/* Calculator Card */
.calculator-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 40px;
    width: 95%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 35px;
}

header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #94a3b8;
    margin-top: 8px;
    font-size: 0.95rem;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.mode-option {
    flex: 1;
    position: relative;
    text-align: center;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.mode-option label {
    display: block;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    border-radius: 12px;
    transition: all 0.3s;
}

.mode-option input:checked+label {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mode-option.active label {
    color: white;
}

/* Inputs */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 35px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--accent);
    font-weight: 800;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 15px 14px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
}

/* Result Card */
.result-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-label {
    color: #94a3b8;
    font-weight: 600;
}

.res-value {
    font-size: 1.4rem;
    font-weight: 800;
}

.result-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 15px 0;
}

.result-item.highlight .res-label {
    color: white;
    font-size: 1.1rem;
}

.result-item.highlight .res-value {
    color: #43e97b;
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(67, 233, 123, 0.3);
}

/* Meter */
.savings-meter-container {
    margin-bottom: 35px;
}

.meter-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.meter-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 15px rgba(253, 160, 133, 0.3);
}

.clear-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: #94a3b8;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: white;
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .res-value {
        font-size: 1.2rem;
    }

    .result-item.highlight .res-value {
        font-size: 1.6rem;
    }
}