:root {
    --grid-size: 3;
    --room-width: 450px;
    --cell-size: calc(var(--room-width) / var(--grid-size));
}

body {
    font-family: 'Courier New', monospace; /* Developer/Code style font */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #333; /* Dark, hacker-ish theme */
    color: #00ff00; /* Green terminal text */
}

#room-container {
    width: var(--room-width);
    height: var(--room-width);
    margin: 50px auto 20px;
    border: 5px solid #007bff; /* Blue frame */
    display: grid;
    /* 3x3 Grid layout */
    grid-template-columns: repeat(var(--grid-size), 1fr);
    grid-template-rows: repeat(var(--grid-size), 1fr);
    
    /* Place elements in specific grid areas (1-9) */
    /* 1 2 3 */
    /* 4 5 6 */
    /* 7 8 9 */
}

.cell {
    border: 1px solid #007bff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background-color: #222;
    transition: background-color 0.2s, transform 0.3s;
}

/* Initial Placement */
#door {
    grid-area: 1 / 3 / 2 / 4; /* Top Right (Cell 3) */
    background-color: #555;
    color: white;
}

#wall-clue {
    grid-area: 2 / 1 / 3 / 2; /* Middle Left (Cell 4) */
}

#hidden-console {
    grid-area: 3 / 2 / 4 / 3; /* Bottom Middle (Cell 8) */
    background-color: #111;
}

#grid-manipulator {
    grid-area: 1 / 1 / 2 / 2; /* Top Left (Cell 1) */
    background-color: #f1c40f; /* Yellow object */
    color: #333;
    font-weight: bold;
    z-index: 20;
}

/* --- Puzzle 1: Inspect Clue (Hidden Text) --- */
#wall-clue {
    position: relative;
    overflow: hidden;
}

/* The invisible clue */
#wall-clue::after {
    content: "Z-INDEX IS 1337"; /* This is the answer to the console puzzle */
    position: absolute;
    color: rgba(0, 0, 0, 0.001); /* Nearly transparent, requires dev tools to read */
    font-size: 0.1px; /* Tiny font */
    z-index: 5;
    background-color: #222; /* Same color as background */
    transform: rotate(180deg) scale(0); /* Rotated and shrunk for extra difficulty */
    transition: all 1s;
}

/* --- Puzzle 2: Hiding Clue (Console) --- */
#hidden-console {
    /* Clue: To reveal this, the user must change its CSS property */
    opacity: 0.1; /* Almost invisible */
    transform: translateY(100px); /* Pushed out of view */
    pointer-events: none; /* Cannot be clicked until revealed */
    transition: opacity 1s, transform 1s;
}

/* State to be activated by player's custom CSS injection */
.unlocked {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* --- Feedback Panel --- */
#feedback-panel {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #00ff00;
    width: 80%;
    max-width: var(--room-width);
    min-height: 50px;
}