/* ============================================
   CAROUSEL STUDIO — CSS 
   ============================================ */

/* Light Theme (default) /* HIGH CONTRAST & GLASSMORPHISM THEME */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --bg-tertiary: rgba(255, 255, 255, 0.9);
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: rgba(0, 0, 0, 0.08);
    --accent: #ccff00;
    --accent-hover: #b3e600;
    --accent-light: rgba(204, 255, 0, 0.25);
    --accent-text: #050505;
    --danger: #ef4444;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 64px;
    --sidebar-width: 340px;
    --glass-blur: blur(12px);
}

[data-theme="dark"] {
    --bg-primary: #050505;
    --bg-secondary: rgba(20, 20, 20, 0.6);
    --bg-tertiary: rgba(30, 30, 30, 0.8);
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent: #ccff00;
    --accent-hover: #e0ff4d;
    --accent-light: rgba(204, 255, 0, 0.15);
    --accent-text: #050505;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    transition: background var(--transition), color var(--transition);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   HEADER
   ============================================ */
#app-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), border-color var(--transition);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: logoFloat 3s ease-in-out infinite;
}

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

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent), #1f5000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    font-family: inherit;
}

.header-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.header-btn.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--accent-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-light);
}

.header-btn.icon-only {
    padding: 8px 10px;
}

.header-btn.icon-only span {
    display: none;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
#app-main {
    display: flex;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    transition: background var(--transition), border-color var(--transition);
}

.sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    flex: 1;
}

.sidebar-section {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 0.8rem;
    color: var(--accent);
}

/* Text Toolbar */
.text-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.tool-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tool-btn.active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* Textarea */
#slide-text {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color var(--transition), background var(--transition);
    line-height: 1.5;
}

#slide-text:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

#slide-text[contenteditable]:empty::before {
    content: attr(aria-placeholder);
    color: var(--text-muted);
    cursor: text;
}

/* Style Grid */
.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition);
}

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

.style-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.style-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-text);
}

/* Colors */
.color-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    flex: 1;
}

.color-label input[type="color"] {
    width: 100%;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: var(--bg-tertiary);
    transition: border-color var(--transition);
}

.color-label input[type="color"]:hover {
    border-color: var(--accent);
}

.preset-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.preset-color {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
}

.preset-color:hover {
    transform: scale(1.15);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 2px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.6rem;
    font-family: inherit;
    transition: all var(--transition);
}

.icon-btn i, .icon-btn .icon-symbol {
    font-size: 1.1rem;
    margin-bottom: 1px;
}

.icon-btn .icon-symbol {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.icon-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-text);
}

/* Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: all var(--transition);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Background Icon Controls */
.bg-icon-controls {
    margin-top: 12px;
    display: none;
}

.bg-icon-controls.visible {
    display: block;
}

/* Position Grid */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.pos-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 1.5px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition);
    padding: 0;
}

.pos-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.pos-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 2px 6px var(--accent-light);
}

.pos-icon {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.range-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.range-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    margin-bottom: 12px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Text Input */
.text-input {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color var(--transition);
}

.text-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Action Buttons */
.action-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    margin-bottom: 8px;
}

.action-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.danger {
    color: var(--danger);
}

.action-btn.danger:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   PREVIEW AREA
   ============================================ */
#preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    overflow-y: auto;
    background: var(--bg-primary);
    position: relative;
}

/* Font + Size Bar */
#font-size-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 550px;
}

.font-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.font-select-icon {
    color: var(--accent);
    font-size: 0.85rem;
    flex-shrink: 0;
}

#font-select {
    border: 1.5px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition);
    min-width: 140px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 30px;
}

#font-select:hover,
#font-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

#font-select option {
    padding: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.bar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}



.size-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

#font-size-bar .range-slider {
    flex: 1;
    margin-bottom: 0;
}

.size-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 42px;
    text-align: right;
}

/* Slide Info */
#slide-info {
    margin-bottom: 6px;
}

#slide-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Slide Preview Container */
#slide-preview-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--accent-light);
}

/* Slide Canvas */
#slide-preview-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slide-canvas {
    width: 400px;
    height: 500px;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 32px;
}

.slide-bg-icon {
    position: absolute;
    font-size: 200px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: top 0.3s ease, left 0.3s ease, right 0.3s ease, bottom 0.3s ease, transform 0.3s ease;
}

.slide-bg-icon.visible {
    opacity: 0.08;
}

