:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #16a34a;
    --danger: #dc2626;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    min-height: 100vh;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Vyer */
.view { display: none; flex-grow: 1; flex-direction: column; }
.view.active { display: flex; }
.hidden { display: none !important; }

/* Typografi & Inputs */
h1 { margin-bottom: 0.5rem; color: var(--primary); }
.subtitle { color: #6b7280; margin-top: 0; margin-bottom: 2rem; }

.input-group { margin-bottom: 1.5rem; }
label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* NYTT: Topp-navigation (Avbryt-knapp) */
.top-nav { display: flex; justify-content: flex-start; padding-bottom: 10px; }
.btn-text-small {
    background: none; border: none; color: #6b7280;
    font-size: 0.9rem; cursor: pointer; padding: 5px 0; font-weight: 600;
}
.btn-text-small:hover { color: var(--danger); text-decoration: underline; }

/* Knappar */
button { cursor: pointer; font-family: inherit; transition: all 0.2s; }

.btn-primary, .btn-success {
    width: 100%; padding: 16px; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: 700; color: white; margin-top: 10px;
}
.btn-primary { background-color: var(--primary); }
.btn-primary:active { background-color: var(--primary-dark); transform: scale(0.98); }

.btn-success { background-color: var(--success); }
.btn-secondary {
    background: #e0e7ff; color: var(--primary);
    border: none; padding: 12px 20px; border-radius: 8px; font-weight: 600;
}
.btn-danger-outline {
    background: transparent; border: 2px solid #fee2e2; color: var(--danger);
    padding: 10px 20px; border-radius: 8px; font-weight: 600;
}
.btn-secondary-small, .btn-danger-small {
    border: none; padding: 8px 15px; border-radius: 6px; font-weight: 600; font-size: 0.9rem;
}
.btn-secondary-small { background: #e0e7ff; color: var(--primary); }
.btn-danger-small { background: #fee2e2; color: var(--danger); }

/* Studio Specifikt */
.progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; margin-bottom: 2rem; }
#progress-fill { height: 100%; background: var(--success); transition: width 0.3s; }

.card { text-align: center; margin-bottom: auto; }
#word-display { font-size: 3.5rem; margin: 0; letter-spacing: 2px; text-transform: uppercase; }
#instruction-display { font-size: 1.2rem; color: #6b7280; margin-top: 5px; }
#visualizer { width: 100%; height: 80px; margin-top: 20px; background: #fafafa; border-radius: 8px; }

.controls-area { text-align: center; padding-bottom: 40px; }
#status-text { color: #6b7280; margin-bottom: 20px; min-height: 1.5em; }

/* Record Button */
.record-btn {
    width: 80px; height: 80px; border-radius: 50%; background: white;
    border: 4px solid #e5e7eb; position: relative; padding: 0;
}
.record-btn::after {
    content: ''; display: block; width: 60px; height: 60px;
    background: var(--danger); border-radius: 50%; margin: 6px auto; transition: all 0.2s;
}
.record-btn.recording { border-color: var(--danger); }
.record-btn.recording::after { transform: scale(0.5); border-radius: 4px; }

#post-record-controls { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* Review List */
.list-container { flex-grow: 1; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 20px; }
.review-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; border-bottom: 1px solid #f3f4f6;
}
.review-item.active { background-color: #eff6ff; border-left: 4px solid var(--primary); }
.item-info strong { display: block; font-size: 1.1rem; }
.item-info span { font-size: 0.8rem; color: #6b7280; }
.item-actions button {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e5e7eb;
    background: white; margin-left: 5px; font-size: 1.1rem;
}