/* css/style.css */
:root {
  --bg-main: #050816;
  --bg-secondary: #0b1020;
  --accent-green: #4dffb5;
  --accent-red: #ff4d7a;
  --accent-purple: #a855f7;
  --accent-cyan: #22d3ee;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-radius: 20px;
  --shadow-neon-green: 0 0 12px rgba(77,255,181,0.8),0 0 24px rgba(77,255,181,0.6);
  --shadow-neon-red: 0 0 12px rgba(255,77,122,0.8),0 0 24px rgba(255,77,122,0.6);
  --shadow-neon-purple: 0 0 10px rgba(168,85,247,0.8),0 0 15px rgba(168,85,247,0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   SCALING
   ========================= */

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
    background: var(--bg-main);
}

/* centre le "téléphone virtuel" */
#viewport {
    position: fixed;
    inset: 0;
    padding: 8px 5px 0px 5px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px 5px 0px 5px;
}

/* la scène fixe 480x900 (scalée par JS) */
#stage {
    width: 480px;
    height: 900px;
    transform-origin: top center;
    position: relative;
    flex: 0 0 auto;
}

@media screen and (max-width: 500px) {
    #stage {
        overflow: hidden;
    }
}

#overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(15,23,42,0.92), rgba(15,23,42,0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

    #overlay.hidden {
        display: none;
    }

.overlay-content {
    background: rgba(15,23,42,0.95);
    border-radius: 24px;
    padding: 20px 18px;
    text-align: center;
    border: 1px solid rgba(129,140,248,0.8);
    box-shadow: var(--shadow-neon-purple);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-right: 15px;
    margin-left: 15px;
}

.overlay-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 0 16px rgba(168,85,247,0.9);
}

.overlay-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: normal;
}

.overlay-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; /* empêche le retour à la ligne */
}

.primary-button {
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    background: radial-gradient(circle at top, #4f46e5, #a855f7);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-neon-purple);
    -webkit-tap-highlight-color: transparent;
}

    .primary-button:active {
        transform: translateY(1px) scale(0.98);
        box-shadow: 0 0 18px rgba(129,140,248,0.9);
    }

#orientation-warning {
    position: fixed;
    inset: 0;
    background: #020617;
    color: var(--text-main);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    z-index: 999;
}

@media (orientation: landscape) and (max-width: 900px) {
    #orientation-warning {
        display: flex;
    }
}