:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.12);
    --success: #10b981;
    --glass-bg: rgba(30, 41, 59, 0.75);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation: move 20s infinite alternate;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation: move 25s infinite alternate-reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 30%;
    right: 20%;
    animation: move 18s infinite linear;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo .icon {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

.logo h1 span {
    font-weight: 300;
    opacity: 0.6;
    margin-left: 0.5rem;
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
}

.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.calculator-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.select-wrapper,
.input-wrapper {
    position: relative;
}

select,
input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

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

option {
    background: #1e293b;
    color: white;
}

.actions {
    display: flex;
    justify-content: center;
}

.primary-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

.results-container {
    animation: fadeInUp 0.5s ease-out;
}

.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
}

.result-card h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.result-card .amount {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.percentage-change {
    font-size: 0.9rem;
    font-weight: 500;
}

.percentage-change.positive {
    color: var(--success);
}

.breakdown-card {
    padding: 2rem;
}

.breakdown-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.breakdown-item span:first-child {
    color: var(--text-muted);
}

.breakdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.breakdown-item.total {
    font-weight: 700;
    font-size: 1.2rem;
}

.breakdown-item.total span:last-child {
    color: var(--primary);
}

.info-note {
    padding: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 4px solid var(--primary);
}

.app-footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .result-card .amount {
        font-size: 2.5rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }
}