/* OurSpace Base Styles */

:root {
    --widget-radius: 10px;
    --widget-border-size: 3px;
    --widget-blur: 0px;
    --widget-glow-color: rgba(0, 255, 255, 0.5);
    --widget-glow-strength: 20px;
}

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

/* Global color overrides using CSS variables */
body {
    color: var(--custom-text-color, #ffffff);
}

#ourspace-main {
    color: var(--custom-text-color, #ffffff);
}

#ourspace-main p,
#ourspace-main div,
#ourspace-main span,
#ourspace-main li,
#ourspace-main h1,
#ourspace-main h2,
#ourspace-main h3,
#ourspace-main h4,
#ourspace-main h5,
#ourspace-main h6,
#ourspace-main label,
#ourspace-main button,
#ourspace-main input,
#ourspace-main textarea,
#ourspace-main select {
    color: var(--custom-text-color, #ffffff);
    text-shadow: var(--text-glow-shadow, none);
    font-family: inherit !important;
}

#ourspace-main a {
    color: var(--custom-link-color, #00ffff);
    transition: color 0.2s ease;
    text-shadow: var(--text-glow-shadow, none);
}

#ourspace-main a:hover {
    color: var(--custom-link-hover, #ff00ff);
    text-shadow: var(--text-glow-shadow, none);
}

#ourspace-main button,
#ourspace-main label,
#ourspace-main input,
#ourspace-main textarea {
    text-shadow: var(--text-glow-shadow, none);
    color: var(--custom-text-color, #ffffff);
}

/* Apply border color to widgets */
.widget,
.profile-banner,
.about-me,
.picture-wall,
.top-friends,
.music-player,
.comments-section,
.interests,
.custom-html {
    border-color: var(--custom-border-color, #00ffff) !important;
}

#ourspace-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#sticker-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 45;
}

#sticker-layer .sticker-item {
    position: absolute;
    transform-origin: center center;
    transition: box-shadow 0.2s ease;
    pointer-events: auto;
    cursor: grab;
    box-sizing: border-box;
    background: transparent;
    overflow: visible;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

body.view-mode #sticker-layer .sticker-item {
    pointer-events: none;
    cursor: default;
}

#sticker-layer .sticker-item img {
    max-width: 240px;
    max-height: 240px;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
}

#sticker-layer .sticker-item.active {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

#sticker-layer .sticker-item.sticker-frame--notebook {
    padding: 10px 14px;
    background:
        repeating-linear-gradient(
            rgba(255, 255, 255, 0.9),
            rgba(255, 255, 255, 0.9) 18px,
            rgba(254, 245, 220, 0.9) 18px,
            rgba(254, 245, 220, 0.9) 36px
        );
    border: 2px dashed rgba(38, 38, 38, 0.45);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    position: relative;
}

#sticker-layer .sticker-item.sticker-frame--notebook::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 111, 97, 0.4);
    border-left: none;
    pointer-events: none;
}

#sticker-layer .sticker-item.sticker-frame--notebook img {
    background: rgba(255, 255, 255, 0.94);
    border: 4px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.15);
}

#sticker-layer .sticker-item.sticker-frame--magazine {
    padding: 10px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(239, 226, 255, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 20px 35px rgba(10, 8, 32, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.6);
    position: relative;
}

#sticker-layer .sticker-item.sticker-frame--magazine img {
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

#sticker-layer .sticker-item.sticker-frame--polaroid {
    padding: 14px 14px 36px;
    background: #fffdf8;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.05);
}

#sticker-layer .sticker-item.sticker-frame--photocard {
    padding: 6px;
    border-radius: 16px;
    background: linear-gradient(150deg, #131728, #333a60);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 20px 30px rgba(3, 5, 16, 0.6),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
}

#sticker-layer .sticker-item.sticker-frame--photocard img {
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.35);
}

#sticker-layer .sticker-item.sticker-frame--holographic {
    padding: 14px;
    border-radius: 22px;
    border: 3px solid transparent;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) padding-box,
        linear-gradient(120deg, #8af7ff, #ff94f9, #6ea7ff, #ffe68f) border-box;
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(255, 255, 255, 0.2);
}

#sticker-layer .sticker-item.sticker-frame--holographic::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.33);
    mix-blend-mode: screen;
}

#sticker-layer .sticker-item.sticker-frame--holographic img {
    border-radius: 14px;
    filter: saturate(1.1);
}

@keyframes glitterPulse {
    0% { opacity: 0.35; transform: translate(-12%, -12%) scale(1); }
    50% { opacity: 0.9; transform: translate(10%, 8%) scale(1.05); }
    100% { opacity: 0.35; transform: translate(-12%, -12%) scale(1); }
}

#sticker-layer .sticker-item.sticker-frame--glitter {
    padding: 12px;
    border-radius: 18px;
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.4), transparent 45%),
        radial-gradient(circle at 70% 30%, rgba(255, 180, 255, 0.4), transparent 45%),
        rgba(8, 8, 18, 0.96);
    border: 2px solid rgba(255, 255, 255, 0.35);
    position: relative;
}

#sticker-layer .sticker-item.sticker-frame--glitter::before {
    content: "";
    position: absolute;
    inset: -10px;
    background: conic-gradient(from 45deg, rgba(255, 255, 255, 0.25), transparent 35%, rgba(255, 255, 255, 0.25));
    filter: blur(6px);
    opacity: 0.45;
    animation: glitterPulse 6s linear infinite;
    pointer-events: none;
    z-index: -1;
}

