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

:root {
    --primary-color: #1a4d8f;
    --secondary-color: #d4a574;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --accent: #e8573c;
    --text: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../assets/troder-hall.jpg') center/cover no-repeat fixed;
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

/* Landing Screen */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.screen.active {
    display: flex;
}

#landingScreen {
    background: url('../assets/troder-hall.jpg') center/cover no-repeat fixed;
}

.landing-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.landing-content {
    background: white;
    border-radius: 20px;
    padding: 60px 80px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.ra-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 30px;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
}

.landing-content h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.description {
    font-size: 1.1em;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 40px;
}

.password-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.password-input {
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0d2a5c);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 77, 143, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    color: var(--accent);
    font-size: 0.95em;
    height: 20px;
    display: flex;
    align-items: center;
}

.hint {
    font-size: 0.9em;
    color: #999;
    margin-top: 20px;
}

/* Game Screen */
#gameScreen {
    background: #000;
}

.game-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

#gameCanvas {
    flex: 1;
    display: block;
    /* Match outside-wall background; carpet is drawn per hallway rect */
    background: #f5f2e9;
}

/* HUD */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}

.location-display {
    font-weight: 600;
    font-size: 1.3em;
}

.controls-hint {
    font-size: 0.9em;
    opacity: 0.8;
    text-align: right;
}

.controls-hint p {
    margin: 0;
}

/* Dialogue Box */
.dialogue-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 30px;
    border-top: 3px solid var(--secondary-color);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    font-size: 1.1em;
    line-height: 1.6;
}

.dialogue-box.hidden {
    display: none;
}

.dialogue-content {
    max-width: 1200px;
    margin: 0 auto;
}

.dialogue-text {
    margin-bottom: 20px;
    min-height: 40px;
}

.dialogue-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.choice-button {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    text-align: left;
    transition: all 0.2s;
}

.choice-button:hover {
    background: #0d2a5c;
    transform: translateX(10px);
}

.dialogue-continue {
    font-size: 0.9em;
    opacity: 0.7;
    margin: 0;
}

/* Interaction Prompt */
.interaction-prompt {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 50;
    animation: pulse 1s infinite;
}

.interaction-prompt.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .landing-content {
        padding: 40px 30px;
    }

    .landing-content h1 {
        font-size: 2em;
    }

    .hud {
        flex-direction: column;
        gap: 10px;
    }

    .dialogue-box {
        font-size: 1em;
    }
}
