:root {
    --base-bg: #f7f9fb;
    --card-bg: #ffffff;
    --text: #1f2a37;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --border: #e2e8f0;
    --success: #047857;
    --warning: #b45309;
}

* {
    box-sizing: border-box;
}

body.layout {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--base-bg);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

.subtitle {
    color: var(--muted);
    margin-top: 0.25rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.card.info {
    border: 1px dashed var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.room-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
}

button,
.button {
    display: inline-flex;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

button:hover,
.button:hover {
    background: var(--primary-hover);
}

.button.secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.button.full {
    width: 100%;
    text-align: center;
}

.flash-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flash {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.flash.info {
    background: #dbeafe;
    color: #1e3a8a;
}

.flash.success {
    background: #d1fae5;
    color: #065f46;
}

.flash.warning {
    background: #fef3c7;
    color: #92400e;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.room-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-card .meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.room-card .status {
    font-weight: 600;
    font-size: 0.9rem;
}

.status.pending {
    color: var(--warning);
}

.status.ready {
    color: var(--success);
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.room-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.room-item-list li {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: #fff;
}

.item-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.item-head strong {
    flex: 1;
}

.item-head small {
    color: var(--muted);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.item-actions form {
    display: inline;
}

button.icon {
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
}

button.icon.move-btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-form input,
.filter-form select {
    flex: 1;
    min-width: 120px;
}

.filter-form button {
    flex-shrink: 0;
}

/* Drag & Drop Styles */
.room-item-list.drag-active li {
    cursor: grab;
    user-select: none;
}

.room-item-list.drag-active li:active {
    cursor: grabbing;
}

.room-item-list li.dragging {
    opacity: 0.4;
    background: var(--base-bg);
    border: 2px dashed var(--primary);
}

.room-item-list li.drag-over {
    border-top: 4px solid var(--primary);
    padding-top: calc(1rem - 2px);
}

/* Drag Handle */
.drag-handle {
    cursor: grab;
    padding: 0.5rem;
    color: var(--muted);
    font-size: 1.2rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Suchbereiche */
.search-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--base-bg);
    border-radius: 0.75rem;
}

.search-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.search-section.coming-soon {
    opacity: 0.7;
}

.search-section.coming-soon textarea {
    background: #f0f0f0;
    cursor: not-allowed;
}

.badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.search-section.active {
    border: 2px solid var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

/* Suchergebnisse */
.search-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--primary);
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.results-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.result-count {
    background: var(--primary);
    color: #fff;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
}

.title-filter {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.title-filter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 59, 130, 246), 0.15);
}

.lo-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lo-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    position: relative;
}


.result-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.result-content strong {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.result-content .meta {
    color: var(--muted);
    font-size: 1rem;
}

.tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tags-inline .tag {
    background: var(--base-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text);
}

button.small,
.button.small {
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
}

/* Typ-Auswahl (Übung/Erklärung) */
.type-toggle {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.type-option input[type="radio"] {
    display: none;
}

.type-option .type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.type-option .type-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--muted);
}

.type-option .type-hint {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.25rem;
}

/* Übung ausgewählt (blau) */
.type-option.type-exercise.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.type-option.type-exercise.selected .type-label {
    color: var(--primary);
}

/* Erklärung ausgewählt (grün) */
.type-option.type-explanation.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.type-option.type-explanation.selected .type-label {
    color: #16a34a;
}

.type-option:hover {
    border-color: var(--muted);
}

/* Tag-Farben für Übung/Erklärung */
.tags .tag-exercise {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

.tags .tag-explanation {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* Metadata Form */
.metadata-form {
    margin-top: 1rem;
}

.metadata-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

@media (max-width: 600px) {
    .metadata-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .type-toggle {
        flex-direction: column;
    }
}

button.danger,
.button.danger {
    background: var(--danger);
}

.form-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.form-inline > button[type="submit"] {
    align-self: end;
    height: fit-content;
}

.lo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.learning-object-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.learning-object-card .lo-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.learning-object-card .lo-card-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    padding-right: 2.5rem;
}

.learning-object-card .like-corner {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    font-size: 0.8rem;
    color: #888;
}

.learning-object-card .meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.media-preview img {
    width: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
}

.video-link {
    color: var(--primary);
    font-weight: 600;
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.tags li {
    background: var(--base-bg);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.learning-object-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* 2 Spalten auf größeren Bildschirmen */
@media (min-width: 900px) {
    .learning-object-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .learning-object {
        grid-template-columns: 1fr;
    }
    
    .learning-object .media img,
    .learning-object .media iframe {
        height: 180px;
    }
}

.learning-object {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 2fr;
    gap: 1rem;
}

/* Number Badge links oben */
.number-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    z-index: 1;
}

/* Type Badge in der Ecke */
.type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    z-index: 1;
}

.type-badge-exercise {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
}

.type-badge-explanation {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
}

.learning-object .content {
    padding-top: 1.5rem;
}

.learning-object.no-media {
    grid-template-columns: 1fr;
}

.learning-object .media img,
.learning-object .media iframe {
    width: 100%;
    height: 200px;
    border-radius: 0.75rem;
    object-fit: cover;
}

ul.learning-object-steps {
    list-style: none !important;
    padding: 0 !important;
    margin: 2.5rem 0 0 !important;
}

ul.learning-object-steps > li {
    border-top: 3px dashed rgba(37, 99, 235, 0.5) !important;
    padding: 2rem 0 !important;
    margin-top: 0.5rem !important;
}

ul.learning-object-steps > li:first-child {
    border-top: none !important;
    padding-top: 0 !important;
}

.learning-object-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.learning-object-step .step-number {
    display: block !important;
    font-weight: 900 !important;
    min-width: 8rem;
    text-transform: none !important;
    color: var(--primary) !important;
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
}

.learning-object-step .step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.learning-object-step .step-media img,
.learning-object-step .step-media video {
    width: 100% !important;
    max-width: 400px !important;
    height: auto !important;
    border-radius: 0.75rem !important;
    object-fit: contain !important;
    background: transparent !important;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.75rem;
}

.exercise-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0;
    margin: 0.5rem 0 0;
    font-weight: 600;
}

.notes {
    background: #f9fafb;
    border-left: 3px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

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

.hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Textarea für Schritt-Text im Lernobjekt-Editor */
.step-text-input {
    min-height: 4rem;
    resize: vertical;
}

@media (max-width: 768px) {
    body.layout {
        padding: 1rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .learning-object {
        grid-template-columns: 1fr;
    }

    .step-text-input {
        min-height: 6rem;
        font-size: 1rem;
    }

    .form-inline {
        display: flex;
        flex-direction: column;
    }

    .form-inline label {
        width: 100%;
    }
}

/* Overlay für Bild-Zuschnitt im Schritt-Editor */
.cropper-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cropper-dialog {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
}

.cropper-image-wrapper {
    max-height: 60vh;
    overflow: hidden;
    margin-top: 0.75rem;
}

body.layout.cropper-open {
    overflow: hidden;
}

body.layout.cropper-open header,
body.layout.cropper-open main {
    display: none;
}

body.layout.cropper-open > *:not(#cropper-modal) {
    display: none !important;
}

body.layout.cropper-open #cropper-modal {
    display: flex !important;
}

/* Interne Overlay-Fläche von Cropper.js: keine Abdunkelung über dem Bild */
.cropper-container .cropper-modal {
    background: rgba(255, 255, 255, 0.55) !important;
}

/* Aufklappbare Suchergebnisse */
.lo-result-item.expandable {
    flex-direction: column;
    align-items: stretch;
    position: relative;
}


.lo-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.lo-result-header .result-actions {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.result-actions .like-count {
    font-size: 0.85rem;
    color: #e53e3e;
    font-weight: 600;
}

.lo-result-header .result-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.lo-result-header:hover {
    background: var(--bg-alt);
    margin: 0 -0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.expand-icon {
    font-size: 0.9rem;
    color: var(--muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lo-result-item.expanded .expand-icon {
    transform: rotate(90deg);
}

.lo-result-preview {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0 0.5rem 1.5rem;
    border-left: 2px solid var(--border);
    margin-left: 0.35rem;
    margin-top: 0.5rem;
}

.lo-result-item.expanded .lo-result-preview {
    display: flex;
}

.step-preview {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.step-thumb {
    width: 150px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 0.5rem;
    flex-shrink: 0;
    background: var(--bg-alt);
}

.step-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--muted);
    border: 1px dashed var(--border);
}

.step-info {
    flex: 1;
    min-width: 0;
}

.step-info strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.step-info p {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* Like-Badge */
.like-badge {
    background: var(--bg-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.like-badge.liked {
    background: #fee2e2;
    color: #dc2626;
}


.learning-object-card.own {
    border-color: var(--primary);
    border-width: 2px;
}

/* Leaderboard */
.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-alt);
    border-radius: 0.75rem;
    transition: transform 0.15s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-item.highlight {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
}

.leaderboard-item.highlight .meta {
    color: rgba(255, 255, 255, 0.8);
}

.leaderboard-item .rank {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 2.5rem;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-info strong {
    display: block;
    font-size: 1rem;
}

.leaderboard-info .meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.leaderboard-likes {
    text-align: right;
}

.leaderboard-likes .like-count {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Result Actions in room_edit */
.result-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.result-actions form {
    margin: 0;
}

.result-actions button.small {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}

button.small.liked {
    background: var(--primary);
    color: white;
}

/* Editable Title */
.editable-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.edit-title-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.edit-title-btn:hover {
    opacity: 1;
}

.edit-title-input {
    flex: 1;
    min-width: 150px;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    border: 2px solid var(--primary);
    border-radius: 4px;
}

.edit-title-save,
.edit-title-cancel {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.edit-title-save {
    background: var(--success);
    color: white;
}

.edit-title-cancel {
    background: var(--danger);
    color: white;
}

/* Header Left Layout */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left form {
    margin: 0;
}

.header-left .button.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Upload Progress Bar (nicht-blockierend, unten rechts) */
.upload-progress-bar {
    background: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    transition: opacity 0.3s;
}

.upload-progress-bar .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.upload-progress-bar .progress-text {
    font-weight: 500;
    color: var(--text);
}

.upload-progress-bar .progress-percent {
    color: var(--text-light);
}

.upload-progress-bar .progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-bar .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.upload-progress-bar.success .progress-fill {
    background: var(--success);
}

.upload-progress-bar.success .progress-text {
    color: var(--success);
}

.upload-progress-bar.error .progress-fill {
    background: var(--danger);
}

.upload-progress-bar.error .progress-text {
    color: var(--danger);
}

/* File Upload Box */
.file-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--primary);
    border-radius: 0.75rem;
    background: rgba(37, 99, 235, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 100px;
}

.file-upload-box:hover,
.file-upload-box:focus-within {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

.file-upload-box:active {
    transform: scale(0.98);
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
}


/* Globale Navigation - Fixe Leiste oben */
.global-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: var(--primary);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    overflow: hidden;
}

.nav-menu.open {
    display: block;
}

.nav-menu a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.nav-menu a:last-child {
    border-bottom: none;
}

.nav-menu a:hover {
    background: var(--bg-alt);
}

.nav-menu a.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-menu a.nav-logout {
    color: var(--danger);
}

.nav-menu a.nav-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Body Padding für fixe Navbar */
body.layout {
    padding-top: 56px;
}

/* Dashboard Page */
body.dashboard-page {
    padding-top: 70px; /* Mehr Abstand zur Navbar */
}

/* Hero Header für Dashboard und Lernobjekte */
.dashboard-hero,
.lo-hero {
    position: relative;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 1rem;
    color: white;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.5rem;
}

.dashboard-hero::before,
.lo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}

.dashboard-hero .hero-animation,
.lo-hero .hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: water-flow 3s ease-in-out infinite;
    pointer-events: none;
}

.dashboard-hero .hero-content,
.lo-hero .hero-content {
    position: relative;
    z-index: 1;
}

.dashboard-hero h1,
.lo-hero h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 1.75rem;
    margin: 0;
}

.dashboard-hero .subtitle,
.lo-hero .subtitle {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-top: 0.25rem;
}

.lo-hero .hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.lo-hero .hero-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    backdrop-filter: blur(5px);
}

.lo-hero .hero-btn:hover {
    background: rgba(255,255,255,0.3);
}

body.learning-objects-page {
    padding-top: 70px;
}

body.create-lo-page {
    padding-top: 70px;
}

.create-hero {
    position: relative;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 1rem;
    color: white;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    margin-bottom: 1.5rem;
}

.create-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}

.create-hero .hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: water-flow 3s ease-in-out infinite;
    pointer-events: none;
}

.create-hero .hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.create-hero h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 1.75rem;
    margin: 0;
}

.create-hero .subtitle {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-top: 0.25rem;
}

.create-hero .hero-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    backdrop-filter: blur(5px);
}

.create-hero .hero-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Back Link außerhalb der Card */
.back-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
    text-decoration: none;
    font-size: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Top Navigation Row mit Zurück-Button */
.top-nav-row {
    display: flex;
    justify-content: flex-start;
    padding: 0.75rem 0;
}

.top-back-btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--primary);
    border-radius: 0.4rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
}

