/* ============================================
   WebOfficeSchule - Stylesheet
   Version 2.0 - Neues Farbschema
   Hell = Standard, Dunkel = Schiefergrau
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   BASIS - HELLES THEME (Standard)
   ============================================ */

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #2c3e50;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   DARK THEME - Schiefergrau
   ============================================ */

body.dark-theme {
    background: #1e272e;
    color: #dfe6e9;
}

/* ============================================
   APP CONTAINER
   ============================================ */

.app-container {
    display: flex;
    height: 100vh;
}

/* ============================================
   SIDEBAR - Hell
   ============================================ */

.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    position: relative;
}

.sidebar.hidden {
    margin-left: -280px;
}

.sidebar-header {
    padding: 20px;
    background: #f8f9fa;
    color: #2c3e50;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.sidebar-header h2 {
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Dark Theme - Sidebar */
body.dark-theme .sidebar {
    background: #2d3436;
    border-right-color: #4a5568;
}

body.dark-theme .sidebar-header {
    background: #374151;
    color: #dfe6e9;
    border-bottom-color: #4a5568;
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f0f2f5;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #636e72;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: #e0e0e0;
    color: #2c3e50;
    border-color: #999999;
}

body.dark-theme .theme-toggle {
    background: #4a5568;
    border-color: #636e72;
    color: #dfe6e9;
}

body.dark-theme .theme-toggle:hover {
    background: #636e72;
    color: #ffffff;
}

/* ============================================
   FILE ACTIONS & FILTER
   ============================================ */

.file-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.file-filter {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: transparent;
    color: #636e72;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f0f2f5;
    border-color: #999999;
}

.filter-btn.active {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

body.dark-theme .filter-btn {
    border-color: #4a5568;
    color: #a0aec0;
}

body.dark-theme .filter-btn:hover {
    background: #4a5568;
    color: #dfe6e9;
}

body.dark-theme .filter-btn.active {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

.btn-small {
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #27ae60;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #219a52;
    border-color: #219a52;
}

.btn-small.danger {
    background: #e74c3c;
    border-color: #e74c3c;
}

.btn-small.danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

body.dark-theme .btn-small {
    background: #27ae60;
    border-color: #27ae60;
}

/* ============================================
   FILE LIST
   ============================================ */

.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f2f5;
    border-left: 3px solid transparent;
    position: relative;
}

.file-item:hover {
    background: #f8f9fa;
    border-left-color: #3498db;
}

.file-item.active {
    background: #e8f4f8;
    border-left-color: #27ae60;
}

body.dark-theme .file-item {
    border-bottom-color: #374151;
}

body.dark-theme .file-item:hover {
    background: #374151;
}

body.dark-theme .file-item.active {
    background: #3d4f5f;
    border-left-color: #27ae60;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .file-name {
    color: #dfe6e9;
}

.file-type {
    font-size: 16px;
}

.file-date {
    font-size: 11px;
    color: #7f8c8d;
}

body.dark-theme .file-date {
    color: #a0aec0;
}

.file-actions-mini {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.file-item:hover .file-actions-mini {
    opacity: 1;
}

/* ============================================
   SIDEBAR FOOTER
   ============================================ */

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

body.dark-theme .sidebar-footer {
    background: #374151;
    border-top-color: #4a5568;
}

.license-info {
    text-align: center;
}

.license-info .author {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 12px;
}

.license-info .website {
    color: #7f8c8d;
    margin-bottom: 6px;
    font-size: 11px;
}

.license-info .license {
    color: #636e72;
    margin-bottom: 12px;
    font-size: 10px;
}

body.dark-theme .license-info .author {
    color: #dfe6e9;
}

body.dark-theme .license-info .website,
body.dark-theme .license-info .license {
    color: #a0aec0;
}

.terms-link {
    display: inline-block;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 10px;
    border: 1px solid #d0d0d0;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.terms-link:hover {
    color: #2c3e50;
    border-color: #999999;
    background: #f0f2f5;
}

body.dark-theme .terms-link {
    color: #a0aec0;
    border-color: #4a5568;
}

body.dark-theme .terms-link:hover {
    color: #dfe6e9;
    background: #4a5568;
}

/* ============================================
   STORAGE INFO
   ============================================ */

.storage-info {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.storage-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.storage-used {
    height: 100%;
    background: #27ae60;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.storage-text {
    font-size: 11px;
    color: #7f8c8d;
    text-align: center;
}

body.dark-theme .storage-info {
    background: rgba(255, 255, 255, 0.02);
    border-top-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .storage-bar {
    background: #4a5568;
}

body.dark-theme .storage-text {
    color: #a0aec0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dark-theme .main-content {
    background: #1e272e;
}

/* ============================================
   APP TABS
   ============================================ */

.app-tabs {
    background: #ffffff;
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

body.dark-theme .app-tabs {
    background: #2d3436;
    border-bottom-color: #4a5568;
}

.sidebar-toggle {
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    border-right: 1px solid #e0e0e0;
}

.sidebar-toggle:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

body.dark-theme .sidebar-toggle {
    border-right-color: #4a5568;
    color: #a0aec0;
}

body.dark-theme .sidebar-toggle:hover {
    color: #dfe6e9;
    background: #374151;
}

.app-tab {
    padding: 16px 32px;
    background: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.app-tab:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.app-tab.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

body.dark-theme .app-tab {
    color: #a0aec0;
}

body.dark-theme .app-tab:hover {
    color: #dfe6e9;
    background: #374151;
}

body.dark-theme .app-tab.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

/* ============================================
   TOOLBAR
   ============================================ */

.toolbar {
    background: #ffffff;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-theme .toolbar {
    background: #2d3436;
    border-bottom-color: #4a5568;
}

.sticky-toolbar {
    position: sticky !important;
    top: 0;
    z-index: 500;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.toolbar-group label {
    color: #7f8c8d;
    font-size: 11px;
    font-weight: 500;
    margin-right: 6px;
    white-space: nowrap;
}

body.dark-theme .toolbar-group label {
    color: #a0aec0;
}

.toolbar button {
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #2c3e50;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar button:hover {
    background: #f0f2f5;
    border-color: #999999;
}

.toolbar button.active {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

body.dark-theme .toolbar button {
    background: #374151;
    border-color: #4a5568;
    color: #dfe6e9;
}

body.dark-theme .toolbar button:hover {
    background: #4a5568;
    border-color: #636e72;
}

body.dark-theme .toolbar button.active {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

.toolbar select {
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
    color: #2c3e50;
    height: 32px;
    cursor: pointer;
}

.toolbar select:hover {
    border-color: #999999;
}

body.dark-theme .toolbar select {
    background: #374151;
    border-color: #4a5568;
    color: #dfe6e9;
}

body.dark-theme .toolbar select option {
    background: #374151;
    color: #dfe6e9;
}

.toolbar input[type="color"] {
    width: 32px;
    height: 32px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

body.dark-theme .toolbar input[type="color"] {
    border-color: #4a5568;
}

.doc-title {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 14px;
    height: 32px;
}

.doc-title::placeholder {
    color: #a0aec0;
}

.doc-title:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

body.dark-theme .doc-title {
    background: #374151;
    border-color: #4a5568;
    color: #dfe6e9;
}

body.dark-theme .doc-title::placeholder {
    color: #636e72;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content-area {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.content-area.active {
    display: flex;
    flex-direction: column;
}

/* ============================================
   EDITOR CONTAINER
   ============================================ */

.editor-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #f0f2f5;
    height: 100%;
    min-height: 0;
    position: relative;
    transition: padding-right 0.3s ease;
}

body.dark-theme .editor-container {
    background: #1e272e;
}

/* Wenn Outline offen ist */
.editor-container.outline-open {
    padding-right: 304px;
}

/* ============================================
   EDITOR
   ============================================ */

.editor {
    min-height: 500px;
    padding: 50px 60px;
    border: none;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    outline: none;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14pt;
    line-height: 1.7;
    max-width: 210mm;
    margin: 0 auto;
    color: #2c3e50;
    position: relative;
}

.editor:focus {
    box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

body.dark-theme .editor {
    background: #ffffff;
    color: #2c3e50;
}

.editor.font-serif, .slide-editor.font-serif {
    font-family: 'Georgia', 'Times New Roman', serif;
}

.editor.font-sans-serif, .slide-editor.font-sans-serif {
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.editor.font-monospace, .slide-editor.font-monospace {
    font-family: 'Consolas', 'Monaco', monospace;
}

.editor ul, .editor ol, .slide-editor ul, .slide-editor ol {
    margin: 12px 0;
    padding-left: 30px;
}

.editor ul li, .editor ol li, .slide-editor ul li, .slide-editor ol li {
    margin: 6px 0;
    line-height: 1.7;
}

/* Small-Tag Styling */
.editor small, .slide-editor small {
    font-size: 0.85em;
    color: inherit;
}

/* ============================================
   FLOATING IMAGES
   ============================================ */

.floating-image-container {
    border: 2px solid transparent !important;
    transition: border-color 0.3s, opacity 0.3s;
    cursor: move;
}

.floating-image-container.selected,
.floating-image-container:hover {
    border-color: #3498db !important;
}

.floating-image-container.border-hidden {
    border-color: transparent !important;
}

.image-controls,
.resize-handle,
.image-delete-btn {
    opacity: 0 !important;
    transition: opacity 0.3s;
}

.floating-image-container:hover .image-controls,
.floating-image-container:hover .resize-handle,
.floating-image-container:hover .image-delete-btn,
.floating-image-container.selected .resize-handle,
.floating-image-container.selected .image-delete-btn {
    opacity: 1 !important;
}

.floating-image-container.border-hidden .resize-handle,
.floating-image-container.border-hidden .image-delete-btn {
    opacity: 0 !important;
}

/* ============================================
   PRESENTATION CONTAINER
   ============================================ */

.presentation-container {
    flex: 1;
    display: flex;
    background: #f0f2f5;
    overflow: hidden;
}

body.dark-theme .presentation-container {
    background: #1e272e;
}

/* ============================================
   SLIDES SIDEBAR
   ============================================ */

.slides-sidebar {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

body.dark-theme .slides-sidebar {
    background: #2d3436;
    border-right-color: #4a5568;
}

.slides-header {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

body.dark-theme .slides-header {
    background: #374151;
    border-bottom-color: #4a5568;
}

.slides-header h3 {
    font-size: 12px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 12px;
}

body.dark-theme .slides-header h3 {
    color: #dfe6e9;
}

.slide-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.slide-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.slide-item:active {
    cursor: grabbing;
}

.slide-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.slide-item:hover {
    border-color: #3498db;
}

.slide-item.active {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

body.dark-theme .slide-item {
    background: #374151;
    border-color: #4a5568;
}

body.dark-theme .slide-item:hover {
    border-color: #3498db;
}

body.dark-theme .slide-item.active {
    border-color: #27ae60;
}

.slide-drag-handle {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: grab;
    color: #a0aec0;
    font-size: 12px;
    user-select: none;
}

.slide-preview {
    aspect-ratio: 16/9;
    background: #ffffff;
    color: #2c3e50;
    padding: 8px;
    font-size: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-left: 12px;
    pointer-events: none;
    user-select: none;
    border-radius: 2px;
}

.slide-number {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #27ae60;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

/* ============================================
   SLIDE EDITOR
   ============================================ */

.presentation-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: auto;
    min-height: 0;
    justify-content: center;
    align-items: center;
}

.slide-editor {
    width: 800px;
    height: 450px;
    background: #ffffff;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    outline: none;
    padding: 40px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 18pt;
    color: #2c3e50;
    overflow: auto;
    position: relative;
    margin: 0 auto;
}

.slide-editor:focus {
    box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

.editor, .slide-editor {
    min-height: 500px;
    position: relative;
}

/* ============================================
   STATUS BAR
   ============================================ */

.status-bar {
    background: #ffffff;
    padding: 10px 24px;
    font-size: 11px;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e0e0e0;
}

body.dark-theme .status-bar {
    background: #2d3436;
    border-top-color: #4a5568;
    color: #a0aec0;
}

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
    position: relative;
    margin: 20px 0;
    display: block;
    width: 100%;
    transition: outline 0.3s;
}

.table-wrapper.table-selected,
.table-wrapper:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.table-controls {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    align-items: center;
}

body.dark-theme .table-controls {
    background: #374151;
}

.table-wrapper:hover .table-controls,
.table-wrapper.table-selected .table-controls {
    display: flex !important;
}

.table-controls button {
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    background: #f8f9fa;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    transition: all 0.2s;
    color: #2c3e50;
}

.table-controls button:hover {
    background: #e0e0e0;
}

body.dark-theme .table-controls button {
    background: #4a5568;
    border-color: #636e72;
    color: #dfe6e9;
}

.delete-hint {
    font-size: 10px;
    color: #a0aec0;
    margin-left: auto;
    white-space: nowrap;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
}

table td,
table th {
    border: 1px solid #d0d0d0;
    padding: 10px 12px;
    min-width: 80px;
    outline: none;
    transition: background-color 0.2s;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    background: transparent;
    font-weight: normal;
}

table th {
    font-weight: 600;
    background: #f8f9fa;
}

table td:focus,
table th:focus {
    background-color: rgba(52, 152, 219, 0.1);
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

body.dark-theme .modal-content {
    background: #2d3436;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

body.dark-theme .modal-content h3 {
    color: #dfe6e9;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    background: #ffffff;
    color: #2c3e50;
}

body.dark-theme .modal-content input,
body.dark-theme .modal-content select {
    background: #374151;
    border-color: #4a5568;
    color: #dfe6e9;
}

.modal-content button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    transition: all 0.2s;
}

.modal-content button.primary {
    background: #27ae60;
    color: #ffffff;
}

.modal-content button.primary:hover {
    background: #219a52;
}

.modal-content button.secondary {
    background: #e0e0e0;
    color: #2c3e50;
}

.modal-content button.secondary:hover {
    background: #d0d0d0;
}

body.dark-theme .modal-content button.secondary {
    background: #4a5568;
    color: #dfe6e9;
}

/* ============================================
   TEMPLATE SELECTOR
   ============================================ */

.template-selector {
    max-width: 600px;
}

.template-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.template-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}

.template-option:hover {
    transform: scale(1.05);
}

.template-preview {
    width: 150px;
    height: 100px;
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

body.dark-theme .template-preview {
    background: #374151;
}

.template-option span {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
}

body.dark-theme .template-option span {
    color: #a0aec0;
}

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */

.two-column-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.column-left,
.column-right {
    flex: 1;
    padding: 10px;
    min-height: 200px;
    position: relative;
    text-align: left;
    vertical-align: top;
}

/* Title template layout */
.title-layout {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 400px;
    padding-bottom: 60px;
}

.title-layout h1 {
    margin-bottom: 15px;
}

.title-layout hr {
    border: none;
    border-top: 2px solid #2c3e50;
    margin: 15px 0;
}

.title-layout .subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    font-style: italic;
}

/* ============================================
   FULLSCREEN PRESENTATION
   ============================================ */

.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e272e;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-container .slide-editor {
    width: 90%;
    max-width: 1400px;
    height: 80vh;
    max-height: 800px;
    font-size: 24pt;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.fullscreen-nav-left,
.fullscreen-nav-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10001;
}

.fullscreen-nav-left {
    left: 20px;
}

.fullscreen-nav-right {
    right: 20px;
}

.fullscreen-nav-left:hover,
.fullscreen-nav-right:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-nav-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(231, 76, 60, 0.8);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10001;
}

.fullscreen-nav-close:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

.fullscreen-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
}

/* ============================================
   GLIEDERUNG / OUTLINE PANEL
   Styles sind in weboffice-outline.js
   ============================================ */

/* ============================================
   SHAPES
   ============================================ */

.weboffice-shape {
    box-sizing: border-box;
    user-select: none;
}

.weboffice-shape .shape-resize-handle,
.weboffice-shape .shape-rotate-handle,
.weboffice-shape .shape-delete-btn,
.weboffice-shape .shape-color-picker {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.weboffice-shape:hover .shape-resize-handle,
.weboffice-shape:hover .shape-rotate-handle,
.weboffice-shape:hover .shape-delete-btn,
.weboffice-shape:hover .shape-color-picker,
.weboffice-shape.active .shape-resize-handle,
.weboffice-shape.active .shape-rotate-handle,
.weboffice-shape.active .shape-delete-btn,
.weboffice-shape.active .shape-color-picker {
    opacity: 1;
}

.shape-delete-btn:hover {
    background-color: #c0392b !important;
    transform: scale(1.1);
}

.shape-resize-handle:hover {
    background-color: #2980b9 !important;
    transform: scale(1.2);
}

.weboffice-shape.dragging {
    cursor: grabbing !important;
}

.weboffice-shape * {
    pointer-events: none;
}

.weboffice-shape .shape-resize-handle,
.weboffice-shape .shape-rotate-handle,
.weboffice-shape .shape-delete-btn,
.weboffice-shape .shape-color-picker {
    pointer-events: auto;
}

/* ============================================
   HIGHLIGHT FOR OUTLINE NAVIGATION
   ============================================ */

.outline-highlight {
    animation: outlineHighlight 2s ease-out;
}

@keyframes outlineHighlight {
    0% {
        background-color: rgba(52, 152, 219, 0.4);
    }
    100% {
        background-color: transparent;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .app-tabs,
    .toolbar,
    .status-bar,
    .modal,
    .outline-panel,
    .shape-resize-handle,
    .shape-rotate-handle,
    .shape-delete-btn,
    .shape-color-picker {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .editor,
    .slide-editor {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
    }
}

/* ============================================
   RESPONSIVE - Mobile & Tablet
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
        margin-left: 0;
    }
    
    .sidebar:not(.hidden) {
        transform: translateX(0);
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
        margin-left: 0;
    }
    
    .app-tabs {
        flex-wrap: wrap;
    }
    
    .app-tab {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .toolbar {
        padding: 10px;
        gap: 8px;
    }
    
    .toolbar-group {
        flex-wrap: wrap;
    }
    
    .toolbar-group label {
        display: none;
    }
    
    .editor-container {
        padding: 15px;
    }
    
    .editor {
        padding: 30px 20px;
        font-size: 12pt;
    }
    
    .slides-sidebar {
        width: 120px;
    }
    
    .slide-editor {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
    
    .presentation-main {
        padding: 15px;
    }
    
    /* Fullscreen auf Mobile */
    .fullscreen-container .slide-editor {
        width: 95% !important;
        height: 90vh !important;
        padding: 30px !important;
        font-size: 16pt !important;
    }
    
    .fullscreen-nav-left,
    .fullscreen-nav-right {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .fullscreen-nav-left {
        left: 10px;
    }
    
    .fullscreen-nav-right {
        right: 10px;
    }
    
    /* Touch Targets */
    .shape-resize-handle,
    .shape-rotate-handle,
    .shape-delete-btn,
    .shape-color-picker {
        width: 28px !important;
        height: 28px !important;
        opacity: 0.7 !important;
    }
    
    /* Outline Panel Mobile */
    .outline-panel {
        width: 100%;
        max-width: 280px;
        right: -100%;
    }
    
    .editor-container.outline-open {
        padding-right: 24px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .toolbar-group label {
        font-size: 10px;
    }
    
    .editor {
        padding: 40px;
    }
    
    .fullscreen-container .slide-editor {
        width: 92% !important;
        height: 85vh !important;
        padding: 50px !important;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .editor {
        max-width: 240mm;
        padding: 60px 80px;
    }
    
    .fullscreen-container .slide-editor {
        max-width: 1600px !important;
        height: 85vh !important;
    }
}