#sticker-layer .sticker-item.sticker-frame--taped {
    padding: 8px;
    background: #fbf3e7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.35);
}

#sticker-layer .sticker-item.sticker-frame--taped::before,
#sticker-layer .sticker-item.sticker-frame--taped::after {
    content: "";
    position: absolute;
    width: 72px;
    height: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 230, 200, 0.8));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0.85;
    border-radius: 3px;
}

#sticker-layer .sticker-item.sticker-frame--taped::before {
    transform: rotate(-12deg);
    top: -16px;
    left: 20px;
}

#sticker-layer .sticker-item.sticker-frame--taped::after {
    transform: rotate(18deg);
    bottom: -18px;
    right: 24px;
}

#sticker-layer .sticker-item.sticker-frame--neon {
    padding: 12px;
    border-radius: 24px;
    background: #030305;
    border: 2px solid rgba(0, 255, 208, 0.85);
    box-shadow:
        0 0 20px rgba(0, 255, 208, 0.8),
        0 0 45px rgba(0, 150, 255, 0.7),
        0 0 65px rgba(255, 40, 140, 0.6);
}

#sticker-layer .sticker-item.sticker-frame--neon img {
    border-radius: 18px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
}

#sticker-layer .sticker-item.sticker-frame--burnt {
    padding: 18px 12px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%), #1e0e0b;
    border: 3px solid rgba(89, 39, 19, 0.65);
    border-radius: 10px;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.6),
        0 12px 25px rgba(0, 0, 0, 0.6);
    position: relative;
}

#sticker-layer .sticker-item.sticker-frame--burnt::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(255, 180, 120, 0.3);
    mix-blend-mode: screen;
    pointer-events: none;
}

#sticker-layer .sticker-item.sticker-frame--burnt::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(255, 113, 38, 0.18), transparent 60%);
    mix-blend-mode: screen;
    pointer-events: none;
}

#sticker-layer .sticker-item.sticker-frame--burnt img {
    filter: sepia(0.18) contrast(1.05);
}

#sticker-layer .sticker-frame-label {
    position: absolute;
    pointer-events: auto;
    cursor: text;
    user-select: text;
    font-family: 'Courier New', 'IBM Plex Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--frame-text-color, rgba(60, 60, 60, 0.45));
    white-space: nowrap;
    z-index: 2;
}

#sticker-layer .sticker-frame-label[contenteditable="true"] {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
}

#sticker-layer .sticker-item[data-frame-style="magazine"] .sticker-frame-label {
    top: 8px;
    left: 14px;
    letter-spacing: 0.35em;
    font-family: 'Didot', 'Times New Roman', serif;
}

#sticker-layer .sticker-item[data-frame-style="polaroid"] .sticker-frame-label {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    text-align: center;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#sticker-layer .sticker-cutout-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    z-index: 1000;
    pointer-events: auto;
    touch-action: none;
}

#sticker-layer .sticker-item.cutout-mode {
    pointer-events: none !important;
}

#sticker-layer .sticker-item.cutout-mode .sticker-cutout-canvas {
    pointer-events: auto !important;
}

/* Mode Toggle Button - Oldschool OurSpace Style */
.mode-toggle-btn {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 10001;
    background: linear-gradient(180deg, #e8f4ff 0%, #c5d9f1 50%, #a7c0e0 100%);
    border: 2px outset #fff;
    border-radius: 3px;
    color: #003366;
    padding: 6px 16px;
    cursor: pointer;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), inset 1px 1px 0 rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.mode-toggle-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #d5e5f5 50%, #b8d0e8 100%);
    border-color: #0066cc;
}

.mode-toggle-btn:active {
    border-style: inset;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.3);
    padding: 7px 15px 5px 17px;
}

.mode-toggle-btn .mode-icon {
    font-size: 14px;
    line-height: 1;
}

.mode-toggle-btn .mode-text {
    font-size: 11px;
    letter-spacing: 0.3px;
}

.mode-toggle-btn.disabled,
.mode-toggle-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

body.read-only-profile .customize-panel {
    display: none !important;
}

body.read-only-profile #mode-toggle-btn {
    opacity: 0.7;
}

/* View Mode Styles */
body.view-mode .customize-panel {
    display: none;
}

body.view-mode #ourspace-main {
    margin-left: 0;
}

body.view-mode #custom-html-widget .custom-html-editor {
    display: none;
}

body.view-mode .mode-toggle-btn {
    background: linear-gradient(180deg, #ffe8e8 0%, #f1c5c5 50%, #e0a7a7 100%);
}

body.view-mode .mode-toggle-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #f5d5d5 50%, #e8b8b8 100%);
}