/* BG Icon Positions — extends beyond card edges for dramatic corner effects */
.slide-bg-icon.pos-top-left { top: -15%; left: -15%; transform: none; }
.slide-bg-icon.pos-top-center { top: -15%; left: 50%; transform: translateX(-50%); }
.slide-bg-icon.pos-top-right { top: -15%; right: -15%; left: auto; transform: none; }
.slide-bg-icon.pos-center-left { top: 50%; left: -15%; transform: translateY(-50%); }
.slide-bg-icon.pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.slide-bg-icon.pos-center-right { top: 50%; right: -15%; left: auto; transform: translateY(-50%); }
.slide-bg-icon.pos-bottom-left { bottom: -15%; left: -15%; top: auto; transform: none; }
.slide-bg-icon.pos-bottom-center { bottom: -15%; left: 50%; top: auto; transform: translateX(-50%); }
.slide-bg-icon.pos-bottom-right { bottom: -15%; right: -15%; top: auto; left: auto; transform: none; }

.slide-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    z-index: 2;
    position: relative;
    display: none;
}

.slide-icon.visible {
    display: block;
}

.slide-text {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    z-index: 2;
    position: relative;
    word-wrap: break-word;
    max-width: 100%;
}

.slide-profile.style-simple {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;
}

.slide-profile.style-simple #slide-profile-username {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin-bottom: 0px;
}

.slide-profile.style-instagram {
    position: absolute;
    top: 32px;
    left: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
    text-align: left;
}

.slide-profile.style-instagram .profile-img-container {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.1);
}

.slide-profile.style-instagram #slide-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-profile.style-instagram .profile-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-profile.style-instagram .profile-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.slide-profile.style-instagram #slide-profile-name {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0;
}

.slide-profile.style-instagram .verified-badge {
    width: 14px;
    height: 14px;
    fill: #0095F6;
    flex-shrink: 0;
}

.slide-profile.style-instagram #slide-profile-username {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: -1px;
}

/* Slide Style Variants */
.slide-canvas.style-gradiente {
    background: linear-gradient(135deg, var(--slide-bg), var(--slide-accent, #ccff00));
}

.slide-canvas.style-neon {
    background: var(--slide-bg, #0d0d0d);
    border: 2px solid var(--slide-accent, #00ff88);
}

.slide-canvas.style-neon .slide-text {
    text-shadow: 0 0 20px var(--slide-accent, #00ff88), 0 0 60px var(--slide-accent, #00ff88);
}

.slide-canvas.style-elegant {
    background: var(--slide-bg, #1a1a2e);
    border-bottom: 4px solid var(--slide-accent, #e8c547);
}

.slide-canvas.style-brutal {
    background: var(--slide-bg, #ffffff);
    border: 4px solid var(--slide-text-color, #000000);
    box-shadow: 8px 8px 0 var(--slide-text-color, #000000);
}

.slide-canvas.style-glassmorphism {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
}

/* Pagination */
#slide-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.page-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-family: inherit;
}

.page-dot:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-dot.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
}

.page-dot.add-btn {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.page-dot.add-btn:hover {
    background: #00a381;
    transform: scale(1.1);
}

/* Export Button */
#export-single-bar {
    margin-top: 4px;
}

.export-btn {
    padding: 10px 24px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #a29bfe);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.25s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.modal-header h2 i {
    color: var(--accent);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.modal-body textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.6;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-btn.secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.modal-btn.secondary:hover {
    background: var(--bg-primary);
}

.modal-btn.primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
}

.modal-btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Saved Projects List */
.saved-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    transition: all var(--transition);
}

.saved-project-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.project-info {
    flex: 1;
}

.project-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.project-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.project-actions {
    display: flex;
    gap: 6px;
}

.project-action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.project-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.project-action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   TOAST
   ============================================ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease forwards;
    min-width: 240px;
}

.toast.success {
    background: var(--success);
    color: white;
}

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

.toast.info {
    background: var(--accent);
    color: var(--accent-text);
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   CREDIT BUTTON
   ============================================ */
#credit-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

#credit-btn strong {
    font-weight: 700;
}

#credit-btn i {
    font-size: 1.1rem;
}

#credit-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 25px rgba(131, 58, 180, 0.5);
}

#credit-btn:active {
    transform: translateY(-1px) scale(1.01);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    #app-main {
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .slide-canvas {
        width: 320px;
        height: 400px;
        padding: 30px 24px;
    }
    .header-btn span {
        display: none;
    }
}
