/* Google Fonts importieren */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ==========================================
   CSS VARIABLE SYSTEM (Light / Dark Mode)
   ========================================== */

:root {
    /* Standard: Dark Mode (Premium & Emotional) */
    --font-primary: 'Outfit', sans-serif;
    
    --bg-app: #080311;
    --bg-gradient: linear-gradient(135deg, #0d0714 0%, #080311 100%);
    --bg-card: rgba(22, 14, 38, 0.7);
    --bg-card-hover: rgba(30, 20, 50, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(123, 44, 191, 0.5);
    
    --text-primary: #f8f9fa;
    --text-secondary: #a9a2b8;
    --text-muted: #6e6580;
    
    --primary: #7b2cbf;
    --primary-light: #9d4edd;
    --primary-dark: #5a189a;
    --primary-glow: rgba(123, 44, 191, 0.4);
    
    --accent-cyan: #00f5d4;
    --accent-pink: #ff4b91;
    --accent-orange: #ff9f1c;
    
    /* Ampelsystem */
    --rating-bad: #ff4b4b;
    --rating-neutral: #ffd166;
    --rating-good: #06d6a0;
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    
    --glass-blur: blur(16px);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --nav-height: 70px;
}

:root.light-mode {
    --bg-app: #f4f5f8;
    --bg-gradient: linear-gradient(135deg, #f0f2f5 0%, #e8ecf1 100%);
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-focus: rgba(123, 44, 191, 0.3);
    
    --text-primary: #1d1b26;
    --text-secondary: #5e5a6a;
    --text-muted: #8d8999;
    
    --primary: #7b2cbf;
    --primary-light: #9d4edd;
    --primary-dark: #5a189a;
    --primary-glow: rgba(123, 44, 191, 0.2);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   BASIS STYLES
   ========================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar Anpassung */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   APP CONTAINER & ROUTING
   ========================================== */

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 20px); /* Platz für Bottom-Nav */
}

@media (min-width: 768px) {
    #app {
        flex-direction: row;
        padding-bottom: 0;
        padding-left: 260px; /* Platz für Sidebar */
    }
}

.view-section {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
    animation: fadeIn var(--transition-normal);
}

.view-section.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   NAVIGATIONS-KOMPONENTEN
   ========================================== */

/* Bottom Navigation (Mobil) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: background var(--transition-normal), border var(--transition-normal);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    width: 20%;
    height: 100%;
    transition: color var(--transition-fast);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform var(--transition-fast), stroke var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--accent-cyan);
}

.nav-item.active svg {
    transform: translateY(-2px);
    stroke: var(--accent-cyan);
}

/* Sidebar Navigation (Desktop) */
.sidebar-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 32px 16px;
    flex-direction: column;
    z-index: 100;
    transition: background var(--transition-normal);
}

@media (min-width: 768px) {
    .bottom-nav { display: none; }
    .sidebar-nav { display: flex; }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 48px;
    gap: 12px;
}

.sidebar-logo svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-cyan);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    gap: 16px;
    transition: all var(--transition-fast);
}

.sidebar-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    transition: stroke var(--transition-fast);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.sidebar-item:hover svg {
    stroke: var(--text-primary);
}

.sidebar-item.active {
    background: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-item.active svg {
    stroke: var(--text-primary);
}

/* ==========================================
   UI ELEMENTE & GLASSMORPHISM CARDS
   ========================================== */

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.12);
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--text-primary) 30%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Knöpfe (Buttons) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #7b2cbf 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 75, 145, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 145, 0.4);
}

.btn-danger {
    background: rgba(255, 75, 75, 0.15);
    color: var(--rating-bad);
    border: 1px solid rgba(255, 75, 75, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 75, 75, 0.25);
    transform: translateY(-2px);
}

.btn-icon {
    padding: 10px;
    border-radius: 10px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   DASHBOARD-SPEZIFISCHE STYLES
   ========================================== */

.dashboard-header {
    margin-bottom: 32px;
}

.date-time-widget {
    font-size: 14px;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.greeting-widget {
    font-size: 24px;
    font-weight: 400;
}

.greeting-name {
    font-weight: 700;
    color: var(--primary-light);
}

/* Großer zentraler Mikrofon-Button */
.mic-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    margin-bottom: 32px;
    position: relative;
}

.mic-btn-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 24px;
}

.mic-btn-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.3;
    animation: pulse 2.5s infinite;
    z-index: 1;
}

.mic-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 2;
}

