:root {
    --bg: #0b0b0f;
    --card: #16161d;
    --card-hover: #1c1c26;
    --primary: #8b5cf6;
    --primary-soft: rgba(139, 92, 246, 0.15);
    --primary-hover: #7c3aed;
    --text: #f4f4f8;
    --text-muted: #9494a8;
    --success: #34d399;
    --border: #2a2a38;
    --radius: 18px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 28px 18px 50px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 8px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
}

/* Navigation */
.nav {
    display: flex;
    background: var(--card);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.nav a {
    flex: 1;
    text-align: center;
    padding: 11px 8px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav a.active {
    background: var(--primary-soft);
    color: #c4b5fd;
}

.nav a:hover:not(.active) {
    color: var(--text);
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-number {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    margin-top: 12px;
}

.btn-secondary:hover {
    border-color: #4a4a5a;
    color: var(--text);
}

.btn-limiar {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    font-size: 1.2rem;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.4);
    border: none;
}

.btn-limiar:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(139, 92, 246, 0.5);
}

.btn-audio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 8px auto 16px;
}

.btn-audio:hover {
    background: rgba(139, 92, 246, 0.25);
}

.btn-audio.playing {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Tipos de limiar */
.tipos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tipo-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 18px 12px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tipo-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: #c4b5fd;
    transform: translateY(-2px);
}

.tipo-btn span {
    font-size: 1.5rem;
}

/* Experiência */
.experiencia-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 24px;
    border-radius: 16px;
    margin: 8px 0 4px;
    font-size: 1.2rem;
    line-height: 1.65;
    text-align: center;
    color: #e9e5ff;
}

.tipo-label {
    display: inline-block;
    background: var(--primary-soft);
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 13px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-success {
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

/* Histórico */
.historico-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.historico-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.historico-tipo {
    font-size: 0.75rem;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.historico-data {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 36px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Pequenas animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.35s ease;
}
