/* Audio Spectrum Analyzer — Emerald Green Theme */
:root {
    --primary: #00B894;
    --secondary: #55EFC4;
    --accent: #FDCB6E;
    --bg: #0A1A14;
    --bg-card: rgba(12, 28, 22, 0.85);
    --border: rgba(0, 184, 148, 0.12);
    --text: #E2F0E8;
    --text-sec: #7FCCB0;
    --text-muted: #5BA88C;
    --radius: 12px;
    --font: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased
}

.app {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem
}

.header {
    text-align: center;
    margin-bottom: 1rem
}

.header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.subtitle {
    font-size: .82rem;
    color: var(--text-sec)
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem
}

.view-tabs {
    display: flex;
    gap: .3rem
}

.tab {
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 100px;
    font-family: var(--font);
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-sec);
    cursor: pointer;
    transition: all .2s
}

.tab:hover {
    border-color: var(--primary)
}

.tab.active {
    background: rgba(0, 184, 148, .12);
    border-color: var(--primary);
    color: var(--text)
}

select {
    padding: .35rem .5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    font-size: .78rem;
    outline: none
}

canvas {
    width: 100%;
    border-radius: var(--radius);
    background: rgba(10, 26, 20, .7);
    border: 1px solid var(--border);
    margin-bottom: .75rem
}

.info-row {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .4rem .8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px
}

.info-label {
    font-size: .65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase
}

.info-value {
    font-size: .9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary)
}

.btn-start {
    width: 100%;
    padding: .65rem;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0A1A14;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s
}

.btn-start:hover {
    transform: translateY(-2px)
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: .55rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .82rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    opacity: 0;
    transition: all .3s;
    z-index: 100;
    pointer-events: none
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

.hidden {
    display: none !important
}