.mic-btn svg {
    width: 54px;
    height: 54px;
    stroke: #fff;
    fill: none;
    transition: transform var(--transition-normal);
}

.mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(123, 44, 191, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.mic-btn:hover svg {
    transform: scale(1.1);
}

.mic-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.3; }
    50% { transform: scale(1.25); opacity: 0.6; }
    100% { transform: scale(0.95); opacity: 0.3; }
}

/* Dashboard Statistik Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================
   RECORDING OVERLAY & CANVAS VISUALIZER
   ========================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 3, 17, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn var(--transition-fast);
}

.overlay.active {
    display: flex;
}

.recording-timer {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visualizer-container {
    width: 100%;
    max-width: 500px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.visualizer-canvas {
    width: 100%;
    height: 100%;
    background: #120c1f;
}

/* Status und Live-Transkript */
.recording-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recording-status .status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-pink);
    border-radius: 50%;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

.live-transcript-box {
    width: 100%;
    max-width: 500px;
    height: 100px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-y: auto;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
    font-style: italic;
}

.interim-text {
    color: var(--accent-cyan);
}

.recording-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.round-control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.round-control-btn-danger {
    background: rgba(255, 75, 75, 0.15);
    color: var(--rating-bad);
    border: 1px solid rgba(255, 75, 75, 0.3);
}

.round-control-btn-danger:hover {
    background: rgba(255, 75, 75, 0.3);
    transform: scale(1.05);
}

.round-control-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.round-control-btn-primary:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.round-control-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
}

/* Modus-Wahl vor Aufnahme (Öffentlich vs. Privat) */
.mode-selector {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 24px;
    max-width: 300px;
    width: 100%;
}

.mode-option {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.mode-option.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* ==========================================
   BEWERTUNGSMODAL (AMPELSYSTEM)
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 3, 17, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeIn var(--transition-fast);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    flex-grow: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Bewertungselemente (5-Punkte-System) */
.ratings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rating-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: all var(--transition-fast);
}

.rating-row:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.rating-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
}

/* 5-Punkte Selector */
.score-selector {
    display: flex;
    gap: 6px;
    align-items: center;
}

.score-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
}

.score-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Keine Angabe Button */
.score-btn-none {
    width: auto;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.score-btn-none:hover, .score-btn-none.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Farbige Score-Buttons (1=rot, 2=orange, 3=gelb, 4=hellgrün, 5=grün) */
.score-btn-1:hover, .score-btn-1.active {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
    border-color: #ff4b4b;
    box-shadow: 0 0 12px rgba(255, 75, 75, 0.25);
}

.score-btn-2:hover, .score-btn-2.active {
    background: rgba(255, 159, 28, 0.2);
    color: #ff9f1c;
    border-color: #ff9f1c;
    box-shadow: 0 0 12px rgba(255, 159, 28, 0.25);
}

.score-btn-3:hover, .score-btn-3.active {
    background: rgba(255, 209, 102, 0.2);
    color: #ffd166;
    border-color: #ffd166;
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.25);
}

.score-btn-4:hover, .score-btn-4.active {
    background: rgba(100, 220, 150, 0.2);
    color: #64dc96;
    border-color: #64dc96;
    box-shadow: 0 0 12px rgba(100, 220, 150, 0.25);
}

.score-btn-5:hover, .score-btn-5.active {
    background: rgba(6, 214, 160, 0.2);
    color: #06d6a0;
    border-color: #06d6a0;
    box-shadow: 0 0 12px rgba(6, 214, 160, 0.25);
}

/* Kommentar-Eingabe pro Kategorie */
.rating-comment-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 12.5px;
    outline: none;
    transition: all var(--transition-fast);
}

.rating-comment-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.rating-comment-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.25);
}

/* Tagesbewertung View */
.daily-rating-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.daily-rating-date-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 18px;
}

.daily-rating-date-nav button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.daily-rating-date-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 220px;
    text-align: center;
}

/* Gespeichert-Badge */
.saved-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(6, 214, 160, 0.1);
    color: var(--rating-good);
    border: 1px solid rgba(6, 214, 160, 0.2);
    animation: fadeIn var(--transition-fast);
}

/* Alte Ampel-Styles beibehalten für Abwärtskompatibilität */
.ampel-selector {
    display: flex;
    gap: 8px;
}

.ampel-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.ampel-btn-bad:hover, .ampel-btn-bad.active {
    background: rgba(255, 75, 75, 0.15);
    color: var(--rating-bad);
    border-color: var(--rating-bad);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.2);
}

