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

:root {
    --display: "Bebas Neue", "Arial Black", sans-serif;
    --body: "Inter", "Arial", sans-serif;
    --accent: #ffb43b;
    --accent-hot: #ff3b6b;
}

body {
    background: #000;
    overflow: hidden;
    font-family: var(--body);
    color: #fff;
}

.unselectable {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#loading-screen { width: 100vw; height: 100vh; position: relative; }

#fade-in {
    position: absolute; inset: 0; z-index: 99; background: #000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 2s ease;
}
#fade-in.done { opacity: 0; visibility: hidden; }

/* ---- Background art: rotating larp clips ---- */
#art-container { position: absolute; inset: 0; z-index: 1; background: #000; }
.slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 1.8s ease-in-out;
    overflow: hidden;
}
.slide.show { opacity: 1; }
.slide video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform-origin: center center;
    filter: saturate(1.1) contrast(1.05);
}
.zoom-in  { animation: zoomIn 11s forwards linear; }
.zoom-out { animation: zoomOut 11s forwards linear; }
@keyframes zoomIn  { from { transform: scale(1); }    to { transform: scale(1.16); } }
@keyframes zoomOut { from { transform: scale(1.16); } to { transform: scale(1); } }

/* ---- Overlays ---- */
.vignette {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 14%, rgba(0,0,0,0.6) 68%, rgba(0,0,0,0.95) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 22%, transparent 68%, rgba(0,0,0,0.9) 100%);
}

.grade {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(120deg, rgba(255,59,107,0.10), transparent 40%, rgba(255,180,59,0.10));
    mix-blend-mode: screen;
}

.grain {
    position: absolute; inset: 0; z-index: 3; pointer-events: none;
    opacity: 0.07; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.6s steps(3) infinite;
}
@keyframes grainShift {
    0%   { transform: translate(0,0); }
    33%  { transform: translate(-3px, 2px); }
    66%  { transform: translate(2px, -2px); }
    100% { transform: translate(0,0); }
}

/* ---- UI ---- */
.ui-layer {
    position: relative; z-index: 4; height: 100%;
    padding: 3rem 4rem 2.5rem;
    display: flex; flex-direction: column; justify-content: space-between;
}

.center-stage {
    flex-grow: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    opacity: 0; transform: translateY(20px);
    transition: opacity 1.2s ease 0.4s, transform 1.2s ease 0.4s;
}
.center-stage.show { opacity: 1; transform: translateY(0); }

.title {
    font-family: var(--display);
    font-size: clamp(7rem, 28vw, 22rem);
    line-height: 0.85;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 0 40px rgba(255,180,59,0.35), 0 4px 30px rgba(0,0,0,0.8);
    display: flex;
    align-items: baseline;
    gap: 0.04em;
    animation: glowPulse 4s ease-in-out infinite;
}
.title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotate(-8deg) scale(1.3);
    animation: letterIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.title .tf {
    font-size: 0.28em;
    letter-spacing: 0.05em;
    color: #fff;
    opacity: 0;
    text-shadow: none;
    margin-left: 0.15em;
    align-self: flex-end;
    padding-bottom: 0.15em;
    animation: fadeIn 1.2s ease 1.5s forwards;
}
@keyframes fadeIn { to { opacity: 0.12; } }
.center-stage.show .title .letter:nth-child(1) { animation-delay: 0.5s; }
.center-stage.show .title .letter:nth-child(2) { animation-delay: 0.65s; }
.center-stage.show .title .letter:nth-child(3) { animation-delay: 0.8s; }
.center-stage.show .title .letter:nth-child(4) { animation-delay: 0.95s; }
@keyframes letterIn {
    to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 30px rgba(255,180,59,0.25), 0 4px 30px rgba(0,0,0,0.8); }
    50%      { text-shadow: 0 0 70px rgba(255,180,59,0.5), 0 4px 30px rgba(0,0,0,0.8); }
}
.bottom-ui {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 2rem;
    opacity: 0; transform: translateY(15px);
    transition: opacity 1s ease 0.8s, transform 1s ease 0.8s;
}
.bottom-ui.show { opacity: 1; transform: translateY(0); }

.menu { display: flex; flex-direction: column; }
.gta-btn {
    font-family: var(--display);
    display: block; color: #fff; background: none; border: none;
    font-size: 1.9rem; text-align: left;
    margin-bottom: 6px; border-left: 5px solid transparent; padding: 2px 18px;
    width: fit-content; letter-spacing: 0.04em;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
    transition: 0.15s;
    text-decoration: none;
}
.gta-btn:hover {
    border-left: 5px solid var(--accent);
    background: rgba(255,180,59,0.10);
    color: var(--accent);
    transform: translateX(4px);
}
.gta-btn.ghost { color: rgba(255,255,255,0.5); font-size: 1.2rem; }

/* GTA V-style loader — bottom-right corner, like joining GTA Online */
.gtav-loader {
    position: absolute; right: 2.2rem; bottom: 2rem; z-index: 5;
    display: flex; align-items: center; gap: 0.9rem;
    opacity: 0; transition: opacity 0.8s ease 1.4s;
    pointer-events: none;
}
.bottom-ui.show ~ .gtav-loader { opacity: 1; }

.gtav-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    position: relative; display: inline-block;
    background: conic-gradient(from 0deg, transparent 0%, transparent 35%, var(--accent) 65%, var(--accent) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    animation: gtav-spin 0.9s linear infinite;
}
@keyframes gtav-spin { to { transform: rotate(360deg); } }

.gtav-text {
    font-family: var(--display);
    font-size: 1.15rem; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}
.gtav-text::after { content: ""; animation: gtav-dots 1.4s steps(4, end) infinite; }
@keyframes gtav-dots {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
    100% { content: ""; }
}

/* floating embers */
.embers { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.ember {
    position: absolute; bottom: -10px;
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { opacity: 0; transform: translateY(0) translateX(0); }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-100vh) translateX(var(--drift, 20px)); }
}

/* audio toggle */
.audio-toggle {
    position: absolute; top: 1.5rem; right: 1.5rem; z-index: 6;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,180,59,0.3);
    color: var(--accent); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
    transition: 0.2s;
}
.audio-toggle:hover { background: rgba(255,180,59,0.15); transform: scale(1.08); }
.audio-toggle.muted { color: rgba(255,255,255,0.4); }

@media (max-width: 700px) {
    .ui-layer { padding: 1.25rem; }
    .bottom-ui { flex-direction: column; align-items: flex-start; }
    .gta-btn { font-size: 1.4rem; }
}
