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

/* CSS-Variablen für dunkles Theme */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --bg-card-hover: #3a3a3a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --accent-red: #d64570;
    --accent-red-hover: #c23456;
    --accent-blue: #4a90e2;
    --accent-blue-hover: #357abd;
    --accent-green: #5cb85c;
    --accent-green-hover: #4cae4c;
    --accent-yellow: #f0ad4e;
    --accent-yellow-hover: #ec971f;
    --accent-purple: #8e44ad;
    --accent-purple-hover: #7d3c98;
    --border-color: #444444;
    --border-color-light: #555555;
    --shadow-dark: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-light: 0 2px 8px rgba(0,0,0,0.2);
}

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

/* Briefing Page Styles */
.briefing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.briefing-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-dark);
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideUp 0.6s ease-out;
    border: 1px solid var(--border-color);
}

.briefing-header {
    text-align: center;
    margin-bottom: 40px;
}

.briefing-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.briefing-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.briefing-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.briefing-input-container {
    position: relative;
}

.briefing-textarea {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.copy-placeholder-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(212, 69, 112, 0.1);
    border: 1px solid rgba(212, 69, 112, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 0.9rem;
    color: var(--accent-red);
    box-shadow: var(--shadow-light);
}

.copy-placeholder-btn:hover {
    background: rgba(212, 69, 112, 0.2);
    border-color: rgba(212, 69, 112, 0.5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-dark);
}

.copy-placeholder-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

.copy-placeholder-btn.success {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.copy-placeholder-btn .btn-icon {
    font-size: 1rem;
}

.briefing-textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(212, 69, 112, 0.2);
}

.briefing-textarea::placeholder {
    color: var(--text-muted);
    line-height: 1.6;
}

.start-session-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-dark);
}

.start-session-btn:hover:not(:disabled) {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 69, 112, 0.4);
}

.start-session-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.start-session-btn-dark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-dark);
}

.start-session-btn-dark:hover:not(:disabled) {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 69, 112, 0.4);
}

.start-session-btn-dark:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.briefing-status {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.briefing-status .status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Chat Page Styles */
.chat-page {
    display: none;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Top Header Bar */
.top-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
}

.header-left {
    display: flex;
    align-items: center;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 1.5rem;
}

.app-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.session-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.session-id {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: monospace;
    font-weight: 400;
}

.status-indicator-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 20px;
}

.toggle-recognition-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #8B4B6B;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-recognition-btn:hover:not(:disabled) {
    background: #A85A7A;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 75, 107, 0.2);
}

.toggle-recognition-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.toggle-recognition-btn.listening {
    background: #dc3545;
    animation: recordingPulse 1.5s infinite;
}

.toggle-recognition-btn.listening:hover:not(:disabled) {
    background: #c82333;
}

@keyframes recordingPulse {
    0% { 
        background: #dc3545;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    50% { 
        background: #e74c3c;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.6);
    }
    100% { 
        background: #dc3545;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
}

.header-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    transition: all 0.3s ease;
}

