/* Page Builder Styles */
.page-builder-container {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 1; /* Ensure page background stays behind everything */
    position: relative;
}

/* Background Animation Keyframes */
@-webkit-keyframes bgMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

@-moz-keyframes bgMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

@-o-keyframes bgMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

@keyframes bgMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

.page-builder-header {
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3);
}

.header-left h1 {
    margin: 0;
    font-size: 2.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-left p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}

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

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.nav-link, .logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-link:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.elements-bar {
    width: 100%;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
    padding: 20px;
    display: flex;
    gap: 40px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    scrollbar-width: auto; /* Firefox */
    scrollbar-color: #ff69b4 #f0f0f0; /* Firefox */
}

/* Webkit scrollbar styles for elements bar */
.elements-bar::-webkit-scrollbar {
    height: 12px;
    display: block;
}

.elements-bar::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 6px;
}

.elements-bar::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    border-radius: 6px;
    border: 2px solid #f0f0f0;
}

.elements-bar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8a2be2, #ff69b4);
}

.nav-section {
    min-width: 200px;
}

.nav-section h3 {
    margin: 0 0 15px 0;
    color: #ff1493;
    font-size: 1.1em;
    border-bottom: 2px solid #ff69b4;
    padding-bottom: 5px;
}

.element-buttons, .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.element-btn, .action-btn {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.element-btn:hover, .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.dashboard-btn {
    background: linear-gradient(45deg, #6c757d, #495057) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn.preview {
    background: linear-gradient(45deg, #8a2be2, #9370db);
}

.action-btn.save {
    background: linear-gradient(45deg, #32cd32, #228b22);
}


.action-btn.danger {
    background: linear-gradient(45deg, #ff4444, #cc0000);
}

.style-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.style-controls label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.style-controls input[type="color"] {
    width: 50px;
    height: 30px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.storage-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.storage-used {
    height: 100%;
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.storage-used.warning {
    background: linear-gradient(45deg, #ffa500, #ff8c00);
}

.storage-used.danger {
    background: linear-gradient(45deg, #ff4444, #cc0000);
}

.storage-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: bold;
    padding: 5px 0;
    line-height: 1.3;
}

.background {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 0 !important; /* Never apply corner rounding to background */
}

.canvas-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer */
    padding: 20px 10px;
    box-sizing: border-box;
}

/* Aspect ratio wrapper for 9:20 canvas (longer) */
.canvas-aspect-wrapper {
    position: relative;
    width: 100%;
    max-width: calc(100vw - 40px);
    aspect-ratio: 9 / 20;
    margin: 0 auto;
    overflow: hidden;
}


.page-preview-canvas {
    width: 100%;
    height: 100%;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible; /* No scrolling allowed */
    border: 3px solid #ff69b4;
    border-radius: var(--global-radius, 15px);
    /* box-shadow removed - controlled by shadowsEnabled setting */
    z-index: 10; /* Ensure main container appears above page background */
    box-sizing: border-box;
}

.preview-dropzone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 105, 180, 0.05) 10px,
        rgba(255, 105, 180, 0.05) 20px
    );
}

.page-preview-canvas.has-elements .preview-dropzone {
    display: none;
}

.dropzone-content {
    text-align: center;
    color: #999;
    pointer-events: none;
}

.dropzone-content h3 {
    color: #ff69b4;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.dropzone-content p {
    font-size: 1.1em;
    opacity: 0.8;
}

/* Builder Elements */
.builder-element {
    position: absolute;
    border: 2px dashed transparent;
    cursor: move;
    transition: all 0.2s ease;
    min-width: 50px;
    min-height: 30px;
    user-select: none;
    box-sizing: border-box;
}

.builder-element:hover {
    border-color: #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

.builder-element.selected {
    border-color: #ff1493;
    border-style: solid;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.3);
}

.builder-element.multi-selected {
    border-color: #8a2be2;
    border-style: dashed;
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.builder-element.multi-selected:last-child {
    border-color: #ff1493;
    border-style: solid;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.3);
}

.builder-element.dragging {
    z-index: 10000; /* GEAR_ICONS level */
    opacity: 0.6;
    transform-origin: center center;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
    filter: blur(1px); /* Slight blur effect during drag */
}

.builder-element.physics-animation {
    transform-origin: center center;
    transition: none; /* Disable CSS transitions during physics animation */
}

/* Text Element Styling */
.text-element {
    display: block;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    text-align: left;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    resize: none; /* Disabled by default */
    overflow: auto;
    min-width: 100px;
    min-height: 40px;
    cursor: text;
    transition: all 0.2s ease;
}

/* Enable resize only in page builder mode */
.page-builder-mode .text-element {
    resize: both;
}

/* Add a drag handle area for text elements but exclude resize corner */
.text-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 25px; /* Leave space for resize handle */
    bottom: 25px; /* Leave space for resize handle */
    cursor: move;
    z-index: 1;
    pointer-events: none; /* Let clicks pass through to actual element */
}

.text-element[contenteditable="true"]::before {
    pointer-events: none; /* Disable drag when editing */
}

/* Show move cursor on most of text element, but not resize corner - only in page builder mode */
.page-builder-mode .text-element:not([contenteditable="true"]) {
    cursor: move;
}

.page-builder-mode .text-element:not([contenteditable="true"]):hover {
    cursor: move;
}

/* Show move cursor on images, but not resize corner - only in page builder mode */
.page-builder-mode .image-element {
    cursor: move;
}

.page-builder-mode .image-element:hover {
    cursor: move;
}

/* Make resize handle larger and more visible - only in page builder mode */
.page-builder-mode .text-element::-webkit-resizer {
    background: linear-gradient(-45deg, transparent 40%, #ff69b4 40%, #ff69b4 60%, transparent 60%);
    border-radius: 0 0 8px 0;
    width: 20px;
    height: 20px;
}

.page-builder-mode .text-element:hover::-webkit-resizer {
    background: linear-gradient(-45deg, transparent 30%, #ff1493 30%, #ff1493 70%, transparent 70%);
    width: 25px;
    height: 25px;
}

/* Page Elements */
.page-element {
    position: absolute;
    box-sizing: border-box;
    touch-action: none;
}

/* Image Element Styling */
.image-element {
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
    resize: none; /* Disabled by default */
    min-width: 50px;
    min-height: 50px;
    transition: all 0.2s ease;
    position: relative;
}

/* Enable resize only in page builder mode */
.page-builder-mode .image-element {
    resize: both;
}

/* Only show image hover/selection effects in page builder mode */
.page-builder-mode .image-element:hover {
    border-color: rgba(255, 105, 180, 0.3);
}

.page-builder-mode .image-element.selected {
    border-color: #ff69b4;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.image-element img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scale to fill container while maintaining aspect ratio */
    display: block;
    pointer-events: none; /* Prevent image from interfering with resize/drag */
}

/* Make image resize handle larger and more visible - only in page builder mode */
.page-builder-mode .image-element::-webkit-resizer {
    background: linear-gradient(-45deg, transparent 40%, #ff69b4 40%, #ff69b4 60%, transparent 60%);
    border-radius: 0 0 8px 0;
    width: 20px;
    height: 20px;
}

.page-builder-mode .image-element:hover::-webkit-resizer {
    background: linear-gradient(-45deg, transparent 30%, #ff1493 30%, #ff1493 70%, transparent 70%);
    width: 25px;
    height: 25px;
}

/* Linked image hover effects */
.linked-image {
    cursor: pointer;
    position: relative;
}

.linked-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
}

.linked-image:hover::before {
    opacity: 1;
    animation: shimmer 0.6s ease-in-out;
}

.linked-image:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Element Types - styling handled above */

.text-element[contenteditable="true"]:focus {
    outline: 2px solid #ff69b4;
    outline-offset: 2px;
    border-color: #ff69b4;
}

/* Only show hover/selection effects in page builder mode */
.page-builder-mode .text-element:hover {
    border-color: rgba(255, 105, 180, 0.3);
}

.page-builder-mode .text-element.selected {
    border-color: #ff69b4;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.image-element {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
}

.image-element img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Preserve native aspect ratio */
    display: block;
}

.youtube-element {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    resize: both;
    min-width: 280px;
    min-height: 157px;
}

.page-builder-mode .youtube-element {
    resize: both;
    overflow: auto;
}

.youtube-element iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.form-element {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 15px;
    border: 4px solid #ff69b4;
    /* box-shadow removed - controlled by shadowsEnabled setting */
    resize: none !important; /* Disabled - using custom handles */
    overflow: visible;
    min-width: 300px;
    min-height: 200px;
    box-sizing: border-box;
}

/* Ensure overflow visible when selected */
.form-element.selected {
    overflow: visible !important;
}

/* Specific fix for scribble elements */
.scribble-element {
    overflow: visible !important;
    resize: none !important;
}

.scribble-element.selected {
    overflow: visible !important;
}

/* Remove all browser resize handles */
.form-element::-webkit-resizer,
.scribble-element::-webkit-resizer {
    display: none !important;
}

/* Mobile canvas responsiveness */
@media (max-width: 768px) {
    .form-element canvas {
        max-width: calc(100vw - 100px);
        height: auto;
        touch-action: none;
    }
    
    .drawing-toolbar {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.form-element h3 {
    margin-top: 0;
    color: #ff1493;
    text-align: center;
}

.form-element textarea, .form-element canvas {
    border: 3px solid #e0e0e0;
    border-radius: 8px;
}

.form-element button {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Drag Ghost with Physics */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.8;
    transform-origin: center center;
    transition: none; /* Disable CSS transitions for physics animation */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 10px 20px rgba(255, 105, 180, 0.4));
}

/* Multi-drag ghost container */
.drag-ghost-container {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.8;
}

.drag-ghost-container .drag-ghost {
    position: absolute;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 5px 15px rgba(139, 69, 255, 0.3));
}

/* Multi-selection styles */
.builder-element.multi-selected {
    border: 2px solid rgba(139, 69, 255, 0.8) !important;
    box-shadow: 0 0 15px rgba(139, 69, 255, 0.4) !important;
}

.builder-element.selected {
    border: 2px solid rgba(255, 20, 147, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.4) !important;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    background: #ff69b4;
    border: 3px solid white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    display: none;
    transition: all 0.2s ease;
}

.resize-handle:hover {
    background: #ff1493;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.resize-handle:active {
    background: #c71585;
    transform: scale(1.1);
}

.builder-element.selected .resize-handle {
    display: block;
}

.resize-handle.nw { top: -10px; left: -10px; cursor: nw-resize; }
.resize-handle.ne { top: -10px; right: -10px; cursor: ne-resize; }
.resize-handle.sw { bottom: -10px; left: -10px; cursor: sw-resize; }
.resize-handle.se { bottom: -10px; right: -10px; cursor: se-resize; }

/* Property Panel */
.property-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.panel-header {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.panel-content {
    padding: 20px;
}

.panel-content label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.panel-content input, .panel-content select {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
}

.panel-content input:focus, .panel-content select:focus {
    outline: none;
    border-color: #ff69b4;
}

.panel-content button {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin: 5px 5px 5px 0;
    transition: all 0.2s ease;
}

.panel-content button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
}

.panel-content button.danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.clear-btn {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.clear-btn:hover {
    background: #5a6268 !important;
    transform: translateY(-1px) !important;
}

/* Floating Property Panel */
.floating-property-panel {
    position: absolute;
    z-index: 20000; /* OPTIONS_PANELS level */
    background: white;
    border: 2px solid #ff69b4;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
    padding: 15px;
    min-width: 250px;
    max-width: 350px;
    pointer-events: auto;
}

.floating-property-panel::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ff69b4;
}

.floating-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.floating-panel-header h4 {
    margin: 0;
    color: #ff1493;
    font-size: 1.1em;
}

.floating-panel-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-panel-close:hover {
    color: #ff1493;
}

.floating-panel-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-property-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.floating-property-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.floating-property-group input,
.floating-property-group select {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

.floating-property-group input:focus,
.floating-property-group select:focus {
    outline: none;
    border-color: #ff69b4;
}

.floating-property-row {
    display: flex;
    gap: 10px;
}

.floating-property-row .floating-property-group {
    flex: 1;
}

/* Compact Property Handle */
.property-handle {
    position: absolute;
    z-index: 10000; /* GEAR_ICONS level */
    top: 10px; /* Move down to prevent cropping */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none; /* Don't block clicks on the element */
}

.property-handle .handle-toggle,
.property-handle .handle-panel {
    pointer-events: auto; /* But allow clicks on the button and panel */
}

.handle-toggle {
    width: 60px;
    height: 60px;
    background: #ff69b4;
    border: 3px solid white;
    border-radius: 12px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 105, 180, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.handle-toggle:hover {
    background: #ff1493;
    transform: scale(1.1);
}

.handle-panel {
    position: absolute;
    top: 35px;
    right: 0;
    background: white;
    border: 2px solid #ff69b4;
}

/* Floating panel that appears at document level */
.handle-panel-floating {
    background: white;
    border: 2px solid #ff69b4;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    padding: 0;
    min-width: 250px;
    max-width: 350px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 20000;
    /* Override positioning from .handle-panel class */
    position: fixed !important;
    right: auto !important;
    top: auto !important;
    display: block;
}

.handle-panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
}

.control-group input,
.control-group select {
    padding: 6px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85em;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #ff69b4;
}

.delete-btn {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85em;
    margin-top: 5px;
}

.delete-btn:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
}

/* Layer Controls */
.layer-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.layer-btn {
    background: linear-gradient(45deg, #6f42c1, #5a32a3);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8em;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.layer-btn:hover {
    background: linear-gradient(45deg, #5a32a3, #4c2a85);
    transform: translateY(-1px);
}

.layer-info {
    font-size: 0.75em;
    color: #666;
    margin-left: 5px;
    font-weight: bold;
}

/* Resize hint styling */
.resize-hint {
    font-size: 0.75em;
    color: #666;
    margin-top: 5px;
    padding: 5px;
    background: rgba(255, 105, 180, 0.1);
    border-radius: 4px;
    text-align: center;
}

/* Slider Controls */
.slider-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.slider-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ff69b4;
    border-radius: 50%;
    cursor: pointer;
}

.slider-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff69b4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-control span {
    min-width: 40px;
    font-size: 12px;
    font-weight: bold;
    color: #ff1493;
    text-align: center;
}

/* Status Card Styling */
.status-element {
    display: flex;
    align-items: stretch;
    min-height: 180px;
    aspect-ratio: 20 / 9;
    overflow: hidden;
}

.status-content-wrapper {
    display: flex;
    align-items: stretch;
    gap: 15px;
    width: 100%;
}

.status-avatar-section {
    flex: 0 0 33.33%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.status-text-section {
    flex: 0 0 66.67%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 10px;
    padding-top: 15px;
    padding-bottom: 10px;
    overflow: hidden;
    height: 100%;
}

.status-avatar {
    width: calc(100% - 20px);
    max-width: 250px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 5px solid #ff69b4;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.45);
}

.status-avatar-placeholder {
    width: calc(100% - 20px);
    max-width: 250px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    border: 5px solid #ff69b4;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.45);
}

/* Status Messages */
#statusContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.status-notification {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

.status-notification.error {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .background {
        padding: 20px;
    }
    
    .elements-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-section {
        min-width: auto;
    }
    
    .property-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        z-index: 10000; /* GEAR_ICONS level */
    }
}

@media (max-width: 768px) {
    .page-builder-header {
        flex-direction: column;
        gap: 20px; /* Keep desktop gap */
        text-align: center;
        padding: 20px; /* Keep desktop padding */
    }
    
    .header-left h1 {
        font-size: 2.2em; /* Keep closer to desktop size */
    }
    
    .builder-nav {
        flex-direction: column;
        gap: 20px;
        padding: 20px; /* Keep desktop padding */
    }
    
    .nav-section {
        min-width: auto;
    }
    
    .element-buttons, .action-buttons {
        justify-content: center;
    }
    
    .background {
        padding: 10px 10px 1px; /* 10px top/left/right, 1px bottom */
        gap: 20px;
    }
    
    .canvas-header {
        flex-direction: column;
        gap: 15px; /* Keep desktop gap */
        text-align: center;
    }
    
    /* Optimize canvas container for mobile */
    .canvas-container {
        padding: 10px 10px 1px; /* 10px top/left/right, 1px bottom */
        min-height: calc(100vh - 150px); /* Adjust for smaller header/footer */
    }
    
    /* Maximize canvas width on mobile */
    .canvas-aspect-wrapper {
        max-width: calc(100vw - 20px); /* Account for 10px padding on each side */
    }
    
    /* Canvas aspect ratio is now handled by JavaScript */
}

/* Mobile Bottom Menu */
.mobile-bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000; /* GEAR_ICONS level */
    background: white;
    border-top: 3px solid #ff69b4;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default, shown on mobile */
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.menu-toggle:active {
    background: linear-gradient(45deg, #ff1493, #dc143c);
}

.toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.hamburger-line {
    width: 20px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-bottom-menu.expanded .toggle-icon {
    transform: rotate(90deg);
}

.mobile-bottom-menu.expanded .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-bottom-menu.expanded .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-bottom-menu.expanded .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.toggle-text {
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.menu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.mobile-bottom-menu.expanded .menu-content {
    max-height: 50vh;
    padding-bottom: 20px;
    overflow-y: auto;
    scrollbar-width: auto; /* Firefox */
    scrollbar-color: #ff69b4 #f0f0f0; /* Firefox */
}

/* Webkit scrollbar styles for mobile menu */
.mobile-bottom-menu.expanded .menu-content::-webkit-scrollbar {
    width: 12px;
    display: block;
}

.mobile-bottom-menu.expanded .menu-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 6px;
}

.mobile-bottom-menu.expanded .menu-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    border-radius: 6px;
    border: 2px solid #f0f0f0;
}

.mobile-bottom-menu.expanded .menu-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8a2be2, #ff69b4);
}

.menu-section {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

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

.menu-section h4 {
    margin: 0 0 15px 0;
    color: #ff1493;
    font-size: 1.1em;
    text-align: center;
}

.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.menu-btn {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 10px 8px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.menu-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.4);
}

.menu-btn.preview {
    background: linear-gradient(45deg, #8a2be2, #9370db);
}

.menu-btn.save {
    background: linear-gradient(45deg, #32cd32, #228b22);
}

.menu-btn.danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.menu-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.color-group {
    text-align: center;
}

.color-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: bold;
}

.color-group input[type="color"] {
    width: 50px;
    height: 50px;
    border: 3px solid #ff69b4;
    border-radius: 50%;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.color-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

/* Show mobile menu only on smaller screens AND only in page builder mode */
@media (max-width: 1024px) {
    .page-builder-mode .mobile-bottom-menu {
        display: block;
    }
    
    /* Hide desktop nav on mobile */
    .builder-nav {
        display: none;
    }
    
    /* Add bottom padding to prevent overlap */
    .background {
        padding-bottom: 80px;
    }
}

/* Hide page builder UI elements when in user page mode - but keep canvas styling identical */
.user-page-mode .mobile-bottom-menu {
    display: none !important;
}

.user-page-mode .floating-save-btn,
.user-page-mode .floating-dashboard-btn,
.user-page-mode .floating-open-page-btn {
    display: none !important;
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    .menu-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .menu-colors {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .color-group input[type="color"] {
        width: 40px;
        height: 40px;
    }
    
    /* Ensure storage section is fully visible */
    .menu-section:last-child {
        padding-bottom: 25px;
    }
    
    .storage-text {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .storage-info {
        margin-bottom: 10px;
    }
    
    .menu-section {
        padding: 15px;
    }
}

/* Property Panel Styles */
.property-handle {
    position: absolute;
    z-index: 10000; /* GEAR_ICONS level */
    pointer-events: all;
}

.handle-toggle {
    background: transparent;
    color: #ff69b4;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.2s ease;
    user-select: none;
}

.handle-toggle:hover {
    transform: scale(1.1);
    background: transparent;
    color: #ff1493;
}

.handle-panel {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ff69b4;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 350px;
    z-index: 10001; /* GEAR_ICONS level + 1 */
    backdrop-filter: blur(10px);
}

.handle-panel-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.control-group {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: bold;
    color: #ff1493;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
}

.position-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.position-controls input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
}

.layer-controls {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.layer-btn {
    background: linear-gradient(45deg, #8a2be2, #ff69b4);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 50px;
}

.layer-btn:hover {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    transform: translateY(-1px);
}

.text-controls select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.color-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.color-controls label {
    font-size: 11px;
    margin-bottom: 0;
    color: #666;
    text-transform: none;
    font-weight: normal;
}

.color-controls input[type="color"] {
    width: 30px;
    height: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.color-controls input[type="checkbox"] {
    width: auto;
    margin-right: 4px;
}

.image-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
    text-transform: none;
    font-weight: normal;
    margin-bottom: 0;
}

.image-controls input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
}

.image-controls input[type="range"] {
    flex: 1;
    margin: 0 8px;
}

.image-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.action-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: linear-gradient(45deg, #45a049, #3d8b40);
    transform: translateY(-1px);
}

.form-controls input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 4px;
}

.delete-btn {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    width: 100%;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: linear-gradient(45deg, #cc0000, #990000);
    transform: translateY(-1px);
}

/* Selected element styling */
.page-element.selected {
    outline: 2px solid #ff69b4;
    outline-offset: 2px;
}

/* Multi-select indicator */
.multi-select-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
}

/* Selection box for visual feedback */
.selection-box {
    position: fixed;
    border: 2px dashed #ff69b4;
    background: rgba(255, 105, 180, 0.1);
    pointer-events: none;
    z-index: 9999;
    display: none;
}

/* Mobile optimizations for property panel */
@media (max-width: 768px) {
    .handle-panel {
        min-width: 250px;
        max-width: 300px;
        font-size: 11px;
    }
    
    .handle-panel-content {
        padding: 12px;
        max-height: 300px;
    }
    
    .position-controls {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .layer-controls {
        flex-wrap: wrap;
    }
    
    .layer-btn {
        min-width: 40px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Actions section styling */
.actions-section {
    padding: 25px 20px !important;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn-large {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 15px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 50px;
}

.action-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.action-btn-large.save {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.action-btn-large.danger {
    background: linear-gradient(45deg, #ff4444, #cc0000);
}

.action-btn-large.preview {
    background: linear-gradient(45deg, #8a2be2, #6a1b9a);
}

.action-btn-large.undo {
    background: linear-gradient(45deg, #ff9800, #f57c00);
}

.action-btn-large.duplicate {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.action-btn-large.export {
    background: linear-gradient(45deg, #9c27b0, #7b1fa2);
}

/* Resize handles */
.resize-handle {
    position: absolute;
    background: #ff69b4;
    border: 3px solid white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002; /* GEAR_ICONS level + 2 */
    display: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.resize-handle:hover {
    background: #ff1493;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.resize-handle:active {
    background: #c71585;
    transform: scale(1.1);
}

.resize-handle.nw {
    top: -10px;
    left: -10px;
    cursor: nw-resize;
}

.resize-handle.ne {
    top: -10px;
    right: -10px;
    cursor: ne-resize;
}

.resize-handle.sw {
    bottom: -10px;
    left: -10px;
    cursor: sw-resize;
}

.resize-handle.se {
    bottom: -10px;
    right: -10px;
    cursor: se-resize;
}

.page-element.selected .resize-handle {
    display: block;
}

.page-element {
    position: relative;
    /* Hide browser's default resize grip */
    resize: none !important;
}

/* Ensure resize handles are visible even when outside element bounds */
.page-element.selected {
    overflow: visible !important;
}

/* Force all page elements to hide browser resize */
.page-element {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.page-element::-webkit-resizer {
    display: none !important;
}

/* Specific fix for gallery elements */
.gallery-element {
    resize: none !important;
}

.gallery-element.selected {
    overflow: visible !important;
}

.gallery-element::-webkit-resizer {
    display: none !important;
}

/* Ensure resize handles stay on top for gallery */
.gallery-element .resize-handle {
    z-index: 10003 !important; /* Higher than gallery controls */
}

/* Radius Controls Styles */
.radius-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.radius-controls input[type="range"] {
    flex: 1;
}

.radius-controls span {
    min-width: 45px;
    font-weight: bold;
    color: #ff1493;
}

.radius-presets {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radius-preset {
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: none;
    text-shadow: none;
    filter: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.radius-preset:hover {
    border-color: #ff69b4;
    transform: scale(1.05);
    color: #ff1493;
    box-shadow: none;
    text-shadow: none;
    filter: none;
}

.radius-preset.active {
    background: #ff69b4;
    color: white;
    border-color: #ff69b4;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    margin: 0 -15px 15px -15px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    text-shadow: none;
}

.tab-btn.active {
    color: #ff1493;
    border-bottom-color: #ff1493;
    background: rgba(255, 20, 147, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #ff69b4;
    background: rgba(255, 105, 180, 0.05);
}

.tab-content {
    display: none;
    padding: 10px;
    margin: -10px;
}

.tab-content.active {
    display: block;
}

.page-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

.stat-value {
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

/* Floating Save Button */
.floating-save-btn {
    position: fixed;
    top: 20px;
    right: 25px;
    z-index: 17000; /* FLOATING_SAVE level */
    padding: 12px 18px;
    background: linear-gradient(45deg, #32cd32, #228b22);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(50, 205, 50, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    white-space: nowrap;
}

.floating-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(50, 205, 50, 0.6);
    background: linear-gradient(45deg, #228b22, #32cd32);
}

.floating-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(50, 205, 50, 0.4);
}

/* Floating Dashboard Button */
.floating-dashboard-btn {
    position: fixed;
    top: 20px;
    left: 25px;
    z-index: 17000; /* FLOATING_SAVE level */
    padding: 12px 18px;
    background: linear-gradient(45deg, #8a2be2, #ff69b4);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.floating-dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(138, 43, 226, 0.6);
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    color: white;
    text-decoration: none;
}

.floating-dashboard-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(138, 43, 226, 0.4);
}

/* Floating Open Page Button */
.floating-open-page-btn {
    position: fixed;
    top: 80px;
    left: 25px;
    z-index: 17000; /* FLOATING_SAVE level */
    padding: 12px 18px;
    background: linear-gradient(45deg, #4a90e2, #63b8ff);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.floating-open-page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.6);
    background: linear-gradient(45deg, #63b8ff, #4a90e2);
}

.floating-open-page-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.4);
}

/* Floating Upgrade Button */
.floating-upgrade-btn {
    position: fixed;
    top: 140px;
    left: 25px;
    z-index: 17000; /* FLOATING_SAVE level */
    padding: 12px 18px;
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    white-space: nowrap;
}

.floating-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.6);
    background: linear-gradient(45deg, #8a2be2, #ff69b4);
}

.floating-upgrade-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 105, 180, 0.4);
}

/* Hide upgrade button in user page mode */
.user-page-mode .floating-upgrade-btn {
    display: none !important;
}

/* Mobile responsiveness for floating buttons */
@media (max-width: 768px) {
    .floating-save-btn {
        top: 15px;
        right: 20px;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .floating-dashboard-btn {
        top: 15px;
        left: 20px;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .floating-open-page-btn {
        top: 65px;
        left: 20px;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .floating-upgrade-btn {
        top: 115px;
        left: 20px;
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Background Animation Classes */
.page-builder-container.gradient-wave {
    background: linear-gradient(-45deg, #FFE9EF, #E1F5FE, #F3E5F5, #FFF3E0);
    background-size: 400% 400%;
    animation: gradientWave 15s ease infinite;
}

@keyframes gradientWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.page-builder-container.particles::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, #ff69b4, transparent),
                      radial-gradient(2px 2px at 40px 70px, #8a2be2, transparent),
                      radial-gradient(1px 1px at 90px 40px, #ff1493, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes particleFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -200px); }
}

.page-builder-container.geometric::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(255, 105, 180, 0.1) 40%, rgba(255, 105, 180, 0.1) 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(138, 43, 226, 0.1) 40%, rgba(138, 43, 226, 0.1) 60%, transparent 60%);
    background-size: 100px 100px;
    animation: geometricShift 30s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes geometricShift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 100px 100px, -100px -100px; }
}

/* Sleek Color Picker Styles */
.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.color-picker-group label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.sleek-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
}

.sleek-color-picker:hover {
    border-color: #ff69b4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

.sleek-color-picker:active {
    transform: translateY(0);
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.color-value {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
}

/* Scribble Studio Style Color Picker */
.color-section {
    margin-bottom: 15px;
}

.color-swatches-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.color-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-pair {
    display: flex;
    gap: 0;
}

.color-box {
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-box:hover {
    transform: scale(1.1);
    z-index: 10;
}

.color-box:active {
    transform: scale(0.95);
}

.primary-color {
    border-radius: 4px 0 0 4px;
    z-index: 2;
}

.secondary-color {
    border-radius: 0 4px 4px 0;
    margin-left: -2px;
}

.accent-color {
    border-radius: 4px 0 0 4px;
    z-index: 2;
}

.text-color {
    border-radius: 0 4px 4px 0;
    margin-left: -2px;
}

.swap-colors {
    background: #444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.swap-colors:hover {
    background: #ff69b4;
    transform: rotate(180deg);
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.preset-color {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.preset-color:hover {
    transform: scale(1.15);
    border-color: #ff69b4;
}

.preset-color:active {
    transform: scale(0.95);
}

/* Custom Color Picker Modal */
.color-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30000;
    display: none;
    backdrop-filter: blur(4px);
}

.color-picker-overlay.active {
    display: block;
}

.color-picker-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 30001;
    display: none;
    overflow: hidden;
    max-width: 420px;
    width: 90%;
}

.color-picker-modal.active {
    display: block;
    animation: colorPickerSlideIn 0.3s ease;
}

@keyframes colorPickerSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.color-picker-header {
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-picker-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.color-picker-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
}

.color-picker-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.color-picker-body {
    padding: 20px;
}

/* Color Swatches Grid */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.color-swatch:active {
    transform: scale(1.05);
}

/* White swatch special border */
.color-swatch[data-color="#ffffff"] {
    border-color: #ddd;
}

/* Custom Color Section */
.custom-color-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.custom-color-section label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.custom-color-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-color-input input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.custom-color-input input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.custom-color-input input[type="text"]:focus {
    outline: none;
    border-color: #ff69b4;
}

.apply-custom-btn {
    background: linear-gradient(45deg, #ff69b4, #8a2be2);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.apply-custom-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.apply-custom-btn:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .color-picker-modal {
        width: 90%; /* Keep reasonable size */
        max-width: none;
    }
    
    .color-swatches {
        grid-template-columns: repeat(6, 1fr); /* Keep more desktop-like layout */
        gap: 8px; /* Keep desktop spacing */
    }
    
    .color-swatch {
        width: 32px; /* Keep closer to desktop size */
        height: 32px;
    }
    
    .custom-color-input {
        flex-direction: column;
        gap: 15px; /* Keep desktop gap */
    }
    
    .custom-color-input input[type="text"],
    .apply-custom-btn {
        width: 100%;
    }
}

/* Simple Color Picker Styles */
.simple-color-picker {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.color-display {
    margin-bottom: 15px;
}

.active-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.color-item {
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.color-item:hover {
    background: rgba(255, 105, 180, 0.1);
    border-color: #ff69b4;
}

.color-item.active {
    background: rgba(255, 105, 180, 0.2);
    border-color: #ff1493;
}

.color-item label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.color-preview {
    width: 100%;
    height: 30px;
    border-radius: 4px;
    border: 2px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.color-selector {
    margin: 15px 0;
}

.color-spectrum {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(to right, 
        #ff0000 0%, 
        #ff8800 12.5%, 
        #ffff00 25%, 
        #88ff00 37.5%, 
        #00ff00 50%, 
        #00ff88 62.5%, 
        #00ffff 75%, 
        #0088ff 87.5%, 
        #0000ff 100%);
    cursor: crosshair;
    position: relative;
    margin-bottom: 10px;
}

.brightness-slider {
    width: 100%;
}

.brightness-slider input[type="range"] {
    width: 100%;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #000000, #ffffff);
    outline: none;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.brightness-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff1493;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brightness-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff1493;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.harmony-selector {
    margin: 10px 0;
}

.harmony-selector select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 12px;
    cursor: pointer;
}

.harmony-selector select:focus {
    outline: none;
    border-color: #ff69b4;
}

.quick-colors {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.quick-color {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.2s ease;
}

.quick-color:hover {
    transform: scale(1.2);
    border-color: #ff69b4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Background Animation Styles - moved to .page-builder-container */

.animated-dots {
    background: #FFE9EF;
    background-image: radial-gradient(#ffffff 6px, transparent 6px);
    background-size: 30px 30px;
    background-repeat: repeat;
    background-attachment: fixed;
    animation: bgMove 60s linear infinite;
}

.animated-gradient {
    background: linear-gradient(45deg, #ff69b4, #8a2be2, #00bfff, #32cd32, #ffa500, #ff69b4);
    background-size: 400% 400%;
    animation: gradientWave 15s ease infinite;
}

@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-particles {
    background: #2c3e50;
    position: relative;
    overflow: hidden;
}

.animated-particles::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: 
        radial-gradient(circle at 20% 35%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 75% 44%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 68% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.animated-geometric {
    background: #1a1a1a;
    background-image: 
        linear-gradient(45deg, #ff69b4 25%, transparent 25%),
        linear-gradient(-45deg, #ff69b4 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #8a2be2 75%),
        linear-gradient(-45deg, transparent 75%, #8a2be2 75%);
    background-size: 50px 50px;
    background-position: 0 0, 0 25px, 25px -25px, -25px 0px;
    animation: geometricShift 10s linear infinite;
}

@keyframes geometricShift {
    0% {
        background-position: 0 0, 0 25px, 25px -25px, -25px 0px;
    }
    100% {
        background-position: 50px 50px, 50px 75px, 75px 25px, 25px 50px;
    }
}

/* Background controls styling */
.background-controls {
    margin-top: 10px;
}

.control-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Classic Web 2.0 Text Effects */
.text-effect-blink {
    animation: textBlink 1s step-end infinite;
}

@keyframes textBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.text-effect-scroll {
    animation: textScroll 10s linear infinite;
    display: inline-block;
    white-space: nowrap;
}

@keyframes textScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.text-effect-glow {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #ff69b4, 0 0 30px #ff69b4, 0 0 40px #ff69b4;
    }
    to {
        text-shadow: 0 0 20px #fff, 0 0 30px #ff1493, 0 0 40px #ff1493, 0 0 50px #ff1493;
    }
}

.text-effect-rainbow {
    animation: textRainbow 5s linear infinite;
    background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
}

@keyframes textRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Individual letter rainbow animation */
@keyframes letterRainbow {
    0% { 
        filter: brightness(1) hue-rotate(0deg);
        transform: translateY(0);
    }
    25% { 
        filter: brightness(1.2) hue-rotate(90deg);
        transform: translateY(-2px);
    }
    50% { 
        filter: brightness(1) hue-rotate(180deg);
        transform: translateY(0);
    }
    75% { 
        filter: brightness(1.2) hue-rotate(270deg);
        transform: translateY(2px);
    }
    100% { 
        filter: brightness(1) hue-rotate(360deg);
        transform: translateY(0);
    }
}

.text-effect-wave {
    animation: textWave 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes textWave {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    75% { transform: translateY(10px); }
}

.text-effect-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 4s steps(40, end) infinite,
               blinkCaret 0.75s step-end infinite;
    border-right: 3px solid;
    width: fit-content;
}

@keyframes typewriter {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 100%; }
}

@keyframes blinkCaret {
    from, to { border-color: transparent; }
    50% { border-color: currentColor; }
}

/* Drag and Drop Styles */
.drag-highlight {
    outline: 4px dashed #ff69b4 !important;
    outline-offset: -4px;
    background-color: rgba(255, 105, 180, 0.1) !important;
}

/* Gallery Element Styles */
.gallery-element {
    cursor: move;
    user-select: none;
}

/* Gallery elements in page builder mode */
.page-builder-mode .gallery-element {
    resize: none !important;
    overflow: hidden !important;
}

/* Remove browser resize handle */
.page-builder-mode .gallery-element::-webkit-resizer {
    display: none !important;
}

/* Override overflow when selected */
.page-builder-mode .gallery-element.selected {
    overflow: visible !important;
}

.gallery-element .gallery-container {
    touch-action: pan-y pinch-zoom;
}

.gallery-element .gallery-nav {
    z-index: 10;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gallery-element .gallery-thumbnails {
    z-index: 10;
    max-width: calc(100% - 40px);
}

.gallery-element .gallery-thumbnail {
    transition: all 0.3s ease;
}

.gallery-element .gallery-thumbnail:hover {
    opacity: 0.8 !important;
    transform: scale(1.1);
}

.gallery-element .gallery-controls {
    z-index: 15;
}

/* Prevent gallery navigation while dragging */
.dragging .gallery-nav,
.dragging .gallery-thumbnails,
.dragging .gallery-controls {
    pointer-events: none !important;
}

/* Scribble Element Styles */
.scribble-element {
    cursor: move;
    user-select: none;
}

/* Enable resize for scribble elements in page builder mode */
.page-builder-mode .scribble-element {
    resize: both !important;
    overflow: auto !important;
}

/* Prevent dragging when hovering over resize handle */
.page-builder-mode .scribble-element::-webkit-resizer {
    cursor: se-resize !important;
}

/* Make scribble canvas scale with container */
.scribble-element .drawing-area {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.scribble-element canvas {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
}

/* Mobile-specific gallery styles */
@media (max-width: 768px) {
    .gallery-element .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .gallery-element .gallery-thumbnails {
        bottom: 5px;
        padding: 5px;
        gap: 5px;
    }
    
    .gallery-element .gallery-thumbnail {
        width: 30px;
        height: 30px;
    }
}

/* Rainbow text effect */
@keyframes rainbow-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.rainbow-text {
    background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: rainbow-animation 3s linear infinite;
}
