:root {
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --col-outer: #22c55e;
    --col-padding: #ec4899;
    --col-inner: #8b5cf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 900px;
    position: relative;
}

.lang-switch {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
}

select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-family: inherit;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    min-width: 100px;
}

select:hover {
    border-color: #d1d5db;
}

.main-title {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--text-main);
    font-weight: 600;
}

.formula-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-weight: 600;
}

.pill {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.pill-outer { background: #dcfce7; color: #15803d; }
.pill-padding { background: #fce7f3; color: #be185d; }
.pill-inner { background: #f3e8ff; color: #7e22ce; }

.operator { color: var(--text-muted); font-size: 18px; }

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

@media (max-width: 768px) {
    .calculator-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .lang-switch {
        position: relative;
        top: 0;
        right: 0;
        text-align: right;
        margin-bottom: 20px;
    }
}

.input-group { margin-bottom: 24px; }

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-main);
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-outer { background: var(--col-outer); }
.dot-padding { background: var(--col-padding); }
.dot-inner { background: var(--col-inner); }

.input-wrapper { position: relative; display: flex; align-items: center; }

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: all 0.2s;
}

input[type="number"]:focus {
    border-color: var(--col-inner);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.unit {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.divider {
    height: 1px;
    background: #f3f4f6;
    margin: 20px 0;
}

.slider {
    width: 100%;
    margin-top: 12px;
    -webkit-appearance: none;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
.slider-outer::-webkit-slider-thumb { background: var(--col-outer); }
.slider-padding::-webkit-slider-thumb { background: var(--col-padding); }
.slider-inner::-webkit-slider-thumb { background: var(--col-inner); }

.preview-area {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #e5e7eb;
    border-radius: 16px;
    background: #fcfcfc;
    min-height: 320px;
}

.box-outer {
    width: 260px;
    height: 260px;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid var(--col-outer);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.box-inner {
    width: 100%;
    height: 100%;
    background: #f3e8ff;
    border: 2px solid var(--col-inner);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-note {
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
