/* ============================================
   GAME SCREEN STYLES
   ============================================ */

#game-screen {
    display: none;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-base);
}

#game-screen.active {
    display: flex;
}

/* Game Header */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.game-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.game-progress span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.game-score {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.game-score i {
    color: var(--warning);
}

/* Game Scene */
.game-scene {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.scene-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

/* Scene Backgrounds (CSS-based placeholders) */
.scene-bg-entrance {
    background: linear-gradient(180deg, #87CEEB 0%, #E0E5EC 60%, #808080 60%, #606060 100%);
}

.scene-bg-office {
    background: linear-gradient(180deg, #F5F5F0 0%, #E8E4DE 100%);
}

.scene-bg-meeting {
    background: linear-gradient(180deg, #F5F5F0 0%, #E0E5EC 100%);
}

.scene-bg-corridor {
    background: linear-gradient(180deg, #D0CBC4 0%, #B0ABA4 100%);
}

.scene-bg-cafeteria {
    background: linear-gradient(180deg, #FFF8E7 0%, #FFE4B5 100%);
}

.scene-bg-parking {
    background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 50%, #333333 50%, #333333 100%);
}

.scene-bg-elevator {
    background: linear-gradient(180deg, #C0C0C0 0%, #A0A0A0 100%);
}

.scene-bg-breakroom {
    background: linear-gradient(180deg, #E8E4DE 0%, #D0CBC4 100%);
}

/* Scene Labels */
.scene-label {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    z-index: 10;
}

.character-status {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 10;
    transition: background 0.3s ease;
}

.character-status.moving {
    background: var(--secondary);
}

.character-status.reached {
    background: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: blink 1s infinite;
}

.character-status.moving .status-dot,
.character-status.reached .status-dot {
    background: white;
    animation: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Character Layer */
.character-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.game-character {
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 120px;
    height: 180px;
    transition: left 2s ease-in-out, bottom 0.3s ease;
}

.game-character.moving {
    animation: walk 0.4s steps(2) infinite;
}

.game-character.reached {
    animation: celebrate 0.5s ease infinite;
}

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

@keyframes celebrate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(-5deg); }
    75% { transform: translateY(-15px) rotate(5deg); }
}

/* Transformation Layer */
.transformation-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.transformation {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.transformation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ramp Transformation */
.transformation-ramp {
    bottom: 20%;
    left: 40%;
    width: 200px;
    height: 80px;
    background: linear-gradient(135deg, #8B7355, #A08060);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
    border-radius: 4px;
}

.transformation-ramp::before,
.transformation-ramp::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 60px;
    background: #666;
    bottom: 10px;
}

.transformation-ramp::before { left: 10px; }
.transformation-ramp::after { right: 10px; }

/* Tactile Tiles Transformation */
.transformation-tactile {
    bottom: 18%;
    left: 10%;
    width: 60%;
    height: 30px;
    display: flex;
    gap: 5px;
}

.tactile-tile {
    width: 40px;
    height: 30px;
    background: #FFD700;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 5px;
}

.tactile-dot {
    width: 6px;
    height: 6px;
    background: #FFC000;
    border-radius: 50%;
}

/* Captions Transformation */
.transformation-captions {
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: #FFFF00;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    text-align: center;
    min-width: 300px;
}

/* Accessible Controls Transformation */
.transformation-controls {
    bottom: 30%;
    right: 20%;
    width: 60px;
    height: 100px;
    background: #333;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
}

.control-btn {
    width: 25px;
    height: 25px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* Quiet Zone Transformation */
.transformation-quiet {
    bottom: 15%;
    right: 10%;
    width: 150px;
    height: 200px;
    background: linear-gradient(180deg, rgba(107,91,149,0.8), rgba(107,91,149,0.6));
    border-radius: 50% 50% 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--spacing-lg);
}

.quiet-label {
    background: var(--secondary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-bottom: var(--spacing-md);
}

.quiet-seat {
    width: 80px;
    height: 40px;
    background: #9B8BC7;
    border-radius: var(--radius-md);
    margin-top: auto;
    margin-bottom: var(--spacing-lg);
}

/* Question Panel */
.question-panel {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 50;
    transition: transform 0.5s ease;
}

.question-panel.minimized {
    transform: translateX(-50%) translateY(calc(100% - 60px));
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.question-header h3 {
    font-size: 1rem;
}

.btn-audio {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-audio:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.scenario-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.question-text {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--spacing-lg);
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(92,158,173,0.05);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-btn.correct {
    border-color: var(--success);
    background: rgba(16,185,129,0.1);
}

.option-btn.incorrect {
    border-color: var(--error);
    background: rgba(239,68,68,0.1);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

.option-icon {
    margin-left: auto;
    font-size: 1.25rem;
}

.option-btn.correct .option-icon { color: var(--success); }
.option-btn.incorrect .option-icon { color: var(--error); }

/* Attempts Display */
.attempts-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.attempts-dots {
    display: flex;
    gap: var(--spacing-xs);
}

.attempts-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: background 0.3s;
}

.attempts-dots .dot.used {
    background: var(--warning);
}

.blocked-text {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.blocked-text.hidden {
    display: none;
}

/* Hint & Success Boxes */
.hint-box, .success-box {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hint-box {
    background: rgba(245,158,11,0.1);
    border: 1px solid var(--warning);
}

.hint-box i {
    color: var(--warning);
    font-size: 1.25rem;
}

.success-box {
    background: rgba(16,185,129,0.1);
    border: 1px solid var(--success);
}

.success-box i {
    color: var(--success);
    font-size: 1.25rem;
}

.hint-box strong, .success-box strong {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.hint-box p, .success-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Next Button Container */
.next-button-container {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
}

.next-button-container .btn {
    box-shadow: var(--shadow-xl);
}

/* Scene Elements (CSS Illustrations) */
.scene-element {
    position: absolute;
    pointer-events: none;
}

/* Building */
.element-building {
    bottom: 20%;
    right: 5%;
    width: 300px;
    height: 250px;
    background: #D4C4B0;
    border-radius: var(--radius-md);
}

.element-building::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 150px;
    background: rgba(135,206,235,0.5);
    border: 4px solid #4A4A4A;
}

/* Tree */
.element-tree {
    width: 80px;
    height: 150px;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 60px;
    background: #8B4513;
    border-radius: 4px;
}

.tree-foliage {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: #228B22;
    border-radius: 50%;
}

/* Desk */
.element-desk {
    width: 120px;
    height: 80px;
}

.desk-top {
    position: absolute;
    bottom: 40px;
    width: 100%;
    height: 8px;
    background: #8B4513;
}

.desk-monitor {
    position: absolute;
    bottom: 48px;
    left: 30%;
    width: 50px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 4px;
}

.desk-screen {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 8px;
    background: #4A90D9;
    border-radius: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .game-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .progress-bar {
        width: 120px;
    }
    
    .question-panel {
        max-height: 70vh;
        padding: var(--spacing-md);
    }
    
    .game-character {
        width: 80px;
        height: 120px;
    }
    
    .scene-label,
    .character-status {
        font-size: 0.75rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}
