/* KreideKiwi - Industrial Design - v2026-03-10-0001 */

:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-sidebar: #FAFAFA;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #E0E0E0;
    --border-light: #F0F0F0;
    --accent: #333333;
    --accent-hover: #000000;
    --sidebar-width: 280px;
    --header-height: 60px;
    --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-danger {
    color: #D32F2F;
    border-color: #D32F2F;
}

.btn-danger:hover {
    background: #D32F2F;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Layout - Kurs-Viewer */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    margin-left: 15px;
    gap: 10px;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 900;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.sidebar-logo img {
    max-width: 120px;
    height: auto;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-section-title {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.nav-section-title:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.accordion-icon {
    font-size: 14px;
    font-weight: 400;
    transition: transform 0.2s;
}

.nav-accordion.open .accordion-icon {
    transform: rotate(45deg);
}

.nav-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-accordion.open .nav-section-content {
    max-height: 1000px;
}

#materialienSection.open .nav-section-content {
    max-height: none;
    overflow: visible;
}

#lernpfadeSection .nav-section-title,
#materialienSection .nav-section-title {
    margin-top: 0;
    border-top: 1px solid var(--border-light);
}

/* Sub-Akkordeons innerhalb Materialien/Links */
.nav-sub-accordion .nav-sub-title {
    padding: 10px 20px 10px 28px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.nav-sub-accordion .nav-sub-title:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-sub-accordion .accordion-icon {
    font-size: 12px;
}

.nav-sub-accordion.open .accordion-icon {
    transform: rotate(45deg);
}

.nav-sub-content {
    display: none;
}

.nav-sub-accordion.open .nav-sub-content {
    display: block;
}

.nav-sub-accordion + .nav-sub-accordion .nav-sub-title {
    border-top: 1px solid var(--border-light);
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

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

.nav-item.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-left-color: var(--accent);
    font-weight: 500;
}

.nav-item-number {
    display: inline-block;
    width: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
}

.sidebar-footer a {
    display: block;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-footer a:hover {
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
}

.content-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 850;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .header-brand {
        margin-left: 10px;
        gap: 8px;
    }

    .header-logo {
        width: 26px;
        height: 26px;
    }

    .header-title {
        font-size: 1rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

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

/* ============================================
   Admin Dashboard Styles
   ============================================ */

.admin-container {
    min-height: 100vh;
    background: var(--bg-secondary);
}

.admin-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header img {
    height: 40px;
}

.admin-main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-section-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-section-header h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-section.collapsible > .admin-section-header {
    cursor: pointer;
    user-select: none;
}

.admin-section.collapsible > .admin-section-header:hover {
    background: var(--bg-secondary);
}

.admin-section-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

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

.admin-section.collapsible > .admin-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 5000px;
}

.admin-section.collapsed > .admin-section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.admin-section.collapsed > .admin-section-header {
    border-bottom: none;
}

.admin-section-content {
    padding: 25px;
}

/* Course Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.course-card {
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: var(--transition);
}

.course-card:hover {
    border-color: var(--accent);
}

.course-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.course-card-header h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.course-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.course-card-body {
    padding: 20px;
}

.course-card-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Drag & Drop List */
.sortable-list {
    list-style: none;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    cursor: move;
    transition: var(--transition);
}

.sortable-item:hover {
    border-color: var(--accent);
}

.sortable-item.dragging {
    opacity: 0.5;
    border-style: dashed;
}

.drag-handle {
    color: var(--text-muted);
    font-size: 18px;
}

.sortable-item-title {
    flex: 1;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* ============================================
   Startseite / Index Styles
   ============================================ */

.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-primary);
}

.landing-logo {
    margin-bottom: 30px;
}

.landing-logo img {
    max-width: 200px;
    height: auto;
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

.landing-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 50px;
}

.landing-courses {
    width: 100%;
    max-width: 600px;
}

.landing-courses h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.course-link {
    display: block;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    transition: var(--transition);
}

.course-link:hover {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.course-link-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.course-link-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.landing-footer {
    margin-top: 60px;
    text-align: center;
}

.landing-footer a {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 15px;
}

.landing-footer a:hover {
    color: var(--text-primary);
}

/* ============================================
   KI-Eingabefeld (Bang) im Header
   ============================================ */

.ai-search-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    max-width: 500px;
    margin: 0 auto;
}

.ai-search-form {
    display: flex;
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.ai-search-form:focus-within {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.ai-search-input {
    flex: 1;
    padding: 8px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

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

.ai-search-btn {
    padding: 8px 15px;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
}

.ai-search-btn:hover {
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .ai-search-container {
        display: none;
    }

    .ai-search-mobile {
        display: block;
        padding: 10px 15px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }

    .ai-search-mobile .ai-search-form {
        width: 100%;
    }
}

.ai-search-mobile {
    display: none;
}

/* ============================================
   Kurs-Grid (Startseite) - Quadratische Karten
   ============================================ */

.courses-grid-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
}

.course-category-section {
    margin-bottom: 40px;
}

.course-category-title {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    gap: 20px;
    justify-content: center;
}

.course-tile {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.course-tile:hover {
    border-color: var(--accent);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.course-tile-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.course-tile-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Kurs-Kacheln mit Bild */
.course-tile.has-image {
    aspect-ratio: unset;
    height: auto;
    align-self: start;
    padding: 0;
    overflow: hidden;
    justify-content: flex-start;
}

.course-tile-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.course-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-tile-image.fallback-icon {
    font-size: 32px;
    height: 80px;
}

.course-tile.has-image .course-tile-title {
    padding: 10px 12px;
}

.course-tile-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.3;
}

.course-tile-count {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grid Responsive */
@media (max-width: 600px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 160px));
        gap: 15px;
    }

    .course-tile {
        padding: 15px;
    }

    .course-tile-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }

    .course-tile-title {
        font-size: 12px;
    }

    .course-tile-image {
        height: 90px;
    }

    .course-tile.has-image .course-tile-title {
        margin-top: 10px;
    }

    .course-tile.has-image .course-tile-count {
        margin-bottom: 10px;
    }
}

/* ============================================
   Lernpfad Loading Animation
   ============================================ */

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading-spinner::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ============================================
   Password Management (Dashboard)
   ============================================ */

.password-section {
    margin-bottom: 30px;
}

.password-section h4 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.password-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.password-item-header {
    margin-bottom: 10px;
}

.password-item-header strong {
    font-size: 16px;
    display: block;
}

.password-item-header .text-muted {
    font-size: 12px;
}

.password-item-value {
    font-family: monospace;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    word-break: break-all;
}

.password-item-value em {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   File Upload & Management (Dashboard)
   ============================================ */

.modal-large {
    max-width: 700px;
}

.upload-section {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.upload-section h4 {
    margin-bottom: 15px;
    font-weight: 500;
}

.upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-row input[type="file"] {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.upload-row select {
    width: 150px;
}

.files-section {
    margin-bottom: 20px;
}

.files-section h4 {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.file-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-item-name {
    font-weight: 500;
}

.file-item-filename {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.file-item-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-row select {
        width: 100%;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-item-actions {
        width: 100%;
    }

    .file-item-actions .btn {
        flex: 1;
    }
}

/* ============================================
   Impulse Galerie
   ============================================ */

.nav-item-impuls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-item-impuls .file-icon {
    font-size: 1.1em;
}

.nav-item-impuls .file-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.gallery-overlay.show {
    display: flex;
}

.gallery-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    gap: 15px;
}

.gallery-title {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.gallery-counter {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.gallery-close:hover {
    opacity: 1;
}

.gallery-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    padding: 20px;
}

.gallery-image-container {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-zoom-indicator {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}
.gallery-zoom-indicator:hover {
    background: rgba(255, 255, 255, 0.25);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    padding: 20px 15px;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    justify-content: center;
}

.gallery-thumbnails img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    border: 2px solid transparent;
}

.gallery-thumbnails img:hover {
    opacity: 0.8;
}

.gallery-thumbnails img.active {
    opacity: 1;
    border-color: white;
}

/* Vollbild-Button */
.gallery-fullscreen-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.gallery-fullscreen-btn:hover {
    opacity: 1;
}

/* Unsichtbare Nav-Zonen fuer Präsentationsmodus */
.gallery-presentation-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    cursor: pointer;
    z-index: 5;
    display: none;
}

.gallery-presentation-prev {
    left: 0;
    cursor: w-resize;
}

.gallery-presentation-next {
    right: 0;
    cursor: e-resize;
}

/* Präsentationsmodus */
.gallery-overlay.presentation {
    background: #000;
}

.gallery-overlay.presentation .gallery-header,
.gallery-overlay.presentation .gallery-thumbnails,
.gallery-overlay.presentation .gallery-nav {
    display: none;
}

.gallery-overlay.presentation .gallery-content {
    padding: 0;
    width: 100%;
    height: 100%;
}

.gallery-overlay.presentation .gallery-image-container {
    width: 100%;
    height: 100%;
}

.gallery-overlay.presentation .gallery-image-container img {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    box-shadow: none;
}

.gallery-overlay.presentation .gallery-presentation-nav {
    display: block;
}

/* Responsive Galerie */
@media (max-width: 768px) {
    .gallery-nav {
        padding: 15px 10px;
        font-size: 22px;
    }

    .gallery-prev {
        left: 5px;
    }

    .gallery-next {
        right: 5px;
    }

    .gallery-thumbnails {
        justify-content: flex-start;
    }

    .gallery-thumbnails img {
        width: 50px;
        height: 38px;
    }

    .gallery-image-container img {
        max-height: calc(100vh - 180px);
    }
}
