/* Interactive Mode - The "Dark Room" */

:root {
    --color-game-bg: #111111;
    --color-game-text: #ffffff;
    --color-game-check: #00ff88;
    /* Success Green */
    --color-game-mid: #ffcc00;
    /* Warning Yellow */
    --color-game-bad: #ff3333;
    /* Error Red */
    --color-guide: rgba(255, 255, 255, 0.1);

    /* Academic Style from Ref/ref_1.png */
    --color-guide-line: #666;
    --color-guide-label: #ff00ff;
    /* Magenta/Pink */
}

body.interactive-mode {
    background-color: var(--color-game-bg);
    color: var(--color-game-text);
    overflow: hidden;
    /* No scrolling in game mode */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.game-stage {
    width: 100vw;
    height: 100vh;
    max-width: none;
    position: relative;
    border: none;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Typography in Game */
.game-letter {
    font-family: var(--font-display);
    font-size: 300px;
    color: #333;
    /* Dimmed base letter */
    position: relative;
    user-select: none;
    pointer-events: none;
    /* Base letter is static */
    top: 60px;
    /* Measured offset to align with Optical Baseline */
    line-height: 1;
}

.game-diacritic {
    font-family: var(--font-display);
    font-size: 300px;
    color: var(--color-game-text);
    position: absolute;
    top: 50px;
    left: 50px;
    cursor: grab;
    z-index: 10;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.game-diacritic.phantom {
    opacity: 0;
    /* Hidden by default, JS toggles it */
    color: #0099ff;
    /* Kern Type Blue approx */
    /* border: 1px dashed rgba(0, 153, 255, 0.5); removed border for cleaner look */
    pointer-events: none;
    z-index: 5;
    text-shadow: none;
    transition: opacity 0.3s ease;
}

.error-line {
    position: absolute;
    height: 2px;
    background-color: var(--color-game-bad);
    transform-origin: left center;
    z-index: 8;
    pointer-events: none;
}

/* Horizontal Metrics */
.guide-horizontal {
    width: 100%;
    height: 1px;
    background-color: var(--color-guide-line);
    left: 0;
    position: absolute;
    /* Force absolute */
}

.guide-horizontal::after {
    content: attr(data-label);
    position: absolute;
    right: 100%;
    /* Anchor to the left edge of the line */
    margin-right: 15px;
    /* Spacing from the line */
    top: -5px;
    /* Vertically align with the line */
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--color-guide-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

/* Specific Line Positions (Relative to container) */
/* MEASURED METRICS at 300px 'Outfit':
   - Baseline: 320px (Our fixed reference)
   - X-Height: 144px (from baseline) -> Top: 320 - 144 = 176px
   - Cap-Height: 210px (from baseline) -> Top: 320 - 210 = 110px
*/
.guide-cap-height {
    top: 110px;
}

.guide-x-height {
    top: 176px;
}

.guide-baseline {
    top: 320px;
}

/* Center Axis */
.guide-center {
    position: absolute;
    /* Force absolute */
    left: 50%;
    height: 100%;
    width: 1px;
    border-left: 1px dashed var(--color-guide-label);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* UI Overlay */
.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: var(--font-body);
    z-index: 100;
}

.score-board {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 30px;
    border-radius: 20px;
    border: 1px solid #333;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.score-board.active {
    opacity: 1;
}

.score-value {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.score-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}