/* Remove buttons - only show in customize mode */
.remove-banner-btn,
.pic-remove-btn {
    position: absolute;
    background: rgba(255, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-size: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-banner-btn {
    top: 10px;
    right: 10px;
}

.pic-remove-btn {
    bottom: 5px;
    left: 5px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.remove-banner-btn:hover,
.pic-remove-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

body.view-mode .remove-banner-btn,
body.view-mode .pic-remove-btn,
body.view-mode #remove-audio-btn,
body.view-mode #pictures-reorder-btn,
body.view-mode #friends-reorder-btn {
    display: none !important;
}

#ourspace-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

.ourspace-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
}

.ourspace-nav span {
    font-weight: bold;
    letter-spacing: 1px;
}

/* Customization Panel */
.customize-panel {
    position: fixed;
    left: 0;
    top: 60px;
    width: 300px;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.92);
    border-right: 3px solid #00ffff;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.customize-panel.collapsed {
    transform: translateX(-260px);
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00ffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h2 {
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
    font-size: 18px;
    margin: 0;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
}

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

.panel-content {
    padding: 15px;
}

.panel-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-section h3 {
    color: #00ffff;
    font-family: 'Comic Sans MS', cursive;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
}

.panel-section label,
.panel-section p,
.panel-section span,
.panel-section small {
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.85);
    color: rgba(255, 255, 255, 0.92);
}

.mobile-panel-handle {
    display: none;
}

#mobile-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 20, 0.68);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 950;
}

body.view-mode #mobile-panel-overlay {
    display: none;
}

#mobile-panel-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body.ourspace-mobile {
    --mobile-panel-height: clamp(420px, 75vh, 640px);
}

body.ourspace-mobile #ourspace-container {
    flex-direction: column;
    padding-top: 60px;
}

body.ourspace-mobile #ourspace-main {
    margin-left: 0;
    padding: 16px 16px calc(var(--mobile-panel-height) + 80px);
}

body.ourspace-mobile.view-mode #ourspace-main {
    padding-bottom: 40px;
}

body.ourspace-mobile #mode-toggle-btn {
    position: fixed;
    top: auto;
    left: auto;
    bottom: 18px;
    right: 18px;
    z-index: 1200;
    border-radius: 999px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
}

body.ourspace-mobile #mode-toggle-btn .mode-text {
    font-size: 12px;
    letter-spacing: 0.4px;
}

body.ourspace-mobile .customize-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--mobile-panel-height);
    border-right: none;
    border-top: 3px solid #00ffff;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    opacity: 0;
    background: rgba(4, 4, 20, 0.96);
    box-shadow: 0 -20px 35px rgba(0, 0, 0, 0.65);
    overflow-y: auto;
    padding-bottom: 32px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.ourspace-mobile .customize-panel.collapsed {
    transform: translateY(100%);
}

body.ourspace-mobile:not(.view-mode) .customize-panel {
    transform: translateY(0);
    opacity: 1;
}

body.ourspace-mobile:not(.view-mode) .customize-panel.collapsed {
    transform: translateY(calc(100% - 78px));
}

body.ourspace-mobile.view-mode .customize-panel {
    display: none !important;
}

body.ourspace-mobile .mobile-panel-handle {
    display: block;
    width: 60px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    margin: 8px auto 0 auto;
}

body.ourspace-mobile .panel-header {
    border-radius: 24px 24px 0 0;
    padding-bottom: 10px;
}

body.ourspace-mobile .panel-content {
    padding: 14px 18px 32px;
}

body.ourspace-mobile .panel-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
}

body.ourspace-mobile .panel-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    position: sticky;
    top: 52px;
    background: rgba(4, 4, 20, 0.96);
    z-index: 5;
}

body.ourspace-mobile .panel-tabs::-webkit-scrollbar {
    display: none;
}

body.ourspace-mobile .panel-tab {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.ourspace-mobile .panel-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
}

body.ourspace-mobile:not(.view-mode) .customize-panel:not(.collapsed) + #mobile-panel-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.ourspace-mobile:not(.view-mode) .customize-panel.collapsed + #mobile-panel-overlay {
    opacity: 0;
    pointer-events: none;
}

body.ourspace-mobile .panel-tabs .panel-tab.active {
    border-color: #00ffff;
}

body.ourspace-mobile .customize-panel ~ #ourspace-main {
    margin-left: 0;
}

#sticker-panel .sticker-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#sticker-panel .sticker-deck {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.sticker-deck-empty {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.sticker-deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.sticker-deck-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

.sticker-deck-thumb {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.sticker-deck-thumb img {
    display: block;
    width: 100%;
    border-radius: 6px;
}

.sticker-deck-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sticker-deck-label {
    font-size: 12px;
    color: var(--custom-text-color, #ffffff);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sticker-deck-style {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(173, 255, 245, 0.9);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(173, 255, 245, 0.4);
    padding: 2px 8px;
    border-radius: 999px;
}

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

.sticker-deck-actions button {
    flex: 1;
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sticker-deck-actions button:hover {
    background: rgba(0, 255, 255, 0.15);
}

.sticker-deck-actions button.danger {
    border-color: rgba(255, 99, 132, 0.7);
    color: #ff6384;
}

#sticker-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

#sticker-panel input[type="range"],
#sticker-panel input[type="number"] {
    width: 100%;
    margin-top: 4px;
}

.sticker-frame-panel {
    margin-top: 10px;
}

.frame-panel-title {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
}

.sticker-frame-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
}

.frame-text-controls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame-text-controls label {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.frame-text-controls input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: inherit;
}

.frame-text-controls small {
    font-size: 10px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.65);
}

.frame-text-controls.hidden {
    display: none;
}

.frame-preset {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.15s ease;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.75);
}

.frame-preset:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

.frame-preset.active {
    border-color: #ff80d0;
    background: rgba(255, 128, 208, 0.18);
    color: #ffe6ff;
    box-shadow: 0 0 14px rgba(255, 128, 208, 0.3);
}

