/* HIGH PRIORITY BRANDING FIX */
.editor-header .brand-container {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: auto !important;
}

.brand-text {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0;
}

.brand-text h1 {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    white-space: nowrap;
}

.brand-text .subtitle {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    margin-top: 0.15rem !important;
    white-space: nowrap;
}

:root {
    --bg-main: #020617;
    --bg-panel: rgba(15, 23, 42, 0.7);
    --bg-card: #1e293b;
    --bg-card-hover: #334155;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --accent: #3b82f6;
    --accent-hover: #2563eb;

    --border-color: rgba(255, 255, 255, 0.1);

    --danger: #ef4444;
    --danger-hover: #dc2626;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --glass-blur: blur(16px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    /* Optional sleek background pattern */
    background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 400px);
}

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

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.hidden-input {
    display: none;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* --- Buttons --- */
.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.premium-btn i {
    font-size: 1.1rem;
}

.primary-btn {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Offset left-aligned icon to visually center the text */
#initial-add-slide-btn {
    padding-right: 1.6rem;
    padding-left: 0.8rem;
}

.secondary-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: parseInt(var(--radius-sm));
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.1);
}

.color-picker-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.color-picker-btn::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-btn::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-picker-btn::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-picker-btn:hover {
    transform: scale(1.1);
}

.icon-btn.danger:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* --- Sidebar --- */
.sidebar {
    width: 320px;
    min-width: 320px;
    height: 100%;
    background-color: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    flex: 1;
}

.sidebar-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.import-action {
    display: flex;
    flex-direction: column;
}

.import-action label {
    width: 100%;
}

.privacy-note {
    font-size: 0.70rem;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
}

.privacy-note i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.perf-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.perf-indicator.hidden {
    display: none;
}

.perf-good {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.perf-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.perf-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.perf-indicator i {
    font-size: 1rem;
}

.gallery-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-bottom: 5rem;
    /* Ensure last items are fully visible above any bottom edge */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: max-content;
    gap: 1rem;
    align-content: start;
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-height: 140px;
    cursor: grab;
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-card);
}

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

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Prevent browser default drag behavior on image */
}

/* Selected State for Multi-Drag */
.gallery-item.selected {
    border: 3px solid var(--accent);
    transform: scale(0.95);
    opacity: 0.85;
}

.gallery-item.selected::after {
    content: '\eb7b';
    /* bx-check-circle */
    font-family: 'boxicons';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-main);
    color: var(--accent);
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 10;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* --- Main Editor --- */
.main-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(2, 6, 23, 0.95); /* Increased opacity for better stickiness visibility */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 100; /* Higher z-index to stay above workspace content */
    position: sticky;
    top: 0;
}



.header-actions {
    display: flex;
    gap: 1rem;
}

.workspace-empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    /* Needs to be above slides-container (z-index 1) to intercept clicks */
}

.workspace-empty-state .empty-content {
    background: var(--bg-panel);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.quick-start-header {
    margin-bottom: 3rem;
}

.aura-icon-glow {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: inline-flex;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.empty-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
}

.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.step-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.step-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 100%;
}

@media (max-width: 768px) {
    .quick-start-grid {
        grid-template-columns: 1fr;
    }
    
    .workspace-empty-state .empty-content {
        padding: 3rem 1.5rem;
    }
}

.slides-container {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.slides-container:empty+.workspace-empty-state {
    display: flex;
}

/* --- Slide Component --- */
.slide {
    width: 100%;
    max-width: 900px;
    background-color: var(--bg-card);
    /* Default background */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transition: border-color 0.2s, transform 0.2s, background-color 0.3s;
}

.slide.active-slide {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-4px);
}

/* Canvas Theme Override */
.slides-container.style-canvas .slide {
    background-color: #f4f4f0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    border-color: rgba(0, 0, 0, 0.1);
}

.slide.drag-over {
    border-color: var(--accent);
    transform: scale(1.02);
}

.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Default */
}

.slides-container.style-canvas .slide-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    /* Canvas override */
}

.slide-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.slide-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    /* Default */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-display {
    width: 24px;
    text-align: center;
    color: var(--text-main);
    font-weight: 500;
}

.timer-control .icon-btn {
    padding: 0.2rem;
    font-size: 0.9rem;
}

