* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: rgb(10, 10, 14);
    --bg: rgb(16, 16, 20);
    --bg-light: rgb(22, 22, 28);
    --panel: rgb(18, 18, 24);
    --panel-header: rgb(24, 24, 32);
    --topbar: rgb(14, 14, 18);
    --item: rgb(26, 26, 34);
    --item-hover: rgb(34, 34, 44);
    --border: rgb(38, 38, 50);
    --toggle-off: rgb(40, 40, 52);
    --text: rgb(230, 230, 240);
    --text-dim: rgb(100, 100, 120);
    --text-dark: rgb(65, 65, 80);
    --accent: rgb(200, 45, 55);
    --accent-hover: rgb(230, 52, 63);
    --accent-dim: rgba(200, 45, 55, 0.2);
    --danger: rgb(180, 50, 50);
    --success: rgb(50, 180, 80);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Background effects */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.glow-1 {
    top: 20%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: rgba(200, 45, 55, 0.08);
    animation: pulse-glow 4s ease-in-out infinite;
}

.glow-2 {
    bottom: 20%;
    right: 20%;
    width: 350px;
    height: 350px;
    background: rgba(200, 45, 55, 0.06);
    animation: pulse-glow 4s ease-in-out infinite 1s;
}

.glow-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: rgba(200, 45, 55, 0.04);
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    position: relative;
}

.logo-glow {
    position: absolute;
    inset: -4px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 50%;
    filter: blur(8px);
    animation: pulse-glow 2s ease-in-out infinite;
}

.logo-circle {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--panel);
    border: 1px solid rgba(200, 45, 55, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    overflow: hidden;
}

.logo-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-buttons {
    display: flex;
    gap: 16px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: var(--item);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--item-hover);
    color: var(--text);
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px rgba(200, 45, 55, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 25px rgba(200, 45, 55, 0.4);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Main */
.main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 32px 64px;
}

.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--text), var(--accent), var(--text));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 600px;
    line-height: 1.6;
}

/* Menu wrapper */
.menu-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.menu-glow {
    position: absolute;
    inset: -16px;
    background: var(--accent);
    opacity: 0.15;
    border-radius: 16px;
    filter: blur(30px);
}

/* Menu */
.menu {
    position: relative;
    width: 620px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid rgba(200, 45, 55, 0.3);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    user-select: none;
}

.menu-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 16px;
    background: var(--topbar);
    border-bottom: 1px solid var(--border);
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-logo-icon {
    position: relative;
    width: 32px;
    height: 32px;
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
    overflow: hidden;
}

.menu-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.menu-logo-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    filter: blur(4px);
    animation: pulse-glow 2s ease-in-out infinite;
}

.menu-logo-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.menu-tabs {
    display: flex;
    gap: 4px;
}

.menu-tab {
    width: 40px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s ease;
}

.menu-tab:hover {
    background: var(--item);
    color: var(--text);
}

.menu-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.menu-content {
    padding: 12px;
    min-height: 420px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Panel */
.panel {
    background: var(--panel);
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    padding: 8px 12px;
    background: var(--panel-header);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
}

.panel-content {
    padding: 10px 12px;
    max-height: 180px;
    overflow-y: auto;
}

.panel-note {
    font-size: 11px;
    color: var(--text-dark);
    margin-top: 4px;
}

.panel-warning {
    font-size: 12px;
    color: #ff9933;
    font-weight: 500;
    margin-bottom: 8px;
}

.panel-info-title {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

/* Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.toggle-label {
    font-size: 13px;
    color: var(--text-dim);
    transition: color 0.2s;
}

.toggle-row:hover .toggle-label {
    color: var(--text);
}

.toggle {
    position: relative;
    width: 34px;
    height: 16px;
    background: var(--toggle-off);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle.active {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(200, 45, 55, 0.4);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toggle.active .toggle-knob {
    left: 20px;
}

/* Slider */
.slider-row {
    padding: 6px 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.slider-label {
    font-size: 13px;
    color: var(--text-dim);
}

.slider-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.slider {
    position: relative;
    height: 8px;
}

.slider-track {
    position: absolute;
    inset: 0;
    background: var(--item);
    border-radius: 4px;
    overflow: hidden;
}

.slider-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.1s ease;
}

.slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Keybind */
.keybind-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.keybind-label {
    font-size: 13px;
    color: var(--text-dim);
}

.keybind-btn {
    min-width: 60px;
    padding: 4px 12px;
    background: var(--item);
    border: none;
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keybind-btn:hover {
    background: var(--item-hover);
}

.keybind-btn.waiting {
    background: var(--accent);
}

/* Combo */
.combo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.combo-label {
    font-size: 13px;
    color: var(--text-dim);
}

.combo {
    position: relative;
    min-width: 100px;
    padding: 4px 10px;
    background: var(--item);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

.combo:hover {
    background: var(--item-hover);
}

.combo-value {
    font-size: 12px;
    color: var(--text);
}

.combo-arrow {
    font-size: 10px;
    color: var(--text-dim);
    transition: transform 0.2s ease;
}

.combo.open .combo-arrow {
    transform: rotate(180deg);
}

.combo-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.combo.open .combo-dropdown {
    display: block;
}

.combo-option {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-dim);
    transition: all 0.15s ease;
}

.combo-option:hover {
    background: var(--item);
    color: var(--text);
}

.combo-option.selected {
    background: var(--accent-dim);
    color: var(--accent);
}

/* Danger button */
.danger-btn {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: var(--danger);
    border: none;
    border-radius: 5px;
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-btn:hover {
    background: rgb(210, 65, 65);
    box-shadow: 0 0 20px rgba(180, 50, 50, 0.4);
}

/* Menu hint */
.menu-hint {
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-dark);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-dim);
}

.form-group input {
    padding: 12px 16px;
    background: var(--item);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-dark);
}