.frame-preset[data-sticker-frame="holographic"] {
    background: linear-gradient(120deg, rgba(125, 253, 255, 0.32), rgba(255, 105, 180, 0.28));
}

.frame-preset[data-sticker-frame="glitter"] {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.45));
}

.frame-preset[data-sticker-frame="taped"] {
    background: linear-gradient(120deg, rgba(255, 234, 209, 0.6), rgba(255, 255, 255, 0.25));
}

.frame-preset[data-sticker-frame="neon"] {
    background: linear-gradient(135deg, rgba(0, 255, 208, 0.5), rgba(255, 0, 170, 0.32));
}

.frame-preset[data-sticker-frame="burnt"] {
    background: linear-gradient(120deg, rgba(75, 24, 10, 0.6), rgba(0, 0, 0, 0.55));
}

.sticker-action-row {
    display: flex;
    gap: 10px;
}

#sticker-hint {
    font-size: 11px;
    opacity: 0.7;
    margin: 5px 0 0;
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.theme-filter {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
}

.theme-filter::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.panel-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.panel-summary .summary-item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

.panel-summary .summary-item strong {
    font-size: 16px;
    color: #fff;
}

.scene-helper-text {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.scene-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    margin-bottom: 14px;
}

.scene-editor label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    gap: 4px;
}

.scene-editor input,
.scene-editor textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    padding: 6px 8px;
    font-family: 'Courier New', monospace;
}

.scene-editor textarea {
    resize: vertical;
    min-height: 50px;
}

.scene-editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.scene-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scene-btn.primary {
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.scene-btn.subtle {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.scene-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.scene-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scene-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.scene-card.active {
    border-color: #00ffff;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.4);
}

.scene-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.scene-card-header h4 {
    margin: 0;
    font-size: 14px;
}

.scene-card-meta {
    font-size: 11px;
    opacity: 0.75;
}

.scene-description {
    font-size: 12px;
    opacity: 0.8;
    margin: 6px 0 10px;
}

.scene-swatch {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    margin: 6px 0;
}

.scene-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scene-action-btn {
    flex: 1 1 calc(50% - 8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 12px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.scene-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.scene-action-btn.danger {
    border-color: rgba(255, 0, 102, 0.6);
    color: #ff5c9a;
}

.scene-empty {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 10px;
}
#summary-save-state.unsaved {
    color: #ff9de7;
}

.panel-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.panel-tab {
    flex: 1 1 auto;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-tab.active {
    background: linear-gradient(135deg, #ff9de7 0%, #7b63ff 100%);
    color: #050505;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.tabbed-panel .panel-section[data-panel] {
    display: none;
}

.tabbed-panel[data-active-tab="themes"] .panel-section[data-panel="themes"],
.tabbed-panel[data-active-tab="background"] .panel-section[data-panel="background"],
.tabbed-panel[data-active-tab="widgets"] .panel-section[data-panel="widgets"],
.tabbed-panel[data-active-tab="scenes"] .panel-section[data-panel="scenes"],
.tabbed-panel[data-active-tab="effects"] .panel-section[data-panel="effects"],
.tabbed-panel[data-active-tab="layout"] .panel-section[data-panel="layout"],
.tabbed-panel[data-active-tab="account"] .panel-section[data-panel="account"] {
    display: block;
}

.customize-mode-only {
    display: block;
}

.view-mode .customize-mode-only {
    display: none !important;
}

.theme-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #00ffff;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-size: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #00ffff;
}

.theme-btn.active {
    border-color: #ff00ff;
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.8);
    position: relative;
}

.theme-btn.active::after {
    content: '\2605'; /* STAR */
    position: absolute;
    top: -8px;
    right: -6px;
    color: #ffff00;
    font-size: 14px;
}

.custom-widget-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-visibility-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.widget-visibility-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.custom-widget-form label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #fff;
    gap: 4px;
}

.custom-widget-form input,
.custom-widget-form textarea,
.custom-widget-form select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
}

.custom-widget-form textarea {
    resize: vertical;
}

.custom-widget-upload-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.custom-widget-upload-row .subtle {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
}

.custom-widget-upload-row span {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.custom-widget-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.custom-widget-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-widget-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #fff;
}

.custom-widget-item-details {
    display: flex;
    flex-direction: column;
}

.custom-widget-item-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.75;
}

.custom-widget-remove {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 5px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
}

.custom-widget-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.custom-widgets-board .widget {
    margin-bottom: 20px;
}

.custom-widget-type-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 8px;
}

.custom-widget-media {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-widget-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-widget-upload-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.3);
    color: #fff;
    cursor: pointer;
}

/* Color Controls */
.color-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-controls label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 12px;
}

.color-controls input[type="color"] {
    width: 50px;
    height: 30px;
    border: 2px solid #00ffff;
    cursor: pointer;
    background: transparent;
}

.color-controls input[type="range"] {
    width: 80px;
    margin: 0 5px;
}

/* Pattern Grid */
.pattern-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}

.pattern-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    color: #fff;
    font-size: 11px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pattern-item:hover,
.pattern-item.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

/* Buttons */
.upload-btn,
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #00ffff;
    color: #fff;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-size: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.upload-btn:hover,
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.5);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
}

