:root {
    --bg-color: #000000;
    --accent-red: #ff2222;
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --glow-color: rgba(255, 34, 34, 0.4);
    --star-wars-yellow: #ffd700;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Interaction Shield */
#interaction-shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    cursor: pointer;
}

/* Background Elements */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: twinkle var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.3); }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, black 100%);
    z-index: 5;
    pointer-events: none;
}

/* Video Visions */
.vision-main {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 5s ease-in-out;
    filter: blur(45px) saturate(1.2);
    pointer-events: none;
    mask-image: radial-gradient(circle, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 80%);
}

.vision-main iframe {
    width: 100%;
    height: 100%;
    transform: scale(1.2);
}

.vision-portal {
    position: fixed;
    width: 600px;
    height: 360px;
    z-index: 15;
    opacity: 0;
    transition: opacity 3s ease-in-out, top 3s ease-in-out, left 3s ease-in-out;
    filter: blur(1px) saturate(1.4) brightness(0.9);
    pointer-events: none;
    border-radius: 15px;
    overflow: hidden;
    transform: scale(0.9);
    will-change: opacity, transform, top, left;
    box-shadow: 0 0 50px rgba(255, 34, 34, 0.15);
}

.vision-portal iframe {
    width: 100%;
    height: 100%;
    transform: scale(1.4);
}

.portal-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Sound Control */
#sound-control {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 34, 34, 0.3);
    border-radius: 50px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    user-select: none;
}

#sound-control:hover {
    background: rgba(255, 34, 34, 0.1);
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 34, 34, 0.2);
}

#sound-text {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-red);
}

/* Background Logo */
.content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.center-image {
    max-width: 650px;
    width: 80vw;
    height: auto;
    animation: float 10s ease-in-out infinite;
    opacity: 0.6;
    mask-image: radial-gradient(circle at center, black 0%, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, black 40%, transparent 85%);
}

.glow {
    position: absolute;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    animation: pulse-glow 8s ease-in-out infinite;
}

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

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* Star Wars Crawl */
.crawl-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    perspective: 500px;
    z-index: 20;
    pointer-events: none;
}

.crawl-content {
    position: relative;
    width: 65%;
    text-align: center;
    transform-origin: 50% 100%;
    transform: rotateX(25deg) translateY(110vh);
    animation: crawl 120s linear infinite;
}

@keyframes crawl {
    0% { transform: rotateX(25deg) translateY(110vh); opacity: 0; }
    1% { opacity: 1; }
    98% { opacity: 1; }
    100% { transform: rotateX(25deg) translateY(-400vh); opacity: 0; }
}

.crawl-content .title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--star-wars-yellow);
    margin-bottom: 3rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 6px;
    text-shadow: 0 0 15px rgba(0,0,0,1);
}

.crawl-content .subtitle {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--star-wars-yellow);
    margin-bottom: 4rem;
    line-height: 1.6;
    text-shadow: 0 0 15px rgba(0,0,0,1);
}

.loading-bar-container {
    width: 350px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: fixed;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-red);
    box-shadow: 0 0 30px var(--accent-red);
    animation: load 20s cubic-bezier(0.65, 0.05, 0.36, 1) 1s forwards;
}

@keyframes load {
    0% { width: 0%; }
    100% { width: 100%; }
}

.footer {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 25;
}

.crawl-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, var(--bg-color) 30%, transparent 100%);
    z-index: 3;
}

/* Responsive */
@media (max-width: 768px) {
    .crawl-content { width: 95%; }
    .crawl-content .title { font-size: 1.8rem; }
    .crawl-content .subtitle { font-size: 1.1rem; }
    .vision-portal { width: 90vw; height: 50vw; }
    #sound-control { top: 20px; right: 20px; padding: 8px 15px; }
}
