:root {
    /* Colors - Kahoot Palette */
    --k-blue: #006aff;
    --k-dark-blue: #0b1a51;
    --k-red: #e21b3c;
    --k-yellow: #d89e00;
    --k-green: #26890c;
    --k-teal: #1368ce;

    /* Theme Colors - Dark Mode Default */
    --bg-main: #121212;
    --bg-header: #1e1e1e;
    --bg-sidebar: #1e1e1e;
    --bg-panel: #242424;
    --bg-canvas: #121212;
    --text-main: #f5f5f5;
    --text-muted: #b0b0b0;
    --border-color: #333333;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --hover-overlay: rgba(255,255,255,0.08);

    /* Layout */
    --header-height: 56px;
    --left-sidebar-width: 200px;
    --right-sidebar-width: 280px;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow: hidden; /* App-like feel */
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

input, select, textarea {
    font-family: inherit;
    outline: none;
}

/* -----------------------------
   Layout Shell
----------------------------- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-placeholder {
    font-weight: 800;
    font-size: 24px;
    color: #46178f; /* Kahoot Purple Logo */
    margin-right: 16px;
}

.presentation-title {
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: text;
}
.presentation-title:hover {
    border-color: var(--border-color);
    background: var(--hover-overlay);
}

.header-btn {
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.2s;
    border: 1px solid var(--border-color);
}
.header-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header-btn:active {
    transform: translateY(0);
}
.header-btn.primary {
    background-color: var(--k-blue);
    color: white;
    border: none;
}
.header-btn.primary:hover {
    background-color: #0056d6;
}

/* Workspace main area */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar */
.left-sidebar {
    width: var(--left-sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 5;
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
}

.slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slide-item-wrapper {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: flex-start;
}
.slide-item-wrapper:hover {
    background: #f8f8f8;
}
.slide-item-wrapper.active {
    background: #e5f0ff;
    border-left: 4px solid var(--k-blue);
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

.slide-content-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.slide-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.slide-thumb i {
    font-size: 24px;
    color: #ccc;
}

.sidebar-actions {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.add-slide-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--k-blue);
    color: white;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 4px 0 #0056d6;
    transition: transform 0.1s, box-shadow 0.1s;
}
.add-slide-btn:active {
    transform: translateY(4px) scale(0.98);
    box-shadow: 0 0 0 transparent;
}
.add-slide-btn:hover {
    filter: brightness(1.1);
}

/* Right Sidebar */
.right-sidebar {
    width: var(--right-sidebar-width);
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 5;
    box-shadow: -2px 0 5px rgba(0,0,0,0.02);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}
.config-section label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.config-section select, .config-section input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-panel);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}
.sidebar-footer button {
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-delete:hover { background: #fee; color: var(--k-red); border-color: var(--k-red); }
.btn-duplicate:hover { background: var(--hover-overlay); }


/* Center Canvas (Editor) */
.editor-canvas {
    flex: 1;
    background-color: var(--bg-canvas);
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    overflow-y: auto;
    align-items: center;
}

.canvas-header {
    width: 100%;
    max-width: 900px;
    background: var(--bg-panel);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 16px 24px;
    text-align: center;
}

.question-input {
    width: 100%;
    border: none;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    background: transparent;
}
.question-input::placeholder {
    color: #aaa;
}

.media-placeholder {
    width: 100%;
    max-width: 600px;
    height: 300px;
    background-color: var(--bg-panel);
    border: 2px dashed #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.media-placeholder:hover {
    border-color: var(--k-blue);
    background-color: #f5f9ff;
    transform: scale(1.01);
}
.media-placeholder.drag-over {
    border-color: var(--k-blue);
    background-color: #e5f0ff;
    transform: scale(1.02);
}
.media-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
    font-weight: 600;
}
.media-inner i {
    font-size: 32px;
    color: #888;
}

.answers-container {
    width: 100%;
    max-width: 900px;
    flex: 1;
    display: grid;
    gap: 12px;
    /* Grid layout controlled by specific classes in JS */
}

/* Base Answer Box */
.answer-box {
    background: var(--bg-panel);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    position: relative;
    min-height: 80px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}
.answer-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    z-index: 2;
}
.answer-box.red { background-color: var(--k-red); }
.answer-box.blue { background-color: var(--k-blue); }
.answer-box.yellow { background-color: var(--k-yellow); }
.answer-box.green { background-color: var(--k-green); }

.answer-shape {
    width: 32px;
    height: 32px;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.answer-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: 600;
    width: 100%;
}
.answer-input::placeholder { color: rgba(255,255,255,0.7); }