.top-back-btn:hover {
    background: rgba(59, 130, 246, 0.05);
}

.page-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
}

/* Create New Card */
.card.card-create-new {
    padding: 0;
    overflow: hidden;
}

.card.card-create-new .create-header {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0284c7 100%);
    padding: 1.25rem 1.5rem;
}

.card.card-create-new .create-header h1 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.card.card-create-new .create-form-box {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 0 0 1rem 1rem;
}

.card.card-create-new label {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.25rem;
    display: block;
}

.card.card-create-new input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Type Toggle Compact */
.type-toggle-compact {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.type-toggle-compact label {
    flex: 1;
    padding: 0.7rem 0.75rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    transition: all 0.2s;
    color: #666;
}

/* Übung ausgewählt - leichtes Blau */
.type-toggle-compact label:first-child.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #2563eb;
    font-weight: 600;
}

/* Erklärung ausgewählt - leichtes Grün */
.type-toggle-compact label:last-child.selected {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #16a34a;
    font-weight: 600;
}

.type-toggle-compact input {
    display: none;
}

/* Select Hint */
.select-hint {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.5rem;
}

/* Select Grid */
.select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.select-grid select {
    padding: 0.65rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: white;
}

/* Submit Button */
.card.card-create-new button[type="submit"] {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.card.card-create-new button[type="submit"]:hover {
    background: #2563eb;
}

/* Back Link mit mehr Abstand */
.back-link.back-link-spaced {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Edit Header Card */
.card.card-edit-header {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0284c7 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
}

.card.card-edit-header h1 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

/* Title Edit Box */
.title-edit-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.85rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.title-edit-box .title-text {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
}

.title-edit-box .title-edit-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.title-edit-box .title-edit-btn:hover {
    opacity: 1;
}

.title-edit-form {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.title-edit-form .title-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    font-size: 1rem;
}

.title-edit-form .title-save-btn {
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.title-edit-form .title-cancel-btn {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Step List für Lernobjekt erstellen */
.step-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.step-header strong {
    font-size: 1rem;
}

.step-actions {
    display: flex;
    gap: 0.25rem;
}

.step-actions button.icon {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    cursor: pointer;
}

.step-actions button.icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.step-actions button.icon.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.step-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-preview-img {
    width: 100%;
    max-width: 200px;
    border-radius: 0.5rem;
    object-fit: contain;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: white;
    border: 2px dashed #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: border-color 0.2s;
}

.file-upload-label:hover {
    border-color: var(--primary);
}

.file-upload-label input[type="file"] {
    display: none;
}

.step-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    resize: vertical;
}

.save-text-btn {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.finish-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.finish-section .button.primary {
    padding: 0.85rem 2rem;
    font-size: 1.1rem;
}

/* Compact Metadata Card */
.card.card-metadata-compact {
    padding: 1rem;
}

.card.card-metadata-compact .type-toggle-compact {
    margin-bottom: 0.75rem;
}

.card.card-metadata-compact .select-grid {
    margin-bottom: 0.5rem;
}

.card.card-metadata-compact .auto-save-status {
    font-size: 0.85rem;
    color: #888;
}

.card.card-metadata-compact .auto-save-status.saved {
    color: #10b981;
}

.card.card-metadata-compact .auto-save-status.error {
    color: #dc2626;
}

/* Simple Form für Lernobjekt erstellen */
.form-simple {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.title-input-big {
    font-size: 1.2rem;
    padding: 0.85rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 500;
}

.title-input-big:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-primary {
    padding: 0.85rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* LO Title Row */
.lo-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.lo-title-row h2 {
    margin: 0;
    font-size: 1.1rem;
}

.lo-type-badge {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
}

.lo-type-badge.exercise {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.lo-type-badge.explanation {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Dashboard Räume */
body.dashboard-page .room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

body.dashboard-page .room-card {
    padding: 1rem;
    gap: 0.5rem;
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dashboard-page .room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body.dashboard-page .room-card header {
    margin-bottom: 0.5rem;
}

body.dashboard-page .room-card h3 {
    font-size: 1.1rem;
    margin: 0;
}

body.dashboard-page .room-card .meta {
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

body.dashboard-page .room-card .status {
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

body.dashboard-page .room-card .button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

body.dashboard-page .room-card .button.full {
    width: 100%;
    text-align: center;
}

/* Room Edit Page */
.room-edit-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 1rem;
    color: white;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.room-edit-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%);
    pointer-events: none;
}

.room-edit-header .water-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: water-flow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes water-flow {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

.room-edit-header h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 1.75rem;
}

.room-edit-header .subtitle {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.room-edit-header .back-btn {
    color: white;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    transition: background 0.2s, transform 0.2s;
}

.room-edit-header .back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.room-edit-header .header-left,
.room-edit-header .header-right {
    position: relative;
    z-index: 1;
}

.room-edit-header .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-edit-header .header-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.room-edit-header .button.warning {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.room-edit-header .button.warning:hover {
    background: rgba(255,100,100,0.4);
}

.room-edit-header .view-toggle {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.room-edit-header .view-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.room-edit-header .delete-room-btn {
    background: rgba(255,100,100,0.3);
    border: 1px solid rgba(255,100,100,0.5);
    color: white;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background 0.2s;
    vertical-align: middle;
}

.room-edit-header .delete-room-btn:hover {
    background: rgba(255,100,100,0.6);
}

/* Room Edit Nahansicht (Standard) - normal wie andere Seiten */
body.room-edit-page .grid-two {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Room Edit Weitansicht - 2 Spalten, kompakter */
body.room-edit-page.wide-view .grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

body.room-edit-page.wide-view .card {
    padding: 0.75rem;
}

body.room-edit-page.wide-view .card h2 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

body.room-edit-page.wide-view .room-item-list li {
    padding: 0.5rem;
    font-size: 0.8rem;
}

body.room-edit-page.wide-view .lo-grid {
    gap: 0.4rem;
}

body.room-edit-page.wide-view .learning-object-card {
    padding: 0.6rem;
}

body.room-edit-page.wide-view .learning-object-card h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

body.room-edit-page.wide-view .learning-object-card p {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

body.room-edit-page.wide-view .tags {
    gap: 0.25rem;
}

body.room-edit-page.wide-view .tags li {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
}

body.room-edit-page.wide-view .button {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

body.room-edit-page.wide-view .filter-form input,
body.room-edit-page.wide-view .filter-form select {
    padding: 0.35rem;
    font-size: 0.75rem;
}

body.room-edit-page.wide-view .filter-form button {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

/* Room Page - Patientenansicht */
body.room-page {
    padding-top: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
}

.room-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.room-header-info {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.room-header h1 {
    font-size: 1.25rem;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.room-header .subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.view-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.view-toggle-hint {
    font-size: 0.6rem;
    color: var(--muted);
    animation: pulse 1.5s ease-in-out infinite;
    text-align: center;
}

.view-toggle-hint.hidden {
    display: none;
}

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

.view-toggle {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.view-toggle .view-icon {
    font-size: 1.1rem;
}

/* Room Summary - Übersicht */
.room-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%);
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.summary-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.summary-hint {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    color: var(--muted);
    margin-top: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Empty Room State */
.empty-room {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-room .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-room h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.empty-room p {
    color: var(--muted);
    margin: 0;
}

/* Room Page Main */
body.room-page main {
    padding: 0;
}

body.room-page .card.room-view {
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
}

body.room-page .card.info {
    margin: 1rem;
    border-radius: 0.75rem;
}

/* Nahansicht (Standard) - Bubbles für jede Übung */
body.room-page .learning-object-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

body.room-page .learning-object {
    padding: 1.25rem;
    border-radius: 1rem;
    border: none;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 100%;
}

body.room-page .learning-object h3 {
    font-size: 1.3rem;
}

body.room-page .learning-object p {
    font-size: 1.05rem;
    line-height: 1.6;
}

body.room-page .exercise-meta {
    font-size: 1rem;
}

body.room-page .exercise-meta li {
    padding: 0.5rem 1rem;
}

/* Schritte - Bild und Text untereinander */
body.room-page .learning-object-step {
    display: flex;
    flex-direction: column;
}

body.room-page .step-body {
    display: flex;
    flex-direction: column;
}

/* ALLE Container mit overflow:hidden */
body.room-page .learning-object {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

body.room-page .learning-object .content {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body.room-page .learning-object .content p,
body.room-page .step-body p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

body.room-page .learning-object-steps {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    list-style: none;
}

body.room-page .learning-object-steps li {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

body.room-page .learning-object-step {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

body.room-page .step-body {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

body.room-page .step-media {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

body.room-page .step-media img,
body.room-page .step-media video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    box-sizing: border-box;
}

/* Weitansicht - 2 Spalten Grid mit Bubbles */
body.room-page.wide-view .learning-object-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

body.room-page.wide-view .learning-object {
    padding: 0.6rem;
    border-radius: 0.75rem;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 0;
    overflow: hidden;
}

body.room-page.wide-view .learning-object h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

body.room-page.wide-view .learning-object > .content > p {
    font-size: 0.75rem;
    line-height: 1.4;
}

body.room-page.wide-view .number-badge {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.7rem;
}

body.room-page.wide-view .type-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
}

body.room-page.wide-view .exercise-meta {
    font-size: 0.7rem;
    gap: 0.25rem;
}

body.room-page.wide-view .exercise-meta li {
    padding: 0.2rem 0.4rem;
}

body.room-page.wide-view .learning-object-steps {
    font-size: 0.75rem;
}

body.room-page.wide-view .step-number {
    font-size: 0.7rem;
}

body.room-page.wide-view .room-summary {
    padding: 0.75rem;
    gap: 1.5rem;
}

body.room-page.wide-view .summary-count {
    font-size: 1.25rem;
}

body.room-page.wide-view .summary-label {
    font-size: 0.7rem;
}

body.room-page.wide-view .summary-hint {
    font-size: 0.7rem;
}

body.room-page.wide-view .room-header h1 {
    font-size: 1rem;
}

body.room-page.wide-view .room-header .subtitle {
    font-size: 0.75rem;
}

body.room-page.wide-view .card.info {
    margin: 0.5rem;
    padding: 0.75rem;
    font-size: 0.8rem;
}

body.room-page.wide-view .card.info h3 {
    font-size: 0.9rem;
}

/* Weitansicht Bilder */
body.room-page.wide-view .step-media {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
}

body.room-page.wide-view .step-media img,
body.room-page.wide-view .step-media video {
    width: 100%;
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Desktop Weitansicht - größere Schrift */
@media (min-width: 768px) {
    body.room-page.wide-view .learning-object h3 {
        font-size: 1.1rem;
    }
    
    body.room-page.wide-view .learning-object > .content > p,
    body.room-page.wide-view .step-body p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    body.room-page.wide-view .step-number {
        font-size: 0.95rem;
    }
    
    body.room-page.wide-view .exercise-meta {
        font-size: 0.95rem;
    }
    
    body.room-page.wide-view .exercise-meta li {
        font-size: 0.95rem;
        padding: 0.4rem 0.6rem;
    }
    
    body.room-page.wide-view .learning-object-steps {
        font-size: 1rem;
    }
    
    body.room-page.wide-view .number-badge {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
    
    body.room-page.wide-view .type-badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    body.room-page.wide-view .room-header h1 {
        font-size: 1.5rem;
    }
    
    body.room-page.wide-view .room-header .subtitle {
        font-size: 1rem;
    }
    
    body.room-page.wide-view .room-summary {
        padding: 1.25rem;
        gap: 2rem;
    }
    
    body.room-page.wide-view .summary-count {
        font-size: 2rem;
    }
    
    body.room-page.wide-view .summary-label {
        font-size: 1rem;
    }
    
    body.room-page.wide-view .summary-hint {
        font-size: 0.95rem;
    }
    
    body.room-page.wide-view .card.info {
        font-size: 1rem;
    }
    
    body.room-page.wide-view .card.info h3 {
        font-size: 1.2rem;
    }
    
    body.room-page.wide-view .step-media img,
    body.room-page.wide-view .step-media video {
        max-height: 50vh;
        border-radius: 10px !important;
    }
}

/* Desktop-Ansicht für Patienten-Raum: größere Schrift, kleinere Bilder */
@media (min-width: 768px) {
    /* Header größer */
    body.room-page .room-header {
        padding: 1.5rem 2rem;
    }
    
    body.room-page .room-header h1 {
        font-size: 2rem;
    }
    
    body.room-page .room-header .subtitle {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }
    
    body.room-page .view-toggle {
        font-size: 1.1rem;
        padding: 0.75rem 1.25rem;
    }
    
    /* Summary größer */
    body.room-page .room-summary {
        padding: 2rem;
        gap: 3rem;
    }
    
    body.room-page .summary-count {
        font-size: 3rem;
    }
    
    body.room-page .summary-label {
        font-size: 1.2rem;
    }
    
    body.room-page .summary-hint {
        font-size: 1.1rem;
        margin-top: 1rem;
    }
    
    /* Content größer */
    body.room-page .learning-object-list {
        max-width: 900px;
        margin: 0 auto;
    }
    
    body.room-page .learning-object h3 {
        font-size: 1.8rem;
    }
    
    body.room-page .learning-object p,
    body.room-page .learning-object .content p,
    body.room-page .step-body p {
        font-size: 1.3rem;
        line-height: 1.7;
    }
    
    body.room-page .step-number {
        font-size: 1.2rem;
        font-weight: 600;
    }
    
    body.room-page .exercise-meta {
        font-size: 1.2rem;
    }
    
    body.room-page .exercise-meta li {
        font-size: 1.2rem;
        padding: 0.6rem 1.2rem;
    }
    
    body.room-page .notes {
        font-size: 1.2rem;
    }
    
    body.room-page .learning-object-steps {
        font-size: 1.2rem;
    }
    
    body.room-page .step-media img,
    body.room-page .step-media video {
        max-width: 550px;
        width: 100%;
        height: auto !important;
        object-fit: contain;
        border-radius: 0.75rem !important;
    }
    
    body.room-page .learning-object-step {
        padding: 1rem 0;
    }
    
    /* Info Card größer */
    body.room-page .card.info {
        max-width: 900px;
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
    
    body.room-page .card.info h3 {
        font-size: 1.4rem;
    }
    
    body.room-page .card.info p {
        font-size: 1.15rem;
    }
    
    body.room-page .card.info .button {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Warning Button (sanftes Orange) */
.button.warning {
    background: #e8a54b;
    color: white;
}

.button.warning:hover {
    background: #d4923a;
}

/* Room Card Dropdown im Dashboard */
.room-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.room-header-row h3 {
    margin: 0;
    flex: 1;
}

.room-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    color: var(--muted);
    border-radius: 0.25rem;
}

.dropdown-toggle:active {
    background: var(--base-bg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 80px;
    z-index: 100;
}

.room-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--danger);
}

.dropdown-item:active {
    background: #fee2e2;
}

/* Room Edit Fernansicht - 2 Spalten nebeneinander */
body.room-edit-page.fern-view .grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

body.room-edit-page.fern-view .card {
    padding: 1rem;
}

body.room-edit-page.fern-view .card h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

body.room-edit-page.fern-view .room-item-list li {
    padding: 0.75rem;
    font-size: 0.9rem;
}

body.room-edit-page.fern-view .lo-results-list {
    gap: 0.5rem;
}

body.room-edit-page.fern-view .lo-result-item {
    padding: 0.5rem 0.75rem;
}

body.room-edit-page.fern-view .button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

body.room-edit-page.fern-view .filter-form input,
body.room-edit-page.fern-view .filter-form select {
    padding: 0.5rem;
    font-size: 0.85rem;
}

body.room-edit-page.fern-view .filter-form button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Zurück-Button */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--base-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--text);
    flex-shrink: 0;
}

.back-btn:active {
    background: var(--border);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: var(--danger);
}

/* Auto-Save Status */
.auto-save-status {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.auto-save-status.saving {
    color: var(--muted);
}

.auto-save-status.saved {
    color: var(--success);
}

.auto-save-status.error {
    color: var(--danger);
}

/* Room card button max width on large screens */
@media (min-width: 768px) {
    .room-card .button.full {
        max-width: 70%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Colored card backgrounds */
.card.card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-left: 3px solid rgba(59, 130, 246, 0.4);
}

.card.card-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06) 0%, rgba(236, 72, 153, 0.02) 100%);
    border-left: 3px solid rgba(236, 72, 153, 0.4);
}

/* Item Row */
.room-item-list li {
    position: relative;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    padding-right: 4rem;
    cursor: pointer;
}

.item-row .item-number {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

.item-row > strong {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 600;
}

.item-row .item-controls {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.item-row .move-btn {
    background: transparent;
    border: 2px solid #3B82F6;
    color: #3B82F6;
    padding: 0.7rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.item-row .move-btn:hover:not(:disabled) {
    background: #3B82F6;
    color: white;
}

.item-row .move-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.item-row .item-end {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.item-row .item-top-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.item-row .item-top-info .item-number {
    font-size: 0.75rem;
    color: #888;
}

.item-row .delete-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    margin-top: 0.25rem;
}

/* Item Preview */
.item-preview {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #ddd;
}

.item-preview .preview-label {
    font-size: 0.9rem;
    color: #888;
    display: block;
    margin-bottom: 0.5rem;
}

.item-preview .preview-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-preview .preview-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.item-preview .preview-thumb {
    width: 150px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 0.5rem;
    flex-shrink: 0;
    background: var(--bg-alt);
}

.item-preview .preview-thumb.placeholder {
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #888;
}

.item-preview .preview-info {
    flex: 1;
    min-width: 0;
}

.item-preview .preview-info strong {
    font-size: 0.95rem;
    display: block;
    color: #333;
}

.item-preview .preview-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0.15rem 0 0;
    line-height: 1.3;
}

.item-row .delete-btn:hover {
    color: #e53e3e;
}

/* Plan Hero */
.plan-hero {
    text-align: center;
    margin-bottom: 1rem;
}


.plan-hero h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

/* Simple Hint */
.simple-hint {
    font-size: 1rem;
    color: #888;
    margin: 0.25rem 0 0;
}

/* Item Settings - einklappbar */
.room-item-list li .item-settings {
    display: none;
    padding: 1rem 1.25rem;
    margin: 0 0 0.75rem;
    background: #fff;
    border-radius: 0 0 0.75rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-top: none;
}

.room-item-list li.settings-open .item-settings {
    display: block;
}


/* Saved Feedback - immer Platz reserviert, kein Ruckler */
.item-settings .saved-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: -1rem -1.25rem 0.75rem -1.25rem;
    background: #e5e7eb;
    color: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.75rem 0.75rem 0 0;
    transition: background 0.3s, color 0.3s;
}

.item-settings.just-saved .saved-feedback {
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
    color: white;
}


.setting-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row span {
    min-width: 120px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
}

.setting-row select,
.setting-row input,
.setting-row textarea {
    flex: 1;
    padding: 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    font-size: 1.1rem;
    max-width: 100%;
    box-sizing: border-box;
}

.setting-row textarea {
    resize: none;
    overflow: hidden;
    min-height: 2.5rem;
    font-family: inherit;
}

/* Search Card - Weiß */
.card.card-search {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Plan Card - Notizblock-Gelb */
.card.card-plan {
    background: #fffde7;
    border: 1px solid #f0e68c;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.card.card-plan .step-badge {
    background: rgba(0,0,0,0.06);
    color: #666;
}

.card.card-plan .plan-hero h2 {
    color: #333;
}

.card.card-plan .simple-hint {
    color: #666;
}

.search-hero {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-hero h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.search-subtitle {
    font-size: 0.9rem;
    color: #5f6368;
    margin: 0.25rem 0 1rem;
}

/* Search Wave - wellige Linie unter dem Button */
.search-wave {
    text-align: center;
    margin-top: 1.5rem;
}

.search-wave svg {
    width: 100%;
    height: 20px;
}

.search-wave p {
    font-size: 0.85rem;
    color: #5f6368;
    margin: 0.5rem 0 0;
}

/* Search Filters */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.search-filters select {
    flex: 1;
    min-width: 140px;
    padding: 0.9rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    background: #f8f9fa;
    font-size: 1.1rem;
}

.search-filters select:focus {
    outline: none;
    border-color: #4285F4;
    background: white;
}

.big-search-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.big-search-btn:hover {
    background: #3367D6;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

.big-search-btn:active {
    background: #2A56C6;
}

/* Schritt-Badge */
.step-badge {
    display: inline-block;
    background: rgba(0,0,0,0.08);
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.card.card-action .step-badge {
    background: rgba(255,255,255,0.4);
    color: #0369A1;
}

/* Brain Hint mit Vibrationslinie */
.brain-hint {
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
}

.brain-hint p {
    font-size: 0.9rem;
    color: #0369A1;
    font-weight: 500;
    margin: 0.75rem 0 0;
}

.brain-hint small {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.pulse-line {
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #7DD3FC 10%, 
        #0EA5E9 25%, 
        #7DD3FC 40%,
        #0EA5E9 50%,
        #7DD3FC 60%,
        #0EA5E9 75%,
        #7DD3FC 90%,
        transparent 100%
    );
    border-radius: 2px;
    animation: pulse-wave 2s ease-in-out infinite;
}

@keyframes pulse-wave {
    0%, 100% { 
        opacity: 0.5;
        transform: scaleX(0.95);
    }
    50% { 
        opacity: 1;
        transform: scaleX(1);
    }
}

.card {
    position: relative;
}

/* Info-Hinweis */
.info-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
}

/* Create new hint */
.create-new-hint {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    text-align: center;
}

.create-new-hint p {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.create-new-hint a {
    color: var(--primary);
    font-weight: 500;
}

/* Room item title and badges */
.item-title {
    font-size: 1.1rem;
}

.item-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-exercise {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.badge-explanation {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* Move buttons soft colors */
.move-btn.move-up {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.move-btn.move-up:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
}

.move-btn.move-down {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.move-btn.move-down:hover:not(:disabled) {
    background: rgba(249, 115, 22, 0.2);
}

.move-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Tap hint for search results */
.tap-hint {
    font-size: 0.9rem;
    text-align: center;
    margin: 0.75rem 0;
    color: #666;
}

/* Scroll to search floating button */
.scroll-to-search-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scroll-to-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.scroll-to-search-btn:active {
    transform: translateY(0);
}