.header-indicator.listening {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

.header-indicator.processing {
    background: #f59e0b;
}

.header-status {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    padding-right: 320px; /* Platz für 280px Sidebar + 40px Abstand */
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

/* Main Content */
main {
    flex: 1;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tasks Dashboard */
.tasks-dashboard {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-title {
    flex: 1;
}

.dashboard-title h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.start-session-btn-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-light);
    flex-shrink: 0;
}

.start-session-btn-compact:hover:not(:disabled) {
    background: var(--accent-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-dark);
}

.start-session-btn-compact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.start-session-btn-compact .btn-icon {
    font-size: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-blue-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
}

/* Tasks List */
.tasks-list-container {
    margin-bottom: 25px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    transition: all 0.2s ease;
    animation: taskItemAppear 0.4s ease-out;
    cursor: pointer;
    box-shadow: var(--shadow-light);
}

.task-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-comment {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--border-color);
    margin-left: 39px;
}

.task-item.negative {
    border-left-color: var(--accent-red);
    background: var(--bg-card-hover);
}

.task-item.very-negative {
    border-left-color: var(--accent-red);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 1px rgba(214, 69, 112, 0.2);
}

/* Quality-basierte farbige Rahmen */
.task-item.quality-good {
    border-left-color: var(--accent-green);
}

.task-item.quality-partial {
    border-left-color: var(--accent-yellow);
}

.task-item.quality-poor {
    border-left-color: var(--accent-red);
}

.task-item.quality-insufficient {
    border-left-color: var(--accent-red);
    box-shadow: 0 0 0 1px rgba(214, 69, 112, 0.2);
}

/* Deutsche Quality-Werte */
.task-item.quality-gut {
    border-left-color: var(--accent-green);
}

.task-item.quality-teilweise {
    border-left-color: var(--accent-yellow);
}

.task-item.quality-schlecht {
    border-left-color: var(--accent-red);
}

.task-item:hover {
    box-shadow: var(--shadow-dark);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.task-item.completed {
    border-left-color: var(--accent-green);
    opacity: 0.85;
    padding: 16px 20px;
}

.task-item.completed .task-label {
    font-size: 1rem;
    color: var(--accent-green);
}

.task-item.completed .task-comment {
    display: none;
}

.task-item.new {
    animation: taskItemHighlight 1s ease-out;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.task-checkbox.completed {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.task-checkbox.completed::after {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

.task-label {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 600;
}

.task-item.completed .task-label {
    color: var(--accent-green);
}

.task-indicators {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.quality-icon {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.quality-icon:hover {
    transform: scale(1.2);
}

.quality-icon.good {
    color: #28a745;
}

.quality-icon.partial {
    color: #ffc107;
}

.quality-icon.insufficient {
    color: #dc3545;
}

.tone-emoji {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.tone-emoji:hover {
    transform: scale(1.2);
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Temporäre Kommentare */
.task-comment.temporary {
    animation: commentFadeIn 0.5s ease-out;
}

.task-comment.fading {
    animation: commentFadeOut 10s ease-out forwards;
}

.task-comment.disappearing {
    animation: commentDisappear 1s ease-out forwards;
}

@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes commentFadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes commentDisappear {
    from {
        opacity: 0.3;
        max-height: 100px;
        margin-bottom: 8px;
        padding: 8px 12px;
    }
    to {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding: 0 12px;
    }
}

.btn-icon {
    font-size: 1.3rem;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
}

.indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6c757d;
    transition: all 0.3s ease;
}

.indicator.ready {
    background: #28a745;
}

.indicator.listening {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

.indicator.processing {
    background: #ffc107;
    animation: spin 1s linear infinite;
}

/* Live Transcription */
.interim-results {
    margin-bottom: 20px;
}

.interim-results h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.interim-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    min-height: 60px;
    font-size: 1rem;
    line-height: 1.5;
    font-style: italic;
    color: var(--accent-yellow);
    transition: all 0.3s ease;
}

/* Chat Transcript (Collapsible) */
.chat-transcript {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.transcript-header:hover {
    background: var(--bg-card-hover);
}

.transcript-header h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.transcript-toggle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.transcript-toggle.collapsed {
    transform: rotate(-90deg);
}

.transcript-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 1000px;
}

.transcript-content.collapsed {
    max-height: 0;
}

.results-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px;
    min-height: 100px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.final-result {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
    font-size: 0.9rem;
}

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

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    opacity: 0.8;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes taskItemAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes taskItemHighlight {
    0% { background: #fff3cd; }
    50% { background: #fff3cd; }
    100% { background: white; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

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

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

/* Animation für Ergebnisse */
.result-appear {
    animation: slideIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .tasks-dashboard {
        width: 100%;
        order: -1;
    }
}

@media (max-width: 768px) {
    .briefing-container {
        padding: 30px 20px;
    }
    
    .briefing-header h1 {
        font-size: 2rem;
    }
    
    .briefing-textarea {
        min-height: 250px;
        padding: 15px;
    }
    
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .main-layout {
        gap: 20px;
    }
    
    .tasks-dashboard {
        padding: 15px;
    }
    
    .control-panel-with-status {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .start-btn, .stop-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .status-compact {
        justify-content: center;
    }
    
    .task-item {
        padding: 15px;
    }
    
    .task-label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .briefing-header h1 {
        font-size: 1.8rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .results-box, .interim-box {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Accessibility */
.start-btn:focus, .stop-btn:focus, .start-session-btn:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.briefing-textarea:focus {
    outline: none;
}

/* Summary Page Styles */
.summary-page {
    min-height: 100vh;
    display: none;
    background: var(--bg-primary);
}

.summary-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.summary-header {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 32px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.summary-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Overall Score Card */
.overall-score-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.overall-score-card h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.overall-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.stars-display {
    display: flex;
    gap: 4px;
    font-size: 2rem;
}

.star {
    transition: color 0.3s ease;
    font-size: inherit;
}

.star.filled {
    color: #ffc107;
}

.star.half {
    color: #ffc107;
}

.star.empty {
    color: var(--text-muted);
}

.score-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-red);
}

/* Category Scores */
.category-scores {
    flex: 1;
}

.category-scores h3 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 1.3rem;
}

.category-list {
    display: grid;
    gap: 16px;
}

.category-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
}

.category-item:hover {
    box-shadow: var(--shadow-dark);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.category-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-stars {
    display: flex;
    gap: 2px;
    font-size: 1.2rem;
}

.category-score-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.category-comment {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

/* Summary Actions */
.summary-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.new-session-btn, .download-summary-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.new-session-btn {
    background: var(--accent-red);
    color: white;
}

.new-session-btn:hover {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 69, 112, 0.4);
}

.download-summary-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.download-summary-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-dark);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    animation: loadingFadeIn 0.5s ease-out;
}

.loading-content h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.loading-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #8B4B6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.loading-progress {
    margin-top: 30px;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.progress-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8B4B6B;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.progress-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.progress-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.progress-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Vertikale Statistik-Sidebar am rechten Rand */
.stats-bar {
    position: fixed;
    top: 64px; /* Unter dem Header */
    right: 0;
    width: 280px;
    height: calc(100vh - 64px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-dark);
    z-index: 50;
    overflow-y: auto;
    padding: 20px 16px;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 140px;
    text-align: center;
}

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

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 1.1rem;
}

.stat-value.highlight {
    color: var(--accent-blue);
    animation: statHighlight 0.5s ease-out;
}

.stat-value.success {
    color: var(--accent-green);
}

.stat-value.warning {
    color: var(--accent-yellow);
}

.stat-value.error {
    color: var(--accent-red);
}

.audio-section {
    flex-shrink: 0;
}

/* Audio-Visualizer Styles */
.audio-visualizer {
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 220px;
}

.visualizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.visualizer-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audio-level {
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: monospace;
}

.spectrum-canvas {
    width: 100%;
    height: 50px;
    border-radius: 4px;
    background: var(--bg-secondary);
}

/* Responsive Design für Statistik-Leiste */
@media (max-width: 1200px) {
    .stats-bar {
        width: 240px; /* Schmaler auf kleineren Bildschirmen */
    }
    
    .container {
        padding-right: 280px; /* Angepasst für schmalere Sidebar */
    }
}

@media (max-width: 1024px) {
    .stats-bar {
        display: none; /* Sidebar auf Tablets ausblenden */
    }
    
    .container {
        padding-right: 32px; /* Normales Padding ohne Sidebar */
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .tasks-dashboard {
        width: 100%;
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .stat-group {
        min-width: 120px;
        padding: 8px 12px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .audio-visualizer {
        min-width: 180px;
    }
}

/* Loading Indicator Styles für Transkripte */
.transcript-item-processing {
    border-left: 3px solid var(--accent-yellow);
}

.processing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(240, 173, 78, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

.processing-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-success {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(92, 184, 92, 0.1);
    border-radius: 6px;
    animation: fadeInOut 2s ease-out;
}

.processing-error {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(214, 69, 112, 0.1);
    border-radius: 6px;
    animation: fadeInOut 5s ease-out;
}

/* Animations */
@keyframes statHighlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-5px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-5px); }
}

/* Error States */
.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-dark);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.error {
    border-left: 4px solid var(--accent-red);
    background: var(--bg-card);
}

.toast.success {
    border-left: 4px solid var(--accent-green);
    background: var(--bg-card);
}

.toast.warning {
    border-left: 4px solid var(--accent-yellow);
    background: var(--bg-card);
}

.toast.info {
    border-left: 4px solid var(--accent-blue);
    background: var(--bg-card);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.warning .toast-icon {
    color: var(--accent-yellow);
}

.toast.info .toast-icon {
    color: var(--accent-blue);
}

.toast-content {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-red);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear;
}

.toast.success .toast-progress {
    background: var(--accent-green);
}

.toast.warning .toast-progress {
    background: var(--accent-yellow);
}

.toast.info .toast-progress {
    background: var(--accent-blue);
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive Toast */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
