/* /assets/css/index.css */
/* Version: Glass Dashboard & Plakatives Design 🎨 */

/* --- 1. BASIS & HINTERGRUND --- */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 20px; 
    color: #1e293b; 
    min-height: 100vh; 
    background: url('/assets/img/bg.png') no-repeat center center fixed; 
    background-size: cover;
}

.main-container { 
    max-width: 1400px; 
    margin: 0 auto;
    padding: 40px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.65)
}

/* --- 2. HEADER SECTION (Das "Cockpit") --- */
.header-section {
    background: rgba(255, 255, 255, 0.75); /* Milchglas */
    backdrop-filter: blur(12px);            
    border-radius: 24px; 
    padding: 30px; 
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Icons oben rechts */
.header-actions { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    display: flex; 
    gap: 10px; 
}

.icon-btn { 
    width: 42px; 
    height: 42px; 
    border-radius: 12px; 
    background: white; 
    border: 1px solid #e2e8f0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #64748b; 
    transition: all 0.2s; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.icon-btn:hover { 
    background: #2563eb; 
    color: white; 
    border-color: transparent; 
    transform: translateY(-2px);
}

.btn-logout:hover {
    background: #ef4444; /* Roter Hintergrund */
    color: white !important; /* Weiße Schrift/Icon - WICHTIG! */
    border-color: transparent !important;
}

.icon-btn svg { width: 22px; height: 22px; }

h1 { margin: 0 0 5px 0; font-size: 2.2rem; font-weight: 800; color: #0f172a; }
.greeting { font-size: 1.1rem; color: #64748b; font-weight: 500; }

/* --- 3. KATEGORIEN --- */
.section-title { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: #1e293b; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    padding-left: 5px;
}

.section-title::before { 
    content: ''; 
    width: 6px; 
    height: 24px; 
    background: #2563eb; 
    border-radius: 4px; 
}

.apps-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 24px; 
    min-height: 50px; 
}

/* --- 4. KARTEN DESIGN (Die Boxen) --- */
.app-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 20px; 
    padding: 24px; 
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s; 
    border: 1px solid rgba(255,255,255,0.6); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    cursor: grab;
    overflow: hidden; 
    box-sizing: border-box; 
}

.app-card:active { cursor: grabbing; }

.app-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12); 
    background: rgba(255, 255, 255, 0.95); 
    border-color: #3b82f6; 
}

.app-card.featured { border-top: 5px solid #2563eb; }

.prototype-stamp {
    position: absolute; top: 50%; left: 50%; 
    transform: translate(-50%, -50%) rotate(-12deg);
    border: 3px solid #8e44ad; color: #8e44ad; 
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 10px; font-weight: 800; font-size: 0.8rem; 
    pointer-events: none; opacity: 0.95; z-index: 0; border-radius: 6px;
}

.wip-stamp {
    position: absolute; top: 50%; left: 50%; 
    transform: translate(-50%, -50%) rotate(-12deg);
    border: 3px solid #ef4444; /* Warn-Rot */
    color: #ef4444; 
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 10px; font-weight: 800; font-size: 0.8rem; 
    pointer-events: none; opacity: 0.95; z-index: 0; border-radius: 6px;
    white-space: nowrap;
}

/* --- 5. KARTEN INHALT (Header & Text) --- */

/* Neuer Flex-Header: Icon links, Titel rechts */
.app-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Die feine Trennlinie */
    position: relative; z-index: 1;
}

.app-icon { 
    font-size: 2rem; 
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.app-title-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: space-between; /* Schiebt Zähler nach rechts */
    align-items: center;
}

.app-title { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: #0f172a; 
    line-height: 1.2; 
    margin: 0;
}

.exercise-count { 
    background: #eff6ff; 
    color: #2563eb; 
    padding: 3px 8px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    border: 1px solid #dbeafe;
    white-space: nowrap;
    margin-left: 8px;
}

