/* Game Screen Styles - Debian Theme */

.game-screen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Game Header Bar */
.game-header-bar {
    background: var(--debian-red);
    color: white;
    padding: 12px 20px;
    margin: 0 -20px 20px -20px;
    border-bottom: 3px solid #A00042;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-title-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.game-stats-bar {
    display: flex;
    gap: 15px;
}

.stat-item {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border: 1px solid rgba(255,255,255,0.3);
}

.stat-value {
    font-weight: bold;
    font-size: 1.3rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Game Controls */
.game-controls {
    background: white;
    border: 2px solid var(--debian-border);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.game-controls label {
    font-weight: bold;
}

/* Game Content */
.game-content {
    background: white;
    border: 2px solid var(--debian-border);
    padding: 25px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

/* Memory Game Grid */
.memory-grid {
    display: grid;
    gap: 10px;
    margin: 20px auto;
}

.memory-grid.small { grid-template-columns: repeat(4, 1fr); max-width: 500px; }
.memory-grid.medium { grid-template-columns: repeat(4, 1fr); max-width: 600px; }
.memory-grid.large { grid-template-columns: repeat(6, 1fr); max-width: 800px; }

.memory-card {
    aspect-ratio: 1;
    background: #F0F0F0;
    border: 2px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    color: #666;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    transition: all 0.1s;
}

.memory-card:hover:not(.matched) {
    background: #E0E0E0;
    border-color: var(--debian-red);
}

.memory-card:active {
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    transform: translate(1px, 1px);
}

.memory-card.flipped {
    background: white;
    border-color: var(--debian-red);
    border-width: 3px;
}

.memory-card.matched {
    background: #E8F5E9;
    border-color: #4CAE4C;
    opacity: 0.7;
}

.memory-card svg {
    width: 48px;
    height: 48px;
    stroke: var(--debian-red);
}

.memory-card-text {
    font-size: 0.85rem;
    font-weight: bold;
    color: #000;
    padding: 0 5px;
    text-align: center;
}

/* Question Box */
.question-box {
    background: #F9F9F9;
    border: 2px solid #CCC;
    padding: 25px;
    margin-bottom: 20px;
}

.question-context {
    color: var(--debian-red);
    font-weight: bold;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.answer-input {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    border: 2px solid #999;
    background: white;
    text-align: center;
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);
}

.answer-input:focus {
    outline: none;
    border-color: var(--debian-red);
}

/* Feedback */
.feedback {
    padding: 12px;
    margin: 15px 0;
    border: 2px solid;
    font-weight: bold;
    text-align: center;
}

.feedback.correct {
    background: #E8F5E9;
    border-color: #4CAE4C;
    color: #2E7D32;
}

.feedback.incorrect {
    background: #FFEBEE;
    border-color: #F44336;
    color: #C62828;
}

/* Pattern Game */
.pattern-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.pattern-number {
    background: white;
    border: 3px solid #333;
    padding: 15px 20px;
    font-size: 2rem;
    font-weight: bold;
    min-width: 70px;
    text-align: center;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.pattern-number.unknown {
    border-color: var(--debian-red);
    color: var(--debian-red);
}

.pattern-arrow {
    font-size: 2rem;
    font-weight: bold;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Code Display */
.code-display {
    background: #2E3436;
    border: 3px solid #000;
    padding: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #D0D0D0;
    line-height: 1.6;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5);
}

.code-char.correct { color: #8AE234; }
.code-char.incorrect { color: #EF2929; background: rgba(239, 41, 41, 0.2); }
.code-char.pending { color: #888A85; }

.typing-input {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    border: 2px solid #999;
    background: white;
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);
}

.typing-input:focus {
    outline: none;
    border-color: var(--debian-red);
}

/* Code Snippet */
.code-snippet {
    background: #2E3436;
    border: 3px solid #000;
    padding: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #8AE234;
    overflow-x: auto;
    line-height: 1.6;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5);
}

.hint-box {
    background: #FFFACD;
    border: 2px solid #FFD700;
    padding: 12px;
    margin-bottom: 20px;
}

/* Algorithm Display */
.algorithm-display {
    background: #F9F9F9;
    border: 2px solid #CCC;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}

.algorithm-name {
    font-size: 1.6rem;
    font-weight: bold;
}

.complexity-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.complexity-btn {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Game Complete */
.game-complete {
    text-align: center;
    padding: 40px;
    background: white;
    border: 3px solid var(--debian-red);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
}

.game-complete h2 {
    color: var(--debian-red);
    font-size: 2rem;
    margin-bottom: 20px;
}

.complete-score {
    font-size: 4rem;
    font-weight: bold;
    color: var(--debian-red);
    margin: 20px 0;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .game-header-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .memory-grid.large {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .options-grid,
    .complexity-options {
        grid-template-columns: 1fr;
    }
}