.correct-check {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    margin-left: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.correct-check:hover { background: rgba(255,255,255,0.2); }
.answer-box.is-correct .correct-check {
    background: #66bf39; /* Success green */
    border-color: #66bf39;
    color: white;
}
.correct-check i {
    display: none;
    font-size: 20px;
}
.answer-box.is-correct .correct-check i {
    display: block;
}


/* Layout grids for specific question types */
.answers-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.answers-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

/* -----------------------------
   Modal
----------------------------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-panel);
    width: 900px;
    max-width: 95vw;
    height: 80vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 { font-size: 20px; font-weight: 700; }
.close-modal-btn { font-size: 28px; line-height: 1; color: #666; font-weight: bold;}
.close-modal-btn:hover { color: var(--k-red); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.category-block h3 {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 16px;
}

.grid-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.type-option {
    background: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    transition: all 0.2s;
}
.type-option:hover {
    background: white;
    border-color: var(--k-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.type-option .icon-fallback {
    font-size: 32px;
    color: var(--k-dark-blue);
}
.type-option img {
    width: 40px;
    height: 48px;
    object-fit: contain;
}

.type-option span {
    font-weight: 600;
    font-size: 14px;
}

/* Star icon for premium features */
.star-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #17a48d; /* Teal matching image */
    background: white;
    border-radius: 50%;
    width: 20px; height: 20px;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* -----------------------------
   Toast Notification
----------------------------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* -----------------------------
   Preview Mode Overlay
----------------------------- */
.preview-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-main);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}
.preview-overlay.active {
    transform: translateY(0);
}
.preview-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.preview-timer {
    background: #46178f; /* Kahoot Purple */
    color: white;
    font-size: 32px;
    font-weight: 800;
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center; justify-content: center;
}
.preview-exit-btn {
    padding: 10px 20px;
    background: var(--k-red);
    color: white;
    font-weight: 700;
    border-radius: 4px;
    font-size: 16px;
}
.preview-exit-btn:hover { background: #b0102b; }

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 32px;
    overflow-y: auto;
}
.preview-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    background: var(--bg-panel);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}
.preview-media {
    max-height: 40vh;
    max-width: 80vw;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.preview-answers {
    width: 100%;
    max-width: 1000px;
}
/* Allow preview boxes to grow taller easily */
.preview-answers .answer-box {
    cursor: pointer;
    min-height: 120px;
    transition: transform 0.1s, opacity 0.2s;
}
.preview-answers .answer-box:active {
    transform: scale(0.98);
}
.preview-answers .answer-input {
    cursor: pointer;
    text-align: center;
    font-size: 28px;
}
.preview-answers .answer-box.dimmed {
    opacity: 0.5;
}
/* -----------------------------
   Advanced Player/Preview Mode Styles
----------------------------- */
.preview-overlay {
    background: var(--bg-main);
    /* subtle pattern for player background */
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 2px, transparent 2px);
    background-size: 30px 30px;
}

.player-title-card {
    background: var(--bg-panel);
    padding: 24px 48px;
    border-radius: 8px;
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    max-width: 900px;
    width: 100%;
}

.player-answers-grid {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* fills bottom area nicely */
    flex: 1;
    min-height: 40vh;
}
.player-answers-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.player-answers-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.player-ans-btn {
    border-radius: 8px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    padding: 24px;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s, box-shadow 0.1s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.player-ans-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 rgba(0,0,0,0.2);
}
.player-ans-btn.selected {
    filter: brightness(1.1);
    outline: 4px solid white;
    outline-offset: -8px;
}
.player-ans-btn.dimmed {
    opacity: 0.4;
    filter: grayscale(0.5);
    pointer-events: none;
}

.player-ans-btn.red { background-color: var(--k-red); }
.player-ans-btn.blue { background-color: var(--k-blue); }
.player-ans-btn.yellow { background-color: var(--k-yellow); }
.player-ans-btn.green { background-color: var(--k-green); }

