* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 174, 74, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(88, 115, 255, 0.18), transparent 34%),
        linear-gradient(135deg, #080b13, #111827 45%, #0c111d);
    color: #f8fafc;
    min-height: 100vh;
}

#navbar {
    position: relative;
    z-index: 40;
}

.gallery-page {
    width: 100%;
    min-height: 100vh;
    padding: 28px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 700;
}

.gallery-header h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.subtitle {
    max-width: 680px;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 16px;
}

.gallery-privacy-note {
    max-width: 720px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 16px;
    color: #fef3c7;
    background: rgba(180, 83, 9, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.28);
    line-height: 1.65;
    font-size: 14px;
}

.gallery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

button,
a {
    font: inherit;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border: 0;
    text-decoration: none;
    cursor: pointer;
    padding: 13px 18px;
    border-radius: 999px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #f97316, #fbbf24);
    color: #111827;
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.25);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.small {
    padding: 10px 14px;
    font-size: 13px;
}

.creator-strip {
    max-width: 1280px;
    margin: 0 auto 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.creator-strip > div {
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    padding: 18px;
    backdrop-filter: blur(18px);
}

.label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.creator-strip strong {
    color: #ffffff;
    font-size: 16px;
}

.scene-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 620px;
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    perspective: 1200px;
}

.scene-toolbar {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scene-toolbar button {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(12px);
    padding: 10px 13px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.virtual-room {
    position: relative;
    height: 620px;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.8s cubic-bezier(.2, .8, .2, 1);
}

.wall,
.floor,
.ceiling-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wall-back {
    transform: translateZ(-240px) scale(1.05);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 110px);
}

.wall-left {
    width: 34%;
    right: auto;
    transform-origin: left center;
    transform: rotateY(65deg) translateX(-80px);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.25));
}

.wall-right {
    width: 34%;
    left: auto;
    transform-origin: right center;
    transform: rotateY(-65deg) translateX(80px);
    background: linear-gradient(270deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.25));
}

.floor {
    top: 50%;
    transform-origin: bottom center;
    transform: rotateX(75deg) translateY(110px);
    background:
        linear-gradient(180deg, rgba(251, 191, 36, 0.06), rgba(2, 6, 23, 0.1)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 92px);
}

.ceiling-glow {
    height: 220px;
    bottom: auto;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.24), transparent 55%);
    filter: blur(18px);
}

.art-wall {
    position: absolute;
    width: min(1040px, 88%);
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%) translateZ(40px);
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 28px;
    z-index: 8;
}

.art-card {
    position: relative;
    min-height: 240px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.085);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transform: translateY(0) rotateX(0deg);
    transition: transform 0.25s ease, background 0.25s ease;
}

.art-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -18px;
    width: 70%;
    height: 26px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(251, 191, 36, 0.28), transparent 65%);
    filter: blur(10px);
}

.art-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.13);
}

.art-frame {
    background: #0f172a;
    border-radius: 17px;
    padding: 8px;
    border: 8px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.art-frame img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: linear-gradient(135deg, #334155, #0f172a);
}

.art-card h3 {
    margin: 14px 4px 6px;
    font-size: 15px;
    color: #ffffff;
}

.art-card p {
    margin: 0 4px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.artwork-panel {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: min(440px, calc(100vw - 56px));
    max-height: calc(100vh - 56px);
    overflow: auto;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
    z-index: 50;
    display: none;
}

.artwork-panel.is-open {
    display: block;
}

.artwork-panel img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 28px 28px 0 0;
    background: #111827;
}

.panel-content {
    padding: 22px;
}

.panel-content h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.panel-content p {
    color: #cbd5e1;
    line-height: 1.7;
}

.panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.close-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
}

.gallery-footer {
    max-width: 1280px;
    margin: 18px auto 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

body.vr-preview .gallery-header,
body.vr-preview .creator-strip,
body.vr-preview .gallery-footer {
    display: none;
}

body.vr-preview .gallery-page {
    padding: 0;
}

body.vr-preview .scene-wrapper {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
}

body.vr-preview .virtual-room {
    height: 100vh;
}

@media (max-width: 980px) {
    .gallery-header {
        flex-direction: column;
    }

    .gallery-actions {
        justify-content: flex-start;
    }

    .creator-strip {
        grid-template-columns: 1fr;
    }

    .scene-wrapper {
        min-height: 760px;
    }

    .virtual-room {
        height: 760px;
    }

    .art-wall {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        top: 56%;
    }
}

@media (max-width: 560px) {
    .gallery-page {
        padding: 18px;
    }

    .art-wall {
        grid-template-columns: 1fr;
        width: 82%;
    }

    .scene-wrapper {
        min-height: 1120px;
    }

    .virtual-room {
        height: 1120px;
    }

    .scene-toolbar {
        position: relative;
        top: auto;
        left: auto;
        padding: 14px;
    }
}
