/* ========================================================
   SLIDES FRUTIGER AERO STYLESHEET WITH RESIZE & CONTEXT MENU
   ======================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    display: flex;
}

.aero-sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    border-right: 2px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    padding: 25px 15px;
    box-sizing: border-box;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 50;
}

.aero-sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-brand h2 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.pad-selection-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pad-toggle-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.pad-toggle-btn:hover {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-color: #f59e0b;
    color: #ffffff;
}

.sidebar-footer-controls {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-action-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 8px 12px;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.latch-toggle-strip {
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-left: none;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    cursor: pointer;
}

.workspace-viewport-wrapper {
    flex: 1;
    height: 100vh;
    padding: 20px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slides-toolbar {
    width: 100%;
    max-width: 950px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.toolbar-tools-dock {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.style-tool-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(254,243,199,0.8) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 2px #fff;
    transition: all 0.2s ease;
}

.style-tool-btn:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
}

.popup-tool-container {
    position: relative;
    display: flex;
    align-items: center;
}

.aero-palette-menu {
    position: absolute;
    top: 48px;
    left: 0;
    width: 200px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(254,243,199,0.9) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3), inset 0 1px 1px #fff;
    backdrop-filter: blur(12px);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}
.aero-palette-menu.show {
    display: flex;
}

.palette-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #d97706;
    border-bottom: 1px solid #fde68a;
    padding-bottom: 4px;
    text-transform: uppercase;
}

.shape-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shape-option-btn {
    background: linear-gradient(180deg, #ffffff 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.shape-option-btn:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
}

.snap-option-row {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #78350f;
    display: flex;
    align-items: center;
}
.snap-option-row label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.text-format-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.85);
    padding: 4px 8px;
    height: 42px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 2px #fff;
}

.aero-dropdown {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    outline: none;
    cursor: pointer;
}

.custom-picker-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button.custom-picker-wrapper {
    padding: 0;
    font: inherit;
}

.current-color-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    pointer-events: none;
}

.custom-picker-wrapper.shape-color-wrapper {
    color: #0284c7;
}

#fill-btn {
    position: relative;
}

/* ========================================================
   FILL & STROKE DROPDOWN PANEL
   ======================================================== */
.fill-popup {
    width: 230px !important;
}

.fill-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 7px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #92400e;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.12s ease;
}

.fill-row:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
}

.fill-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.25);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.fill-row-label {
    flex: 1;
    text-align: left;
}

.fill-sync-row {
    padding: 2px 4px;
}

#stroke-row.synced {
    opacity: 0.55;
}

.fill-width-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #92400e;
    padding: 2px 4px;
}

.fill-width-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 14px;
    border-radius: 7px;
    border: 1px solid rgba(0,0,0,0.25);
    outline: none;
    cursor: pointer;
    background: linear-gradient(90deg, #e2e8f0 0%, #92400e 100%);
}

.fill-width-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #d97706;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
}

.fill-width-row input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #d97706;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
}

.fill-popup.no-shape .fill-row,
.fill-popup.no-shape .fill-sync-row,
.fill-popup.no-shape .fill-width-row {
    opacity: 0.45;
    pointer-events: none;
}

#inner-shadow-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#inner-shadow-opts[hidden] {
    display: none;
}

