/* ===== Modern Dark Theme - GitHub/VS Code Inspired ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* VS Code / GitHub Dark Color Palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --text-muted: #484f58;
    
    --accent-primary: #2f81f7;
    --accent-hover: #58a6ff;
    
    --success: #3fb950;
    --success-hover: #56d364;
    
    --border-default: #30363d;
    --border-muted: #21262d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 14px;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
}

/* ===== Header ===== */
header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-default);
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== Main Content ===== */
main {
    padding: 24px;
}

section {
    margin-bottom: 24px;
}

section:last-child {
    margin-bottom: 0;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ===== Control Groups ===== */
.control-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ===== Select Dropdown ===== */
select {
    width: 100%;
    padding: 5px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    height: 32px;
}

select:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

select:focus {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    outline: 2px solid var(--accent-primary);
    outline-offset: -1px;
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ===== Buttons ===== */
.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    flex: 1;
    min-width: 120px;
    height: 32px;
    position: relative;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--success);
    color: #ffffff;
    border-color: rgba(240, 246, 252, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: var(--success-hover);
    border-color: rgba(240, 246, 252, 0.1);
}

.btn-primary:active:not(:disabled) {
    background: var(--success);
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-secondary:active:not(:disabled) {
    background: var(--bg-tertiary);
    transform: scale(0.98);
}

.btn-secondary.bypassed {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.btn-secondary.bypassed:hover:not(:disabled) {
    background: var(--bg-tertiary);
}

/* ===== Meters Section ===== */
.meters-section {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-default);
}

.meter-container {
    margin-bottom: 16px;
}

.meter-container:last-child {
    margin-bottom: 0;
}

.meter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

canvas {
    display: block;
    width: 100%;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-default);
}

/* ===== Footer ===== */
footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-default);
}

/* Hide the status bar as requested */
.status {
    display: none;
}

.credits {
    text-align: center;
}

.credits p {
    font-size: 12px;
    color: var(--text-secondary);
}

.credits a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.credits a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: 100vh;
    }
    
    header {
        padding: 20px 16px 16px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    main {
        padding: 16px;
    }
    
    footer {
        padding: 16px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-width: unset;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 6px;
    border: 3px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
    background: rgba(47, 129, 247, 0.25);
}

::-moz-selection {
    background: rgba(47, 129, 247, 0.25);
}