:root {
    --text-color: #1e293b;
    --accent: #4f46e5;
    --button-hover: #4338ca;
    --grad-start: #e0e0e0 ;
    --grad-end: #c1ced6;
    --calc-background: rgba(180, 180, 180, 0.2);
    --punel-background: rgba(255, 255, 255, 0.3);;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f1f5f9;
        --accent: #818cf8;
        --button-hover: #6366f1;
        --grad-start: #2c3e50 ;
        --grad-end: #262626 ;
        --calc-background: rgba(255, 255, 255, 0.1);
        --punel-background: rgba(100, 100, 100, 0.2);;
    }
}
@media (hover: hover) {
    input:hover,
    .op-btn:hover,
    .equals-btn:hover,
    .clear-btn:hover {
        transform: scale(0.98);
    }
}
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .panel {
        padding: 16px;
        border-radius: 16px;
    }

    h2 {
        font-size: 18px;
    }

    input[type="text"], .base-select {
        font-size: 14px;
        padding: 10px;
    }

    .op-btn {
        padding: 12px;
        font-size: 18px;
    }

    .equals-btn, .clear-btn {
        width: 50px;
        font-size: 18px;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    background: #000;
}
body {
    font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif;
    background: linear-gradient(120deg, var(--grad-start) 20%, var(--grad-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-color);
    margin: 0;
}

.app-container {
    display: flex;
    gap: 30px;
    max-width: 1000px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.panel {
    flex: 1 1 400px;
    background: var(--calc-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.2s;
}
.panel:hover{
    transform: translateY(-3px);
} 
.panel h2 {
    margin-bottom: 20px;
    font-weight: bold;
    letter-spacing: -0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.control-group {
    margin-bottom: 18px;
}

.control-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    opacity: 0.9;
}

.base-select, input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 16px;
    background: var(--punel-background);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.1);
    outline: none;
    transition: all 0.2s;
    font-family: 'Andale Mono', monospace;
}
.base-select:hover{
    transform: scale(0.98);
    background: var(--accent);
    color: white;
}

/* Добавляем явные стили для опций */
.base-select option {
    background: rgba(193, 206, 214, 0.2);;
    color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
    .base-select option {
        background: rgba(38, 38, 38, 1);
        color: #f1f5f9;
    }
}

input[type="text"]:focus, .base-select:focus {
    background: var(--punel-background);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.9);
    font-weight: bold;
}
input:hover{
    transform: scale(0.98);
    background: var(--accent);
    color: white;
}

.result-with-button {
    display: flex;
    gap: 8px;
}

.result-with-button input {
    flex: 1;
}

#transfer-btn {
    width: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#transfer-btn:hover {
    background: var(--button-hover);
    transform: scale(0.96);
}
#transfer-btn:active{
    transform: translateY(1px);
}

.base-equals-wrapper {
    display: flex;
    gap: 8px;
}

.base-equals-wrapper select {
    flex: 1;
}

.equals-btn {
    width: 70px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.equals-btn:hover {
    background: #059669;
    transform: scale(0.96);
}
.equals-btn:active{
    transform: translateY(1px);
}

.operations {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.op-btn {
    padding: 16px;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.1);
}

.op-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(0.96);
}
.op-btn:active{
    transform: translateY(1px);
}

#calc-input, #calc-answer {
    background: var(--punel-background);
    font-family: 'Andale Mono', monospace;
    font-size: 18px;
    font-weight: bold;
}
#calc-input:hover{
    transform: scale(0.98);
    background: var(--accent);
    color: white;}
#calc-answer:hover{
    transform: scale(0.98);
    background: var(--accent);
    color: white;
}

/* Адаптивность */
@media (max-width: 850px) {
    .app-container {
        flex-direction: column;
        align-items: stretch;
    }
    .panel {
        min-width: auto;
    }
}
.clear-btn {
    width: 50px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.clear-btn:hover {
    background: #dc2626;
    transform: scale(0.96);
}
.clear-btn:active{
    transform: translateY(1px);
}