.timer-apply-btn {
    margin-left: 0.5rem;
    padding-left: 0.5rem !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem !important;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.slides-container.style-canvas .timer-control {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: #4b5563;
}

.slides-container.style-canvas .timer-display {
    color: #0f172a;
}

.slides-container.style-canvas .timer-apply-btn {
    border-left-color: rgba(0, 0, 0, 0.1);
}

.slides-container.style-canvas .slide-number {
    font-weight: 700;
    color: #333;
    /* Canvas override */
}

.slide-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Enhanced visibility for buttons on Canvas theme */
.slides-container.style-canvas .slide-actions .icon-btn {
    color: #4b5563;
    /* Darker slate for contrast */
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.slides-container.style-canvas .slide-actions .icon-btn:hover {
    color: #0f172a;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slides-container.style-canvas .slide-actions .icon-btn.danger:hover {
    color: white;
    background-color: var(--danger);
    border-color: var(--danger);
}

.slides-container.style-canvas .color-picker-btn {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.slide-content {
    min-height: 400px;
    padding: 1.5rem;
    /* Reduced outer canvas padding */
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    /* Reduced gap between framed images */
}

.slide-content.empty {
    align-items: center;
    color: var(--text-muted);
    font-style: italic;
}

.slide-empty-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    color: var(--text-main);
    /* Default */
}

.slides-container.style-canvas .slide-empty-prompt {
    color: #444;
    /* Canvas override */
}

.slide-empty-prompt i {
    font-size: 2rem;
}

/* Slide Image Placement (Default) */
.slide-image-wrapper {
    position: relative;
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 200px;
    max-width: 100%;
    height: 300px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

/* Canvas Theme Frames Override */
.slides-container.style-canvas .slide-image-wrapper {
    background-color: white;
    padding: 8px;
    /* Reduced frame thickness */
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.slide-image-wrapper img {
    border-radius: 2px;
    /* Prevent sharp corners sticking out */
}

.slide-content[data-count="1"] .slide-image-wrapper {
    flex: 1 1 100%;
    height: 500px;
}

.slide-content[data-count="2"] .slide-image-wrapper {
    flex: 1 1 calc(50% - 0.5rem);
    height: 400px;
}

.slide-content[data-count="3"] .slide-image-wrapper:first-child {
    flex: 1 1 100%;
    height: 300px;
}

.slide-content[data-count="3"] .slide-image-wrapper {
    flex: 1 1 calc(50% - 0.5rem);
    height: 250px;
}

.slide-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    filter: blur(4px);
    /* Slight blur for thumbnail fallback */
    opacity: 0.8;
}

.slide-image-wrapper img.high-res-loaded {
    filter: blur(0);
    opacity: 1;
}

.slide-image-wrapper:hover img {
    transform: scale(1.02);
}

.remove-img-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.slide-image-wrapper:hover .remove-img-btn {
    opacity: 1;
}

.remove-img-btn:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* --- Footer --- */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    gap: 2rem;
    z-index: 10;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section.privacy i {
    color: #22c55e;
    font-size: 1.1rem;
}

.footer-section.pro-upsell {
    color: var(--text-main);
}

.footer-section.pro-upsell i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section.pro-upsell a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

.footer-section.pro-upsell a:hover {
    text-decoration: underline;
}

.footer-section.branding a.support-email {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 0.5rem;
}

.footer-section.branding a.support-email:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .editor-footer {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1.5rem;
    }
}

/* Preview Modal Placeholder */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.preview-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.preview-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1001;
}

.preview-slide {
    width: 90vw;
    height: 80vh;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.preview-slide img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

/* --- Export Overlay --- */
.export-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    /* Matches --bg-main but translucent */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.export-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.export-modal {
    background-color: var(--bg-card);
    padding: 3rem 4rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.export-overlay.active .export-modal {
    transform: translateY(0);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

/* --- Pro Modal Enhancements --- */
.pro-upgrade-card {
    max-width: 400px;
    padding: 2.5rem !important;
    gap: 1.5rem;
}

.pro-icon {
    font-size: 3.5rem;
    color: #facc15;
    /* Gold */
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.3));
    margin-bottom: 0.5rem;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

/* --- Confirmation Modal --- */
.confirm-card {
    max-width: 400px;
    text-align: center;
    padding: 2.5rem !important;
}

.confirm-icon {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.danger-btn {
    background-color: var(--danger) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.danger-btn:hover {
    background-color: #b91c1c !important;
}

.price-tag span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.5rem;
}

.pro-pay-btn {
    width: 100%;
    padding: 1rem !important;
    font-size: 1.1rem !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
}

.cancel-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cancel-link:hover {
    opacity: 1;
}



.icon-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: rotate(90deg);
}

.icon-btn-secondary i {
    font-size: 1.2rem;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Notifications (Toast) --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: all;
    backdrop-filter: var(--glass-blur);
}

.toast.visible {
    transform: translateX(0);
}

.toast i {
    font-size: 1.5rem;
    color: var(--accent);
}

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

.toast-content {
    font-size: 0.9rem;
    font-weight: 500;
}


.export-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* --- Mobile Responsiveness --- */
.mobile-header {
    display: none;
    padding: 1rem 1.5rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.mobile-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(45deg, var(--accent), #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    -webkit-text-fill-color: initial;
}

/* --- Gallery Footer & Floating Add Button --- */
.gallery-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, var(--bg-panel) 80%, transparent);
    z-index: 20;
    display: flex;
    justify-content: center;
}

.floating-add-btn {
    width: 100%;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        min-width: unset;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--border-color);
    }

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

    /* Sidebar Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 9;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar.active+.sidebar-overlay {
        opacity: 1;
        pointer-events: all;
    }

    .workspace {
        height: auto;
        min-height: calc(100vh - 60px);
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .slides-container.style-canvas {
        padding: 1.5rem 1rem;
    }

    .slide {
        margin-bottom: 2rem;
    }

    .premium-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}