/* Select Inputs */
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    color: #fff;
    padding: 8px;
    margin: 5px 0;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 3px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.effect-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.effect-group {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.effect-group h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffd8ff;
}

.effect-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.effect-group input[type="range"],
.effect-group select,
.effect-group input[type="color"] {
    width: 100%;
    margin-top: 4px;
}

/* Layout Buttons */
.layout-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

.layout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #fff;
    padding: 8px;
    cursor: pointer;
    font-size: 11px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.layout-btn:hover,
.layout-btn.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px #00ffff;
}

/* Main Content */
#ourspace-main {
    margin-left: 300px;
    flex: 1;
    padding: 20px;
    transition: margin-left 0.3s ease;
    position: relative;
}

.sticker-stage {
    position: relative;
    width: 100%;
    min-height: 100%;
}

.customize-panel.collapsed ~ #ourspace-main {
    margin-left: 40px;
}

/* Profile Header */
#profile-header {
    margin-bottom: 20px;
}

.banner-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    border: 3px solid;
    background-size: cover;
    background-position: center;
}

.upload-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border: 2px dashed #fff;
    color: #fff;
    padding: 15px 30px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.upload-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.profile-header-content {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid;
}

.profile-pic-container {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border: 3px solid;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pic-upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.pic-upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px #00ffff;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: 'Impact', sans-serif;
    font-size: 36px;
    margin-bottom: 10px;
    outline: none;
}

.profile-tagline {
    font-family: 'Comic Sans MS', cursive;
    font-size: 16px;
    margin-bottom: 15px;
    outline: none;
    font-style: italic;
}

.profile-status {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.mood {
    font-family: 'Comic Sans MS', cursive;
}

#mood-text {
    outline: none;
    border-bottom: 1px dashed;
}

#mood-icon {
    margin-left: 8px;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 2px 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

#mood-icon:hover,
#mood-icon:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.15);
    outline: none;
}

body.view-mode #mood-icon {
    cursor: default;
    background: transparent;
    transform: none;
}

.emoji-picker {
    position: absolute;
    z-index: 10005;
    background: rgba(12, 12, 12, 0.95);
    border: 2px solid #00ffff;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 32px);
    gap: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.emoji-picker.visible {
    opacity: 1;
    transform: translateY(0);
}

.emoji-picker button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.1s ease, background 0.1s ease;
}

.emoji-picker button:hover,
.emoji-picker button:focus-visible {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

/* Content Grid */
.content-grid {
    display: grid;
    gap: 20px;
}

.content-grid.layout-classic {
    grid-template-columns: 1fr 2fr 1fr;
}

.content-grid.layout-split {
    grid-template-columns: 1fr 1fr;
}

.content-grid.layout-split .column-right {
    grid-column: 1 / -1;
}

.content-grid.layout-centered {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.content-grid.layout-centered .column-left,
.content-grid.layout-centered .column-right {
    display: none;
}

.content-grid.layout-phone-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-grid.layout-phone-stack .column {
    width: 100%;
}

.content-grid.layout-phone-stack .column-center {
    order: 1;
}

.content-grid.layout-phone-stack .column-left {
    order: 2;
}

.content-grid.layout-phone-stack .column-right {
    order: 3;
}

/* Widgets */
.widget {
    background: var(--custom-widget-bg, rgba(0, 0, 0, 0.7));
    border: var(--widget-border-size, 3px) solid;
    border-radius: var(--widget-radius, 10px);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(var(--widget-blur, 0px));
    -webkit-backdrop-filter: blur(var(--widget-blur, 0px));
    box-shadow: 0 0 var(--widget-glow-strength, 20px) var(--widget-glow-color, rgba(0, 255, 255, 0.5));
}

.widget:hover {
    box-shadow: 0 0 var(--widget-glow-strength, 20px) var(--widget-glow-color, rgba(0, 255, 255, 0.5));
}

.widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid;
}

.widget-header h2 {
    font-family: 'Comic Sans MS', cursive;
    font-size: 16px;
    margin: 0;
}

.widget-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
    width: 25px;
    height: 25px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    line-height: 1;
}

.widget-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.widget-content {
    padding: 15px;
}

.widget-content[contenteditable="true"] {
    outline: none;
    min-height: 100px;
}

.widget-content[contenteditable="true"]:focus {
    background: rgba(255, 255, 255, 0.05);
}

/* Music Player */
.music-player {
    text-align: center;
}

.now-playing {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.now-playing marquee {
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.player-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.player-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

#volume-slider {
    width: 100px;
}

.visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.visualizer .bar {
    width: 8px;
    background: linear-gradient(to top, #00ffff, #ff00ff);
    border-radius: 3px;
    animation: visualize 0.5s ease-in-out infinite;
}

.visualizer .bar:nth-child(1) { animation-delay: 0s; }
.visualizer .bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer .bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer .bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer .bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer .bar:nth-child(6) { animation-delay: 0.3s; }
.visualizer .bar:nth-child(7) { animation-delay: 0.2s; }
.visualizer .bar:nth-child(8) { animation-delay: 0.1s; }

@keyframes visualize {
    0%, 100% { height: 10px; }
    50% { height: 50px; }
}

.music-upload {
    margin-top: 15px;
}

.music-upload label {
    display: block;
    margin-top: 10px;
    font-size: 12px;
}

/* Picture Grid */
.picture-wall-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.picture-wall-controls label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.picture-wall-controls select {
    width: auto;
    padding: 5px;
    margin: 0;
}

.picture-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
}

.picture-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.picture-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.picture-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.picture-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.picture-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

.picture-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 3px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.picture-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.7);
}

