:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --border-color: rgba(148, 163, 184, 0.2);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Theme */
:root[data-theme="light"] {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #0f172a;
    --text-muted: #475569;
    --input-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(15, 23, 42, 0.1);
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .blob {
    opacity: 0.2;
}

:root[data-theme="light"] .blob-1 {
    background: var(--secondary-color);
}

:root[data-theme="light"] .blob-2 {
    background: var(--primary-color);
}

:root[data-theme="light"] .blob-3 {
    background: #a78bfa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.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.4;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #8b5cf6;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-top: 50px;
}

/* Control Buttons */
.controls {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.control-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    display: inline-block;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.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: var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-wrapper,
.range-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"],
.calc-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 50px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus,
.calc-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

.currency-suffix,
.icon-suffix {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

input[type="range"] {
    width: 100%;
    margin-right: 15px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

output {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 25px;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.result-container {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none;
}

.result-container h2 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.result-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.contact-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: left;
    animation: fadeIn 0.5s ease 0.3s forwards;
    opacity: 0;
}

.contact-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

.contact-section .form-group {
    margin-bottom: 15px;
}

.contact-section input[type="text"],
.contact-section input[type="email"],
.contact-section input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.contact-section input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--secondary-color);
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    cursor: pointer;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3);
}

.form-message {
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

.form-message.success {
    color: #4ade80;
}

.form-message.error {
    color: #f87171;
}

/* Interest Buttons */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.interests-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}

.interest-btn {
    flex: 1 1 calc(50% - 10px);
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.interest-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-color);
}

.interest-btn.selected {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Clause Styles */
.clause-section {
    margin-top: 15px;
    text-align: center;
}

.clause-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.clause-toggle:hover {
    color: var(--primary-color);
}

.clause-content {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: justify;
    line-height: 1.4;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}