@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;500;800&display=swap');

:root, .theme-dark {
    --body-bg: #050421;
    --main-font: 'JetBrains Mono', monospace;
    --card-radius: 24px;
    --glass-bg: rgba(10, 12, 18, 0.55);
    --primary-color: #818cf8;
    --text-main: #e2e8f0;
    --text-muted: rgba(255, 255, 255, 0.4);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-text: #e2e8f0;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-red: #ef4444;
    --refraction: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.04) 60%,
        rgba(255, 255, 255, 0.09) 100%
    );
}

.theme-light {
    --body-bg: #f8fafc;
    --main-font: 'Plus Jakarta Sans', sans-serif;
    --card-radius: 24px;
    --glass-bg: #ffffff;
    --primary-color: #2563eb;
    --refraction: none;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: #ffffff;
    --input-border: #dbe3ee;
    --input-text: #0f172a;
    --accent-blue: #3b82f6;
    --accent-emerald: #047857;
    --accent-red: #dc2626;
}

.theme-light .liquid-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 8px 16px -3px rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.theme-light .liquid-card::before {
    display: none;
}

.theme-light .cfg-input {
    background-color: #ffffff;
    color: #0f172a;
    border-color: #dbe3ee;
}

.theme-light .cfg-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--body-bg);
    font-family: var(--main-font);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -15%;
    left: 18%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: 5%;
    width: 540px;
    height: 540px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.theme-light::before,
.theme-light::after {
    display: none;
}

.liquid-card {
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.075);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.07), 0 8px 28px rgba(0, 0, 0, 0.45);
    border-radius: var(--card-radius);
}

.liquid-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--refraction);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.ui-text-main {
    color: var(--text-main) !important;
}

.ui-text-soft {
    color: var(--text-muted) !important;
}

.ui-accent-blue {
    color: var(--accent-blue) !important;
}

.ui-accent-emerald {
    color: var(--accent-emerald) !important;
}

.ui-accent-red {
    color: var(--accent-red) !important;
}

.cfg-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--input-text);
    outline: none;
    transition: border-color 0.15s;
}

.cfg-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.cfg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--main-font);
}

.cfg-btn-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.cfg-btn-primary:hover {
    background: rgba(99, 102, 241, 0.25);
}

.theme-dark .status-led {
    color: var(--accent-emerald);
    background: var(--accent-emerald);
}

.theme-light .status-led {
    color: var(--accent-emerald);
    background: var(--accent-emerald);
}