.custom-picker-wrapper input[type="color"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ========================================================
   CUSTOM RGBA SLIDER PICKER
   ======================================================== */
.rgba-picker-popup {
    width: 264px !important;
}

.rgba-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rgba-mode-toggle {
    display: flex;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
}

.rgba-mode-btn {
    border: none;
    background: transparent;
    border-radius: 16px;
    padding: 3px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rgba-mode-btn:hover {
    color: #d97706;
}

.rgba-mode-btn.active {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 2px 5px rgba(217,119,6,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}

.rgba-preview-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.rgba-checker {
    width: 46px;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: conic-gradient(#d4d4d4 25%, #ffffff 0 50%, #d4d4d4 0 75%, #ffffff 0) 0 0 / 12px 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.rgba-checker #rgba-preview {
    width: 100%;
    height: 100%;
    min-height: 40px;
}

.rgba-tag-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    outline: none;
}

.rgba-tag-input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(217,119,6,0.2);
}

.rgba-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rgba-chan {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.rgba-chan.rgba-r { background: linear-gradient(180deg, #f87171, #b91c1c); }
.rgba-chan.rgba-g { background: linear-gradient(180deg, #4ade80, #15803d); }
.rgba-chan.rgba-b { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.rgba-chan.rgba-h { background: linear-gradient(135deg, #f87171, #fbbf24, #4ade80, #60a5fa, #a78bfa); font-size: 9px; }
.rgba-chan.rgba-s { background: linear-gradient(180deg, #e2e8f0, #64748b); font-size: 9px; }
.rgba-chan.rgba-v { background: linear-gradient(180deg, #ffffff, #0f172a); font-size: 9px; }
.rgba-chan.rgba-a {
    background: linear-gradient(180deg, #cbd5e1, #64748b);
    font-size: 8px;
}

.rgba-slider-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 14px;
    border-radius: 7px;
    border: 1px solid rgba(0,0,0,0.25);
    outline: none;
    cursor: pointer;
    background: #e2e8f0;
}

.rgba-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #d97706;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
}

.rgba-slider-row input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #d97706;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
}

.rgba-val {
    width: 26px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    color: #92400e;
    flex-shrink: 0;
}

.theme-picker-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.85);
    padding: 4px 8px;
    height: 42px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 2px #fff;
}

.theme-swatch-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.theme-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    display: block;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.15s ease;
}

.theme-swatch-btn:hover .theme-swatch {
    transform: scale(1.15);
}

/* ========================================================
   BIGGER ICONS ACROSS THE APP
   ======================================================== */
.style-tool-btn svg {
    width: 22px;
    height: 22px;
}

.shape-grid-btn svg {
    width: 24px;
    height: 24px;
}

.pad-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-action-btn svg {
    width: 16px;
    height: 16px;
}

.context-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.custom-picker-wrapper svg {
    width: 16px;
    height: 16px;
}

.latch-toggle-strip svg {
    width: 18px;
    height: 18px;
}

.mkt-themes-swatch svg,
.mkt-header h3 svg {
    width: 18px;
    height: 18px;
}

.presentation-title-badge {
    flex: 1;
    height: 42px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(240,249,255,0.65) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), inset 0 1px 2px #fff;
    backdrop-filter: blur(10px);
}

.badge-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 800;
    color: #d97706;
    margin-right: 12px;
}

.slide-title-field {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    width: 100%;
}

/* Editor Container */
.slides-editor-container {
    flex: 1;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    overflow: hidden;
}

.thumbnail-panel {
    width: 180px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(241,245,249,0.75) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15), inset 0 1px 2px #fff;
    backdrop-filter: blur(10px);
}

.thumbnail-card {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.8);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    overflow: hidden;
    background: #0f172a;
}

.thumbnail-live {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.thumbnail-live-el {
    position: absolute;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    border-radius: 2px;
    box-sizing: border-box;
}

.thumbnail-live-el.is-shape {
    overflow: hidden;
}

.thumbnail-live-el svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.thumb-mini-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    pointer-events: none;
    overflow: hidden;
}

.thumbnail-card.active {
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.7);
}

.thumbnail-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

.canvas-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(240,249,255,0.8) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25), inset 0 1px 2px #fff;
    overflow: hidden;
}

.slide-surface {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/9;
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.snap-guide {
    position: absolute;
    background: #38bdf8;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 8px #38bdf8;
}
.snap-guide-x {
    top: 0;
    bottom: 0;
    width: 2px;
}
.snap-guide-y {
    left: 0;
    right: 0;
    height: 2px;
}

/* Canvas Slide Element Wrapper — move cursor on hover, text cursor only while editing! */
.slide-element {
    position: absolute;
    cursor: move;
    border: 2px dashed transparent;
    border-radius: 4px;
    color: #ffffff;
    user-select: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-element:hover {
    cursor: move;
}

.slide-element.editing {
    cursor: text;
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.slide-element.editing .slide-text-content {
    cursor: text;
    user-select: text;
}

.slide-element.selected {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border: 1px solid #0284c7;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 20;
}
.resize-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.resize-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.resize-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resize-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.resize-n { top: -5px; left: 50%; margin-left: -4px; cursor: ns-resize; }
.resize-s { bottom: -5px; left: 50%; margin-left: -4px; cursor: ns-resize; }
.resize-e { right: -5px; top: 50%; margin-top: -4px; cursor: ew-resize; }
.resize-w { left: -5px; top: 50%; margin-top: -4px; cursor: ew-resize; }

/* Corner rounding handle — rounded green diamond riding the top edge! */
.resize-handle.corner-handle {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(180deg, #4ade80 0%, #15803d 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.6);
    transform: rotate(45deg);
    cursor: ew-resize;
    z-index: 21;
}

.slide-text-content {
    outline: none;
    cursor: move;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.slide-element [contenteditable="true"] {
    outline: none;
    cursor: text;
    user-select: text;
}

.slide-element [contenteditable="false"] {
    cursor: move;
    user-select: none;
}

/* Glossy Blur Context Menu with Top-Left Scale Origin */
.aero-context-menu {
    position: fixed;
    width: 180px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.67) 0%, rgba(250, 250, 250, 0.67) 100%);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 2px #ffffff;
    
    /* Extreme backdrop blur */
    backdrop-filter: blur(1px) saturate(80%);
    -webkit-backdrop-filter: blur(1px) saturate(80%);
    
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2000;
    
    /* Top-Left Transform Origin for direct corner pop */
    transform-origin: top left;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    
    /* Quick cubic-bezier spring easing */
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.12s ease-out;
}


.aero-context-menu.show {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.aero-context-menu.hiding {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.12s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.1s ease-in;
}

.context-item {
    padding: 8px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #78350f;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s ease;
}

.context-item:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
}

.context-item.danger:hover {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
    color: #ffffff;
}

.context-divider {
    height: 1px;
    background: #fde68a;
    margin: 4px 0;
}

/* Presentation Overlay */
.fullscreen-presentation-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-surface.presentation-mode {
    max-width: 90vw;
    max-height: 85vh;
}

.presentation-controls {
    position: absolute;
    bottom: 30px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(254,243,199,0.85) 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 30px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #d97706;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.present-control-btn {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.present-control-btn.exit-btn {
    border-radius: 12px;
    width: auto;
    padding: 0 10px;
    background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}
/* Custom Glossy Aero Gel Checkboxes */
.snap-option-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    border: 1px solid #94a3b8;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 1px 2px #fff, 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
}

.snap-option-row input[type="checkbox"]:checked {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    border-color: #b45309;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6), inset 0 1px 1px #fef08a;
}

.snap-option-row input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 3px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
/* ========================================================
   RESIZE UNLEASHED & ANIMATED BLUR TOOLTIPS
   ======================================================== */

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(217, 119, 6, 0.3);
    margin: 0 4px;
}

/* Unconstrained Shape Sizing & SVG Vector Mask Shapes */
.slide-element {
    position: absolute;
    cursor: move;
    padding: 8px 14px;
    border: 2px dashed transparent;
    border-radius: 8px;
    color: #ffffff;
    user-select: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    font-weight: bold;
    box-sizing: border-box;
    /* Removed min-width / min-height constraints */
}

.slide-element:hover {
    cursor: move;
}

.slide-element.selected {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.slide-element.shape-rect {
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 2px #fff;
}

.slide-element.shape-rounded {
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px solid #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 2px #fff;
}

.slide-element.shape-circle {
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 2px #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-element.shape-diamond {
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px solid #ffffff;
    transform: rotate(45deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 2px #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-element.shape-diamond .slide-text-content {
    transform: rotate(-45deg);
}

.slide-element.shape-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.slide-element.shape-star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-element.shape-heart {
    clip-path: path('M 12 21.35 l -1.45 -1.32 C 5.4 15.36 2 12.28 2 8.5 C 2 5.42 4.42 3 7.5 3 c 1.74 0 3.41 0.81 4.5 2.09 C 13.09 3.81 14.76 3 16.5 3 C 19.58 3 22 5.42 22 8.5 c 0 3.78 -3.4 6.86 -8.55 11.54 L 12 21.35 Z');
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
}

.slide-element.shape-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
}

.slide-element.shape-arrow-right {
    clip-path: polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
}

.slide-element.shape-arrow-left {
    clip-path: polygon(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
}

.slide-element.shape-speech {
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 40% 75%, 15% 100%, 20% 75%, 0% 75%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
}

.slide-element.shape-plus {
    clip-path: polygon(33% 0%, 67% 0%, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0% 67%, 0% 33%, 33% 33%);
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
}

.slide-element.shape-chip {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    border: 2px solid #7dd3fc;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4), inset 0 1px 2px #fff;
    padding: 6px 18px;
}

/* Google Slides Style Shape Picker Grid */
.shape-grid-popup {
    width: 230px !important;
}

.shape-compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.shape-grid-btn {
    background: linear-gradient(180deg, #ffffff 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 6px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #92400e;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.1s ease;
}

.shape-grid-btn:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
    transform: scale(1.05);
}

.shape-grid-btn.wide-btn {
    grid-column: span 4;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    gap: 8px;
}

/* Animated Glass Tooltip */
.aero-glass-tooltip {
    position: fixed;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.67) 0%, rgba(250, 250, 250, 0.67) 100%);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 2px #ffffff;
    
    padding: 4px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    color: #78350f;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 1px #ffffff;

    backdrop-filter: blur(1px) saturate(80%);
    -webkit-backdrop-filter: blur(1px) saturate(80%);

    z-index: 3000;
    pointer-events: none;
    transform-origin: top left;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.16s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.12s ease-out;
}

.aero-glass-tooltip.show {
    transform: scale(1);
    opacity: 1;
}

.slide-svg-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-svg-shape {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: visible;
}

/* Frosted-glass blur layer (masked to the shape silhouette by JS)! */
.slide-svg-container.chip-glass {
    border-radius: 22%;
}

.frost-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.slide-text-content {
    position: relative;
    z-index: 2;
    outline: none;
    cursor: move;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    box-sizing: border-box;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    font-weight: bold;
    user-select: none;
}

.slide-element.editing .slide-text-content {
    cursor: text;
    user-select: text;
}