.player-shape-icon {
    width: 64px;
    height: 64px;
    background: white;
    margin-right: 32px;
    flex-shrink: 0;
}
.player-ans-btn.red .player-shape-icon { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.player-ans-btn.blue .player-shape-icon { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.player-ans-btn.yellow .player-shape-icon { border-radius: 50%; }
.player-ans-btn.green .player-shape-icon { border-radius: 4px; transform: rotate(45deg); }

.player-ans-text {
    color: white;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}


/* Text Input Player */
.player-text-input-wrapper {
    background: var(--bg-panel);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 800px;
}
.player-text-input {
    width: 100%;
    padding: 24px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    border: 4px solid var(--border-color);
    border-radius: 8px;
    background: #333;
    color: var(--text-main);
    transition: border-color 0.2s;
}
.player-text-input:focus {
    border-color: var(--k-blue);
    background: #444;
}
.player-submit-btn {
    padding: 16px 48px;
    font-size: 24px;
    font-weight: 800;
    background: var(--k-blue);
    color: white;
    border-radius: 4px;
    box-shadow: 0 6px 0 #0056d6;
    transition: transform 0.1s, box-shadow 0.1s;
}
.player-submit-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #0056d6;
}

/* Slider Player */
.player-slider-wrapper {
    background: var(--bg-panel);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    text-align: center;
}
.player-slider-value {
    font-size: 64px;
    font-weight: 800;
    color: var(--k-blue);
    margin-bottom: 24px;
}
.player-range {
    width: 100%;
    height: 16px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 8px;
    outline: none;
    margin-bottom: 16px;
}
.player-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--k-blue);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 4px solid var(--bg-panel);
}
.player-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Result Overlay Player */
.player-result-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1000;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.player-result-overlay.correct {
    background-color: var(--k-green);
    display: flex;
}
.player-result-overlay.incorrect {
    background-color: var(--k-red);
    display: flex;
}
.player-result-overlay.neutral {
    background-color: var(--k-blue);
    display: flex;
}
.result-text {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 12px;
}
.result-points-pill {
    background: rgba(0,0,0,0.2);
    padding: 16px 32px;
    border-radius: 64px;
    font-size: 48px;
    font-weight: 800;
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Fahoot multi-game controls and motion */
.fahoot-picker {
    min-width: 210px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-weight: 700;
}

.presentation-title {
    background: transparent;
    color: var(--text-main);
    min-width: 220px;
}

.header-btn:disabled,
.add-slide-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.danger-soft {
    color: #ff8d9d;
    border-color: rgba(226, 27, 60, 0.45);
}

.editor-locked .workspace {
    pointer-events: none;
    opacity: 0.56;
    filter: grayscale(0.2);
}

.editor-locked .workspace::after {
    content: "Bearbeiten gesperrt";
    position: fixed;
    left: 50%;
    top: 74px;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(18, 18, 18, 0.92);
    color: white;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
}

@keyframes fahootRise {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fahootPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0,106,255,0); }
    50% { box-shadow: 0 0 28px rgba(0,106,255,0.28); }
}

.top-header,
.left-sidebar,
.right-sidebar,
.editor-canvas {
    animation: fahootRise 360ms ease both;
}

.slide-item-wrapper,
.answer-box,
.type-option,
.media-placeholder {
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.slide-item-wrapper:hover,
.answer-box:hover,
.type-option:hover,
.media-placeholder:hover {
    transform: translateY(-2px);
}

.slide-item-wrapper.active {
    animation: fahootPulse 1.8s ease-in-out infinite;
}

.preview-overlay.active,
.modal-overlay.active {
    animation: fahootRise 220ms ease both;
}

/* Fahoot v2 customization */
body[data-fahoot-bg="neon"] .editor-canvas { background: radial-gradient(circle at 20% 20%, rgba(0,245,255,.12), transparent 32%), radial-gradient(circle at 80% 10%, rgba(124,60,255,.18), transparent 34%), var(--bg-canvas); }
body[data-fahoot-bg="classroom"] .editor-canvas { background: linear-gradient(135deg, rgba(19,104,206,.16), rgba(255,176,0,.08)), var(--bg-canvas); }
body[data-fahoot-bg="party"] .editor-canvas { background: radial-gradient(circle at 30% 20%, rgba(255,210,63,.18), transparent 30%), radial-gradient(circle at 80% 70%, rgba(226,27,60,.18), transparent 34%), var(--bg-canvas); }
body[data-fahoot-motion="low"] * { animation-duration: .001ms !important; transition-duration: 80ms !important; }
body[data-fahoot-motion="high"] .slide-item-wrapper.active { animation-duration: 1s; }
.logo-placeholder { color: var(--fahoot-primary, #46178f); }
.theme-panel {
    position: fixed;
    right: 16px;
    top: 72px;
    width: 330px;
    max-height: calc(100vh - 96px);
    overflow: auto;
    z-index: 80;
    display: none;
    background: rgba(30,30,30,.98);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0,0,0,.46);
    padding: 16px;
    animation: fahootRise 220ms ease both;
}
body.show-theme-panel .theme-panel { display: block; }
.theme-panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.theme-panel h3 { margin:0; font-size:18px; }
.theme-panel label { display:block; margin:12px 0 6px; color:var(--text-muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.theme-panel input, .theme-panel select, .theme-panel textarea {
    width:100%; border:1px solid var(--border-color); border-radius:6px; background:#121212; color:var(--text-main); padding:10px;
}
.theme-panel input[type="color"] { height:44px; padding:4px; }
.theme-presets { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.theme-preset { background:#121212; color:white; border:1px solid var(--border-color); border-radius:8px; padding:10px; font-weight:800; text-transform:capitalize; }
.theme-preset.active { border-color:var(--fahoot-accent); box-shadow:0 0 0 2px color-mix(in srgb, var(--fahoot-accent) 40%, transparent); }
.theme-toggle { display:flex !important; gap:10px; align-items:center; text-transform:none !important; }
.theme-toggle input { width:auto; }
.theme-note { margin-top:14px; color:var(--text-muted); font-size:12px; line-height:1.4; }
