/* reality_warp.css */

/* Import a futuristic font if desired, e.g., from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a, #330033, #0a0a0a);
    color: #e0e0e0;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.main-interface-container {
    display: flex; /* Use flexbox to arrange the game screen and iframe */
    width: 95vw;
    height: 95vh;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(170, 0, 170, 0.8), 0 0 20px rgba(255, 0, 255, 0.6);
    position: relative;
    z-index: 10;
    animation: glitchEffect 1s infinite alternate;
    transform-style: preserve-3d;
    perspective: 1000px;
    padding: 20px; /* Add some padding around the content */
    gap: 20px; /* Space between the game screen and the iframe */
}

@keyframes glitchEffect {
    0% { transform: translate(0, 0); filter: hue-rotate(0deg); }
    20% { transform: translate(-2px, 2px); filter: hue-rotate(30deg); }
    40% { transform: translate(3px, -3px); filter: hue-rotate(60deg); }
    60% { transform: translate(-1px, 1px); filter: hue-rotate(90deg); }
    80% { transform: translate(2px, -2px); filter: hue-rotate(120deg); }
    100% { transform: translate(0, 0); filter: hue-rotate(150deg); }
}

.game-screen {
    flex: 1; /* Takes up one part of the available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    border-right: 2px dashed rgba(255, 0, 255, 0.3); /* Visual separator */
}

.dimension-frame {
    flex: 2; /* Takes up two parts of the available space, making it wider */
    background-color: #000; /* Black background for the iframe */
    border: 1px solid #00ffff; /* Cyan border for the iframe window */
    border-radius: 8px;
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.5), 0 0 30px rgba(0, 255, 255, 0.3);
    transition: all 0.5s ease-in-out;
}

h1 {
    font-size: 3.5em;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    margin-bottom: 30px;
    letter-spacing: 2px;
    animation: neonGlow 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 30px #ff00ff, 0 0 40px #ff00ff;
    }
    to {
        text-shadow: 0 0 5px #ff00ff, 0 0 15px #ff00ff, 0 0 25px #ff00ff, 0 0 35px #ff00ff, 0 0 45px #ff00ff, 0 0 55px #ff00ff;
    }
}

p {
    font-size: 1.2em;
    margin-bottom: 40px;
    line-height: 1.6;
    color: #bbbbbb;
}

.choices-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 50px;
    margin-bottom: 30px;
    position: relative;
    transform-style: preserve-3d;
}

.choice-portal {
    width: 150px;
    height: 150px;
    background-color: rgba(68, 0, 68, 0.9);
    border: 3px solid #00ffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    perspective: 800px;
}

.choice-portal:hover {
    transform: scale(1.15) rotateY(10deg);
    background-color: rgba(102, 0, 102, 1);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.6);
    border-color: #aaffff;
    z-index: 1;
}

.choice-portal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.choice-portal:hover::before {
    opacity: 1;
}

.choice-text {
    color: #e0e0e0;
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 0 0 8px #00ffff;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
}

.choice-number {
    color: #aaffff;
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
    position: relative;
    z-index: 2;
}

.current-path {
    margin-top: 40px;
    font-size: 1.1em;
    color: #999;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
}

#currentDimension {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 8px #00ffff;
}


/* Background animation - starfield/cosmic dust */
.background-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: transparent;
    overflow: hidden;
    z-index: 1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 5s infinite ease-in-out;
}

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

/* UI alteration based on current page/dimension - example */
/* Ensure these target .main-interface-container and its children */
body.dimension-05 .main-interface-container { border-color: yellow; animation: none; }
body.dimension-05 h1 { color: yellow; text-shadow: 0 0 10px yellow; }
body.dimension-13 .choice-portal { border-color: red; box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }

/* Add more specific dimension styling here or in the JS updateUIBasedOnDimension function */