.picture-item.reorder-mode {
    cursor: move;
    opacity: 1;
}

.picture-item.reorder-mode:hover {
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 1);
}

.picture-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picture-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.picture-item .frame-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.picture-item:hover .delete-btn {
    display: flex;
}

.picture-item:hover .frame-btn,
.picture-item.picture-framing .frame-btn,
.picture-item.picture-framing .delete-btn {
    display: flex;
}

.picture-item.picture-framing img {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.picture-item.picture-framing img.framing-active {
    cursor: grabbing;
    touch-action: none;
}

.picture-item.picture-framing {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.9);
}

.picture-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px;
    font-size: 11px;
    text-align: center;
}

.picture-item {
    box-sizing: border-box;
}

.picture-item.frame-classic {
    border: 3px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.picture-item.frame-notebook {
    border: 3px solid #f0d3a2;
    background: repeating-linear-gradient(
        0deg,
        #fffbea 0px,
        #fffbea 18px,
        #ffe7c4 18px,
        #ffe7c4 19px
    );
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.picture-item.frame-notebook img {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.picture-item.frame-magazine {
    border: 6px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    background: radial-gradient(circle at top, rgba(255,255,255,0.25), rgba(0,0,0,0));
}

.picture-item.frame-polaroid {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    background: #fff;
    padding: 12px 12px 40px;
    overflow: visible;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.picture-item.frame-polaroid img {
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.picture-item.frame-photocard {
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(0,0,0,0.1));
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.4);
}

.picture-item.frame-photocard img {
    border-radius: 14px;
}

/* Comments */
.add-comment {
    margin-bottom: 20px;
}

.add-comment input,
.add-comment textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    color: #fff;
    padding: 10px;
    margin: 5px 0;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 5px;
}

.add-comment textarea {
    min-height: 80px;
    resize: vertical;
}

#add-comment-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#add-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.5);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.comment-author {
    font-weight: bold;
}

.comment-date {
    opacity: 0.7;
    font-size: 11px;
}

.comment-text {
    font-size: 13px;
}

.comment-delete {
    margin-top: 8px;
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
}

.comment-delete:hover {
    color: #ff0000;
}

/* Top Friends */
.friends-controls {
    margin-bottom: 15px;
}

.friends-controls label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.friends-controls select {
    width: auto;
    padding: 5px;
    margin: 0;
}

.friends-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
}

.friends-grid[data-slots="4"] { grid-template-columns: repeat(2, 1fr); }
.friends-grid[data-slots="8"] { grid-template-columns: repeat(4, 1fr); }
.friends-grid[data-slots="12"] { grid-template-columns: repeat(4, 1fr); }
.friends-grid[data-slots="16"] { grid-template-columns: repeat(4, 1fr); }
.friends-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.friends-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.friends-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.friends-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }

.friend-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 3px dashed;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.friend-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.friend-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-slot .friend-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px;
    font-size: 11px;
    text-align: center;
    font-family: 'Comic Sans MS', cursive;
}

.friend-slot .add-friend-btn {
    font-size: 30px;
    opacity: 0.5;
}

.friend-frame-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 255, 255, 0.8);
    border: none;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 3px;
    cursor: pointer;
    z-index: 10;
    color: #000;
    font-weight: bold;
}

.friend-frame-btn:hover {
    background: rgba(0, 255, 255, 1);
}

.friend-framing {
    border: 2px solid #00ffff !important;
    cursor: move !important;
}

/* Stats */
.stats {
    margin-bottom: 15px;
}

.stat-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item strong {
    color: var(--custom-label-color, #00ffff);
}

.hit-counter {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    border-radius: 5px;
}

.counter-display {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.counter-digit {
    background: linear-gradient(135deg, #ff0000, #00ff00, #0000ff);
    color: #fff;
    padding: 8px 12px;
    border: 2px solid #fff;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Contact */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-size: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: left;
}

.contact-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.contact-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px;
    font-size: 12px;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.contact-tab.active {
    background: linear-gradient(135deg, #00eaff, #ff00ff);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.contact-tab-content {
    display: none;
}

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

.inbox-empty {
    text-align: center;
    padding: 15px;
    font-size: 13px;
    opacity: 0.7;
}

.inbox-lists {
    display: none;
    gap: 15px;
    flex-direction: column;
}

.inbox-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
}

.inbox-section h4 {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--custom-label-color, #00ffff);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inbox-item {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.inbox-item:last-child {
    margin-bottom: 0;
}

.inbox-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.inbox-body {
    font-size: 12px;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.inbox-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inbox-actions button {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    font-size: 11px;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inbox-actions button:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.accounts-search {
    margin-bottom: 12px;
}

.accounts-search input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-family: 'Courier New', monospace;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.account-name {
    font-weight: bold;
    letter-spacing: 0.5px;
}

.account-actions {
    display: flex;
    gap: 8px;
}

.account-actions a,
.account-actions button {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.account-actions a:hover,
.account-actions button:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-1px);
}

.inbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inbox-pill.unread {
    background: rgba(255, 0, 128, 0.2);
    border: 1px solid rgba(255, 0, 128, 0.5);
}

.inbox-pill.read {
    background: rgba(0, 255, 170, 0.15);
    border: 1px solid rgba(0, 255, 170, 0.4);
}

/* Interests */
.interest-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.interest-section strong {
    color: var(--custom-label-color, #00ffff);
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.interest-section div[contenteditable] {
    outline: none;
    font-size: 13px;
    min-height: 30px;
    padding: 5px;
    border-radius: 3px;
}

.interest-section div[contenteditable]:focus {
    background: rgba(255, 255, 255, 0.05);
}

/* Custom HTML */
.custom-html-editor {
    margin-bottom: 15px;
}

#custom-html-input {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    color: #fff;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    border-radius: 5px;
}

.custom-html-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
}

#custom-html-global-input {
    width: 100%;
    min-height: 120px;
    background: rgba(5, 5, 5, 0.6);
    border: 2px dashed;
    color: #fff;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    border-radius: 5px;
}

#apply-custom-html {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid;
    color: #fff;
    padding: 8px;
    margin-top: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    border-radius: 5px;
}

#custom-html-output {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    min-height: 50px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #00ffff;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border: 3px solid #00ffff;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.7);
}

/* Layout Editor Styles */
.layout-editor-active #ourspace-main {
    position: relative;
}

