:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #03dac6;
    --cell-bg: #1e1e1e;
    --cell-hover: #333;
    --code-bg: #2d2d2d;
    --font-family: 'Outfit', sans-serif;
    --font-mono: 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.back-btn {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
}

h1 {
    font-size: 2rem;
    margin: 0;
}

.stats {
    font-size: 1.2rem;
    display: flex;
    gap: 1rem;
}

.mission-panel {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid #444;
}

.code-block {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    background-color: #000;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: inline-block;
}

.type {
    color: #569cd6;
}

.var {
    color: #9cdcfe;
}

.address {
    color: #ce9178;
}

.keyword {
    color: #c586c0;
}

.hint {
    color: #888;
    font-size: 0.9rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
}

.memory-cell {
    background-color: var(--cell-bg);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.memory-cell:hover {
    background-color: var(--cell-hover);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.cell-addr {
    font-family: var(--font-mono);
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.cell-val {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--accent-color);
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.modal-content button {
    margin-top: 1rem;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}