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

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --accent-bg: #2a2a2a;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --accent-color: #4f46e5;
    --success-color: #10b981;
    --error-color: #ef4444;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    /* Stahl-Gradient mit mehreren Grautönen */
    background: 
        radial-gradient(circle at 20% 20%, rgba(64, 64, 64, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(96, 96, 96, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, 
            #0f0f0f 0%, 
            #1a1a1a 15%, 
            #2a2a2a 30%, 
            #1f1f1f 45%, 
            #252525 60%, 
            #1a1a1a 75%, 
            #0f0f0f 100%
        ),
        linear-gradient(45deg, 
            #141414 0%, 
            #1e1e1e 25%, 
            #282828 50%, 
            #1c1c1c 75%, 
            #161616 100%
        );
    background-size: 100% 100%, 100% 100%, 100% 100%, 200% 200%;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* Zusätzlicher Stahl-Effekt */
    position: relative;
}

/* Subtle Steel texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.005) 2px,
            rgba(255, 255, 255, 0.005) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.005) 2px,
            rgba(255, 255, 255, 0.005) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Content needs to be above the texture */
.main-content,
.header,
.logo-corner {
    position: relative;
    z-index: 2;
}

/* Glass morphism effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.glass-subtle {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Logo in der rechten Ecke - im Header integriert */
.logo-corner {
    position: fixed;
    top: 15px;
    right: 30px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.logo-corner:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.corner-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
    transition: all 0.3s ease;
}

.corner-logo:hover {
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

/* Header styles - größer für Logo */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0;
    max-width: none;
    gap: 2rem;
}

/* Session Timer - Links */
.session-timer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    flex-shrink: 0;
}

.timer-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.timer-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.timer-label {
    font-size: 0.75rem;
    color: #ffc107;
    font-weight: 500;
}

.timer-countdown {
    font-size: 1rem;
    font-weight: 700;
    color: #ffc107;
    font-family: 'Courier New', monospace;
}

.session-timer.warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.4);
}

.session-timer.warning .timer-label,
.session-timer.warning .timer-countdown {
    color: #ff9800;
}

.session-timer.critical {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.4);
    animation: pulse 1s ease-in-out infinite;
}

.session-timer.critical .timer-label,
.session-timer.critical .timer-countdown {
    color: #f44336;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Navigation - Mitte/Links neben Timer */
.header-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Logo - Rechts */
.header-logo {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.logo-img {
    height: 100%;
    width: auto;
    max-height: 45px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

/* Session Timer im Header */
.session-timer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.session-timer.warning {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    animation: pulse-warning 2s infinite;
}

.session-timer.critical {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    animation: pulse-critical 1s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.timer-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.timer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.timer-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1;
    margin-bottom: 0.1rem;
}

.timer-countdown {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.session-timer.warning .timer-countdown {
    color: #f59e0b;
}

.session-timer.critical .timer-countdown {
    color: #ef4444;
}

/* Responsive Session Timer */
@media (max-width: 768px) {
    .session-timer {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }
    
    .timer-icon {
        font-size: 1rem;
    }
    
    .timer-label {
        font-size: 0.7rem;
    }
    
    .timer-countdown {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .timer-label {
        display: none; /* Verstecke Label auf sehr kleinen Bildschirmen */
    }
    
    .timer-info {
        align-items: center;
    }
}

/* Main content - volle Breite, KEIN Scroll */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    width: 100%;
    overflow-y: auto;
}

.container {
    /* Volle Breite nutzen */
    max-width: none;
    margin: 0;
    width: 100%;
}

/* Form styles */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem 0;
}

.form-card {
    padding: 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-glass);
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #6366f1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #6366f1, var(--accent-color));
}

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

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

.btn-full {
    width: 100%;
}

/* Sidebar styles - volle Browser-Höhe */
.dashboard-layout {
    display: flex;
    gap: 2rem;
    /* Volle Breite nutzen */
    max-width: none;
    margin: 0;
    width: 100%;
    height: calc(100vh - 80px); /* Exakte Browser-Höhe */
    overflow: hidden; /* Kein Scrollen des Containers */
}

.sidebar {
    width: 300px; /* Etwas breiter */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem; /* Kompakter */
    /* Volle verfügbare Höhe */
    height: 100%;
    /* Flexibilität für kleinere Bildschirme */
    min-width: 280px;
    /* KEIN Scroll */
    overflow: hidden;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(99, 102, 241, 0.1));
    border-left: 3px solid var(--accent-color);
}

/* Content area - volle restliche Breite und Höhe, KEIN Scroll */
.content-area {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem; /* Kompakter */
    /* Exakte Höhe ohne Scrollen */
    height: 100%;
    /* Maximale Breite nutzen */
    width: 100%;
    /* KEIN Scroll - alles muss reinpassen */
    overflow: hidden;
    /* Flex Layout für bessere Kontrolle */
    display: flex;
    flex-direction: column;
}

.content-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

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

.text-secondary {
    color: var(--text-secondary);
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive design */
@media (max-width: 768px) {
    .logo-corner {
        top: 12px;
        right: 15px;
        padding: 6px 10px;
    }
    
    .corner-logo {
        height: 35px;
    }
    
    .header {
        padding: 0 1rem;
        height: 60px;
    }
    
    .header-content {
        gap: 1rem;
    }
    
    .header-logo {
        height: 35px;
    }
    
    .logo-img {
        max-height: 35px;
    }
    
    .session-timer {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .timer-label {
        font-size: 0.65rem;
    }
    
    .timer-countdown {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        gap: 1rem;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
        margin-top: 70px;
    }
    
    .dashboard-layout {
        gap: 1rem;
        height: calc(100vh - 70px); /* Angepasst für kleineren Header */
        flex-direction: column; /* Gestapelt auf Tablet/Mobile */
    }
    
    .sidebar {
        width: 100%;
        min-width: auto;
        height: auto; /* Flexible Höhe auf kleinen Bildschirmen */
        max-height: 200px; /* Nicht zu hoch */
    }
    
    .content-area {
        flex: 1;
        height: auto; /* Flexible Höhe */
        min-height: 300px;
    }
    
    .form-card {
        padding: 2rem 1.5rem;
    }
    
    .form-container {
        padding: 1rem 0;
    }
    
    .dashboard-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        padding: 1.5rem;
    }
    
    .content-area {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-corner {
        top: 8px;
        right: 10px;
        padding: 4px 8px;
    }
    
    .corner-logo {
        height: 30px;
    }
    
    .header {
        padding: 0 0.75rem;
        height: 55px;
    }
    
    .header-logo {
        height: 30px;
    }
    
    .logo-img {
        max-height: 30px;
    }
    
    .main-content {
        margin-top: 60px;
        padding: 0.5rem;
    }
    
    .dashboard-layout {
        height: calc(100vh - 60px); /* Angepasst für kleineren Header */
        gap: 0.5rem;
    }
    
    .sidebar {
        max-height: 150px; /* Noch kompakter auf Mobile */
        padding: 1rem;
    }
    
    .content-area {
        padding: 1.5rem 1rem;
    }
    
    .form-card {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .content-area {
        padding: 1.5rem 1rem;
    }
}

/* Animation effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading and hover effects */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