.layout-editable {
    /* Don't override position - JavaScript sets it to absolute */
    transition: box-shadow 0.2s ease;
    cursor: move;
}

.layout-editable:hover {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    outline: 2px dashed rgba(0, 255, 255, 0.3);
}

.layout-editable.dragging {
    opacity: 0.8;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    outline: 2px solid #00ffff;
    z-index: 9999;
}

.layout-editable.resizing {
    opacity: 0.9;
    outline: 2px solid #ff00ff;
}

/* Ensure widget content stays organized when resized */
.layout-editable .widget-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layout-editable .widget-header {
    flex-shrink: 0;
}

/* Music widget specific layout protection */
.layout-editable#music-widget .widget-content {
    min-height: 200px;
}

.layout-editable#music-widget .audio-controls {
    flex-shrink: 0;
    position: relative;
}

.layout-editable#music-widget .audio-upload {
    flex-shrink: 0;
}

/* Picture wall layout protection */
.layout-editable#picture-wall-widget .picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

/* Comments widget layout protection */
.layout-editable#comments-widget .comment-input {
    flex-shrink: 0;
    margin-top: auto;
}

/* Contact buttons stay visible */
.layout-editable#contact-widget .contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* Hide all editor controls in view mode */
body.view-mode .zindex-controls,
body.view-mode .snapline-container {
    display: none !important;
}

body.view-mode .layout-editable {
    cursor: default !important;
}

body.view-mode .layout-editable:hover {
    box-shadow: none !important;
    outline: none !important;
}

/* Z-Index Controls */
.zindex-controls {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid #ffff00 !important;
    border-radius: 5px !important;
    padding: 3px 8px !important;
    z-index: 10000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.zindex-btn {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 0, 0.8);
    border: 1px solid #ffff00;
    border-radius: 3px;
    color: #000;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: bold;
}

.zindex-btn:hover {
    background: rgba(255, 255, 0, 1);
    transform: scale(1.1);
}

.zindex-label {
    color: #ffff00;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    min-width: 30px;
    text-align: center;
}

/* Snapline Container */
.snapline-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* Snaplines */
.snapline {
    position: absolute;
    background: #00ff00;
    box-shadow: 0 0 5px #00ff00;
    pointer-events: none;
    opacity: 0.8;
}

.snapline-vertical {
    width: 2px;
    height: 100%;
    top: 0;
}

.snapline-horizontal {
    height: 2px;
    width: 100%;
    left: 0;
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .layout-editable[data-mobile-behavior="hide"] {
        display: none !important;
    }

    .layout-editable[data-mobile-behavior="stack"] {
        position: static !important;
        width: 100% !important;
        margin-bottom: 15px;
    }

    .layout-editable[data-mobile-behavior="shrink"] {
        transform: scale(0.8);
        transform-origin: top left;
    }

    .layout-editable[data-mobile-behavior="scroll"] {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .layout-editable[data-mobile-breakpoint="480px"][data-mobile-behavior="hide"] {
        display: none !important;
    }

    .layout-editable[data-mobile-breakpoint="480px"][data-mobile-behavior="stack"] {
        position: static !important;
        width: 100% !important;
    }
}

@media (max-width: 1024px) {
    .layout-editable[data-mobile-breakpoint="1024px"][data-mobile-behavior="hide"] {
        display: none !important;
    }

    .layout-editable[data-mobile-breakpoint="1024px"][data-mobile-behavior="stack"] {
        position: static !important;
        width: 100% !important;
    }
}

@media (max-width: 1280px) {
    .layout-editable[data-mobile-breakpoint="1280px"][data-mobile-behavior="hide"] {
        display: none !important;
    }

    .layout-editable[data-mobile-breakpoint="1280px"][data-mobile-behavior="stack"] {
        position: static !important;
        width: 100% !important;
    }
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid #00ffff;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid.layout-classic {
        grid-template-columns: 1fr;
    }

    .customize-panel {
        transform: translateX(-260px);
    }

    .customize-panel.expanded {
        transform: translateX(0);
    }

    #ourspace-main {
        margin-left: 40px;
    }
}

