/* === Rádio Algoritmo — Estilos partilhados === */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Variáveis */
:root {
    --primary:    #0a192f;
    --accent:     #64ffda;
    --text:       #ccd6f6;
    --muted:      #8892b0;
    --card:       #112240;
    --error:      #ff6b6b;
    --success:    #64ffda;
    --warning:    #f1fa8c;
    /* aliases de compatibilidade */
    --text-muted: #8892b0;
    --card-bg:    #112240;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary);
    color: var(--text);
    min-height: 100vh;
}

/* ── Navegação ─────────────────────────────────────────────── */
nav {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(100,255,218,0.1);
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    margin-right: 0.75rem;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}
.nav-brand:hover { opacity: 0.85; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(100,255,218,0.3);
    color: var(--accent);
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 0.28rem 0.6rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    border-color: rgba(100,255,218,0.3);
    background: rgba(100,255,218,0.05);
}

@media (max-width: 768px) {
    nav { flex-wrap: wrap; }
    .nav-brand { font-size: 0.9rem; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.1rem;
        background: #0d1f36;
        border: 1px solid rgba(100,255,218,0.12);
        border-radius: 10px;
        padding: 0.4rem;
        margin-top: 0.4rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 0.88rem; padding: 0.5rem 0.8rem; }
}

/* ── Contentores de página ──────────────────────────────────── */
.page      { max-width: 720px;  margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.page-wide { max-width: 960px;  margin: 0 auto; padding: 1.5rem 1rem 4rem; }

/* ── Tipografia ────────────────────────────────────────────── */
h1 { font-size: 1.4rem; color: #e6f1ff; margin-bottom: 0.3rem; }
h2 {
    font-size: 0.72rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}
.subtitle { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
section { margin-bottom: 2.5rem; }

/* ── Layout helpers ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 1.5rem 0;
    gap: 1rem;
}
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-header h2 { margin-bottom: 0; }
.section-sub { font-size: 0.72rem; color: var(--muted); font-family: monospace; }

/* ── Card section ───────────────────────────────────────────── */
.card-section {
    background: var(--card);
    border: 1px solid rgba(100,255,218,0.1);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 0.68rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* ── Botões ─────────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent);
    color: #0a192f;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(100,255,218,0.25);
    color: var(--text);
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(100,255,218,0.05); }

.btn-danger {
    background: transparent;
    border: 1px solid rgba(255,107,107,0.2);
    color: var(--muted);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger:hover { border-color: var(--error); color: var(--error); background: rgba(255,107,107,0.05); }

.btn-sm {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    border: 1px solid rgba(100,255,218,0.25);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); background: rgba(100,255,218,0.05); }
.btn-sm.danger:hover { border-color: var(--error); color: var(--error); background: rgba(255,107,107,0.05); }

/* ── Badges de categoria ────────────────────────────────────── */
.cat-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid;
    font-family: monospace;
}

/* ── Feedback de gravação ───────────────────────────────────── */
.save-feedback { font-size: 0.78rem; font-family: monospace; flex-shrink: 0; }
.fb-ok  { color: var(--accent); }
.fb-err { color: var(--error); }

/* ── Estado vazio ───────────────────────────────────────────── */
.empty { color: var(--muted); font-size: 0.85rem; padding: 2rem; text-align: center; }
