:root {
    --primary: #ff0080;
    --secondary: #00dfd8;
    --bg: #0f172a;
    --text: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* Empêche la sélection de texte partout (style jeu) */
}

body {
    font-family: 'Courier New', monospace; /* Style rétro global */
    background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- ARCADE MENU (HUB) --- */
#app-interface {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.logo-container {
    display: flex;
    gap: 20px;
    margin-bottom: 3rem;
    transform-style: preserve-3d;
}

.big-number {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
}

.big-six {
    background: linear-gradient(135deg, var(--primary), #7928ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(121, 40, 202, 0.5));
}

.big-seven {
    background: linear-gradient(135deg, #0070f3, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(0, 112, 243, 0.5));
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 80%;
    max-width: 1000px;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--secondary);
    background: rgba(0, 223, 216, 0.1);
    box-shadow: 0 0 30px rgba(0, 223, 216, 0.3);
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.game-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* --- GAME CONTAINER (Où les jeux sont injectés) --- */
#game-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 100;
    display: none; /* Caché par défaut */
}

/* Bouton Quitter Global */
#global-quit-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 0, 0, 0.3);
    border: 1px solid red;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    font-weight: bold;
    display: none;
}

#global-quit-btn:hover {
    background: red;
}

/* --- SPECIFIC: PONG --- */
.pong-layer {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(15, 23, 42, 0.95);
}

.pong-paddle {
    position: absolute;
    width: 20px;
    height: 100px;
    background: white;
    border-radius: 10px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.pong-paddle.p6 { background: var(--primary); box-shadow: 0 0 20px var(--primary); }
.pong-paddle.p7 { background: var(--secondary); box-shadow: 0 0 20px var(--secondary); }

.pong-ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #fff;
}

.pong-score {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    font-size: 5rem;
    font-weight: bold;
    color: rgba(255,255,255,0.1);
    pointer-events: none;
}

/* --- SPECIFIC: DOOM ARCADE --- */
.doom-arcade-layer {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(circle, #3a0000 0%, #000 100%);
    cursor: crosshair;
}

.doom-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: red;
    font-family: 'Impact', sans-serif;
}

.doom-enemy {
    position: absolute;
    font-size: 5rem;
    color: var(--secondary);
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

/* --- SPECIFIC: RAYCASTER --- */
.raycaster-canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}