@media (max-width: 768px) {
    #ourspace-main {
        margin-left: 0;
        padding: 10px;
    }

    .banner-image {
        height: 150px;
    }

    .profile-header-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic-container {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 24px;
    }

    .picture-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .friends-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Authentication UI */
.auth-info {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color, #ffffff);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 12px;
}

.auth-username {
    font-size: 13px;
}

.auth-message {
    color: #ffcc00;
    font-weight: bold;
}

.auth-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #00ffff;
    color: white;
    font-family: 'Comic Sans MS', cursive;
    font-size: 13px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #00ffff;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    color: #ff00ff;
    transform: rotate(90deg);
}

.auth-modal-content h2 {
    color: #00ffff;
    font-family: 'Comic Sans MS', cursive;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.auth-form-group {
    margin-bottom: 15px;
}

.auth-form-group label {
    display: block;
    color: #ffffff;
    font-family: 'Comic Sans MS', cursive;
    margin-bottom: 5px;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #00ffff;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.auth-error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    font-family: Arial, sans-serif;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #00ffff;
    color: white;
    font-family: 'Comic Sans MS', cursive;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.auth-switch a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #ff00ff;
    text-decoration: underline;
}
#ourspace-main .frame-draggable {
    cursor: grab;
}

#ourspace-main .frame-draggable.framing-active {
    cursor: grabbing;
}

/* Block List Modal */
.blocklist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.blocklist-modal.active {
    display: flex;
}

.blocklist-modal .modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #00ffff;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.blocklist-modal .modal-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #00ffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blocklist-modal .modal-header h2 {
    margin: 0;
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
    font-size: 24px;
}

.blocklist-modal .close-btn {
    background: rgba(255, 0, 0, 0.7);
    border: 2px solid #ff0000;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.blocklist-modal .close-btn:hover {
    background: rgba(255, 0, 0, 0.9);
}

.blocklist-modal .modal-body {
    padding: 20px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blocked-user-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.blocked-username {
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
    font-size: 18px;
    font-weight: bold;
    flex: 1;
}

.blocked-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.unblock-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 2px solid #ff00ff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

.unblock-btn:hover {
    background: linear-gradient(135deg, #ff00ff 0%, #f5576c 100%);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    transform: scale(1.05);
}

/* Friends List Modal */
.friends-list-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.friends-list-modal.active {
    display: flex;
}

.friends-list-modal .modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.friends-list-modal .modal-header {
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.friends-list-modal .modal-header h2 {
    margin: 0;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.friends-list-modal .close-btn {
    background: transparent;
    border: none;
    color: #00ffff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: all 0.2s;
}

.friends-list-modal .close-btn:hover {
    color: #ff0066;
    transform: rotate(90deg);
}

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

.friends-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.friend-list-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.friend-list-item:hover {
    border-color: rgba(0, 255, 255, 0.6);
    background: rgba(0, 255, 255, 0.05);
}

.friend-list-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.friend-list-item-info {
    flex: 1;
    min-width: 0;
}

.friend-list-item-name {
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-list-item-actions {
    display: flex;
    gap: 5px;
}

.friend-list-item .remove-btn {
    background: rgba(255, 0, 102, 0.2);
    border: 1px solid rgba(255, 0, 102, 0.5);
    color: #ff0066;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.friend-list-item .remove-btn:hover {
    background: rgba(255, 0, 102, 0.4);
    border-color: #ff0066;
    transform: scale(1.05);
}

.friends-list-empty {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
    font-size: 16px;
}

/* Mobile Layout Editor */
@media (max-width: 768px) {
    body.layout-editor-mobile .layout-editable {
        border: 2px solid rgba(0, 255, 255, 0.5) !important;
    }

    body.layout-editor-mobile .resize-handle {
        width: 30px !important;
        height: 30px !important;
        border: 3px solid #00ffff !important;
        background: rgba(0, 0, 0, 0.8) !important;
    }

    body.layout-editor-mobile .z-controls {
        position: fixed !important;
        bottom: 80px !important;
        right: 10px !important;
        left: auto !important;
        top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.9) !important;
        padding: 10px !important;
        border-radius: 8px !important;
        border: 2px solid rgba(0, 255, 255, 0.5) !important;
    }

    body.layout-editor-mobile .z-controls button {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        padding: 8px !important;
    }

    body.layout-editor-mobile #grid-editor-toggle {
        position: fixed !important;
        bottom: 20px !important;
        right: 10px !important;
        z-index: 10000 !important;
        font-size: 14px !important;
        padding: 12px 20px !important;
    }

    body.layout-editor-mobile #grid-editor-controls {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        background: rgba(0, 0, 0, 0.95) !important;
        padding: 15px !important;
        border-top: 2px solid rgba(0, 255, 255, 0.5) !important;
        border-radius: 15px 15px 0 0 !important;
    }

    body.layout-editor-mobile #grid-editor-controls label {
        display: block !important;
        margin: 10px 0 !important;
    }

    body.layout-editor-mobile #grid-editor-controls button {
        margin: 5px !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }

    /* Make widgets easier to tap on mobile */
    body.layout-editor-mobile .layout-editable {
        min-height: 60px !important;
    }

    /* Hide snaplines on mobile for cleaner UI */
    body.layout-editor-mobile .snapline {
        display: none !important;
    }
}