/* Subtitle & Beschreibung */
.app-subtitle { 
    font-size: 0.95rem; 
    color: #2563eb; /* Blau */
    font-weight: 400; 
    margin-bottom: 6px; 
    position: relative; z-index: 1; 
}

.app-desc { 
    font-size: 0.9rem; 
    color: #64748b; 
    line-height: 1.5; 
    margin-bottom: 20px; 
    flex-grow: 1; 
    position: relative; z-index: 1;
}

/* /assets/css/index.css */

/* --- 6. FOOTER & BUTTONS --- */
.app-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 15px; 
    border-top: 1px solid rgba(0,0,0,0.06); 
    position: relative; z-index: 1; 
    gap: 8px; /* Verringerter Abstand zwischen Video-Icon und Buttons */
}

/* Video Link */
.video-link { 
    color: #94a3b8; 
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    transition: all 0.2s;
    background: white; border: 1px solid #f1f5f9;
    flex-shrink: 0; /* Das Icon darf nicht zusammengedrückt werden */
}
.video-link.active { color: #475569; border-color: #e2e8f0; }
.video-link.active:hover { color: #2563eb; border-color: #2563eb; background: #eff6ff; }
.video-link.disabled { opacity: 0.4; cursor: help; background: transparent; border: none; }

/* Buttons Container */
.footer-actions { 
    display: flex; 
    gap: 8px; /* Verringerter Abstand zwischen den beiden Buttons */
    flex: 1; /* Nimmt den restlichen Platz ein */
    min-width: 0; /* WICHTIG: Erlaubt dem Container, kleiner zu werden */
}

/* Buttons Allgemein */
.btn { 
    flex: 1; /* Beide Buttons teilen sich den Platz fair */
    padding: 10px 5px; /* Reduziertes horizontales Padding, um Platz zu sparen */
    border-radius: 10px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 0.9rem; 
    display: flex; align-items: center; justify-content: center; gap: 4px; 
    transition: all 0.2s;
    white-space: nowrap; /* Text bricht nicht um */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box; 
    min-width: 0; /* WICHTIG: Erlaubt dem Button, zu schrumpfen, wenn nötig */
}

.btn-manage { background: #3b82f6; color: white; } 
.btn-manage:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); }

.btn-create { background: #22c55e; color: white; } 
.btn-create:hover { background: #16a34a; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(22, 163, 74, 0.2); }

/* --- 7. LOGIN STYLES --- */
.login-container { 
    min-height: 100vh; 
    display: flex; align-items: center; justify-content: center; 
}

.login-box { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(15px); 
    padding: 40px; 
    border-radius: 24px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    width: 100%; max-width: 400px; 
}

.form-input { 
    width: 100%; padding: 14px; 
    border: 2px solid #cbd5e1; border-radius: 12px; 
    margin-bottom: 15px; box-sizing: border-box; font-size: 1rem;
}

.form-input:focus { border-color: #3b82f6; outline: none; }

.login-btn { 
    width: 100%; padding: 14px; 
    background: #3b82f6; color: white; 
    border: none; border-radius: 12px; 
    font-weight: 700; cursor: pointer; 
    font-size: 1rem; transition: background 0.2s;
}

.login-btn:hover { background: #2563eb; }

/* --- 8. PASSWORT TOGGLE (Login & Change Password) --- */
.pw-wrapper { 
    position: relative; 
    width: 100%; 
    margin-bottom: 15px; /* Abstand nach unten, ersetzt das margin vom input */
}

/* Wichtig: Das Input im Wrapper braucht kein eigenes Margin mehr */
.pw-wrapper .form-input {
    margin-bottom: 0;
    padding-right: 45px; /* Platz für das Auge */
}

.toggle-eye {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 5px; /* Klickfläche vergrößern */
    z-index: 5;
}

.toggle-eye:hover { color: #3b82f6; }
.toggle-eye svg { width: 20px; height: 20px; }


/* Spezieller Hover für den Logout Button */
.btn-logout:hover {
    background: #ef4444;    /* Rot */
    color: white !important; /* Weiß erzwingen */
    border-color: transparent !important;
}