.ampel-btn-neutral:hover, .ampel-btn-neutral.active {
    background: rgba(255, 209, 102, 0.15);
    color: var(--rating-neutral);
    border-color: var(--rating-neutral);
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.2);
}

.ampel-btn-good:hover, .ampel-btn-good.active {
    background: rgba(6, 214, 160, 0.15);
    color: var(--rating-good);
    border-color: var(--rating-good);
    box-shadow: 0 0 10px rgba(6, 214, 160, 0.2);
}

.transcript-edit-area {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    resize: none;
    outline: none;
    margin-top: 12px;
}

.transcript-edit-area:focus {
    border-color: var(--primary);
}

/* ==========================================
   EINTRAGSVERWALTUNG (LISTE & DETAIL)
   ========================================== */

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 600px) {
    .filter-bar {
        flex-direction: row;
    }
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.filter-select {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-width: 140px;
}

/* Eintrags-Karten */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.entry-card {
    cursor: pointer;
}

.entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.entry-meta {
    display: flex;
    flex-direction: column;
}

.entry-date {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.entry-time-duration {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.entry-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-private {
    background: rgba(255, 75, 145, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 75, 145, 0.25);
}

.badge-public {
    background: rgba(0, 245, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 245, 212, 0.2);
}

.badge-mood-good { background: rgba(6, 214, 160, 0.15); color: var(--rating-good); }
.badge-mood-neutral { background: rgba(255, 209, 102, 0.15); color: var(--rating-neutral); }
.badge-mood-bad { background: rgba(255, 75, 75, 0.15); color: var(--rating-bad); }

.entry-preview {
    font-size: 13.5px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 6px;
    line-height: 1.5;
}

/* Audio-Player */
.audio-player-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.audio-player-container audio {
    flex-grow: 1;
    height: 32px;
}

/* ==========================================
   KI-ASSISTENT & CHAT-UI
   ========================================== */

.chat-container {
    height: 450px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn var(--transition-fast);
}

.chat-message-user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-message-ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-input-bar {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.chat-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none;
    transition: border var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--primary);
}

/* KI Monatsanalyse */
.ki-analysis-box {
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.05) 0%, rgba(0, 245, 212, 0.05) 100%);
    border: 1px solid var(--border-color);
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loader-sparkle {
    font-size: 32px;
    animation: spin 2s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.analysis-markdown {
    font-size: 14.5px;
    line-height: 1.6;
}

.analysis-markdown h3 {
    margin-top: 20px;
    color: var(--accent-cyan);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 4px;
}

.analysis-markdown ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.analysis-markdown li {
    margin-bottom: 6px;
}

/* ==========================================
   PROFIL & EINSTELLUNGEN FORMULARE
   ========================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14.5px;
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

textarea.form-control {
    height: 80px;
    resize: vertical;
}

/* Status-Widget für Sicherheit */
.security-status-widget {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 75, 145, 0.05);
    border: 1px solid rgba(255, 75, 145, 0.15);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.security-status-widget.unlocked {
    background: rgba(6, 214, 160, 0.05);
    border-color: rgba(6, 214, 160, 0.15);
}

/* ==========================================
   AMPELWERTE AUSWERTUNGEN IN STATISTIKEN
   ========================================== */

.mood-traffic-light {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.traffic-good { background-color: var(--rating-good); }
.traffic-neutral { background-color: var(--rating-neutral); }
.traffic-bad { background-color: var(--rating-bad); }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.detail-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-badge-label {
    color: var(--text-muted);
}

.detail-badge-value {
    font-weight: 600;
}

.chart-wrapper {
    height: 250px;
    position: relative;
    width: 100%;
}

/* ==========================================
   AUTHENTIFIZIERUNG (Login / Register Overlay)
   ========================================== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 3, 17, 0.85); /* dunkler Hintergrund */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 9999; /* Immer über der restlichen App */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), 0 0 40px var(--primary-glow);
    text-align: center;
    animation: authFadeIn 0.5s ease-out forwards;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header svg {
    width: 64px;
    height: 64px;
    color: var(--primary-light);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a9a2b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 15px;
}

#auth-form {
    text-align: left;
}

#auth-form .input-group {
    margin-bottom: 20px;
}

#auth-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

#auth-form input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all var(--transition-normal);
}

#auth-form input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(123, 44, 191, 0.1);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.2);
}

.auth-error-msg {
    color: var(--rating-bad);
    background: rgba(255, 75, 75, 0.1);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 75, 75, 0.2);
    text-align: center;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}
