:root {
    --bg: rgba(60, 45, 40);
    --text: rgba(160, 120, 100);
    --card: white;
    --pad-big: 30px;
    --pad-small: 15px;
}

* {
    box-sizing: border-box;
}

body {
    margin: auto;
    padding: var(--pad-small);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    text-align: center;
}

.container {
    max-width: 900px;
    margin: auto;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 1px;
    margin-bottom: var(--pad-big);
    flex-wrap: wrap;
}

.top-nav a {
    padding: var(--pad-small);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition: all 0.4s ease;
}

.top-nav a:hover {
    background: var(--text);
    color: var(--card);
}

.header {
    padding: var(--pad-small);
}

.video-card {
    background: var(--card);
    padding: var(--pad-small);
    margin: var(--pad-small) auto;
}

.game-container {
    display: flex;
    gap: 2px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.game-main {
    flex: 3;
    background: var(--card);
    padding: 5px;
    border-radius: 2px;
}

.game-sidebar {
    flex: 1.8;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.location-display {
    background: var(--card);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.location-display img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 5px;
}

.current-location {
    color: white;
    font-weight: bold;
    margin: 10px 0;
    padding: 10px;
    background: var(--text);
    border-radius: 4px;
}

.stats-display {
    background: var(--card);
    padding: 15px;
    border-radius: 8px;
}

.health-bar {
    background: #ddd;
    border-radius: 2px;
    height: 20px;
    width: 100%;
    margin: 10px 0;
}

.health-bar-fill {
    height: 20px;
    border: 20px;
    width: 100%;
    background: green;
    transition: width 0.4s ease, background 0, 4s ease;
}

.inventory-display {
    background: var(--card);
    padding: 5px 10px;
    border-radius: 2px;
    max-height: 150px;
    overflow-y: auto;
}

.inventory-item {
    padding: 3px 6px;
    margin: 1px 0;
    border-radius: 2px;
    font-size: 1.1em;
}

.inventory-item.reusable {
    color: green;
    font-weight: bold;
}

.inventory-item.consumed {
    color: red;
    text-decoration: line-through;
}

.game-text {
    background: var(--bg);
    color: var(--text);
    padding: 5px;
    border-radius: 2px;
    min-height: 550px;
    max-height: 550px;
    overflow-y: auto;
    margin-bottom: 15px;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;

}

.action-btn {
    padding: 10px 15px;
    background: var(--text);
    color: var(--card);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.4s ease;

}

.action-btn:hover:not(:disabled) {
    background: var(--bg);
    transform: translateY(-4px);
}

.action-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 1;
}

.combat-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.combat-content {
    background-color: var(--card);
    margin: 10% auto;
    padding: 10px;
    border-radius: 4px;
    width: 70%;
    max-width: 400px;
    text-align: center;
    color: var(--text);
}

.combat-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.combat-btn {
    padding: 10px 15px;
    background: var(--text);
    color: var(--card);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.4s ease;

}

.combat-btn:hover {
    background: var(--bg);
    transform: scale(1.05);
}

.flee-btn {
    background: #d32f2f;
    margin-top: 10px;
}

.flee-btn:hover {
    background: #b71c1c;
}

.lectern-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.lectern-content {
    background-color: var(--card);
    margin: 5% auto;
    padding: 20px;
    border-radius: 4px;
    width: 60%;
    max-width: 400px;
    text-align: center;
    color: var(--text);
}

.spell-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;

}

.spell-btn {
    padding: 10px 15px;
    background: var(--text);
    color: var(--card);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.4s ease;

}

.spell-btn:hover {
    background: var(--bg);
    transform: translateX(5px);
}

.close-btn {
    background: #666;
    margin-top: 10px;
}

.close-btn:hover {
    background: 444;
}


.opening-scene {
    text-align: center;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;

}

.opening-scene h2 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 2.7em;

}

.typewriter {
    font-size: 1.5em;
    line-height: 2;
    text-align: left;
    white-space: pre-line;
    margin: 20px 0;
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
}

.skip-button,
.play-button {
    padding: 10px 20px;
    background: var(--text);
    color: var(--card);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.4s ease;

}

.skip-button:hover,
.play-button:hover {
    background: var(--bg);
    transform: scale(1.05);

}

.ending-scene {
    text-align: center;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;


}

.ending-scene h2 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 2.7em;


}

.ending-typewriter {
    font-size: 1.5em;
    line-height: 2.1;
    text-align: left;
    white-space: pre-line;
    margin: 20px 0;
    min-height: 300px;
}

.restart-button {
    padding: 10px 20px;
    background: var(--text);
    color: var(--card);
    border: none;
    cursor: pointer;
    border-radius: 2px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.4s ease;
    margin-top: 10px;

}

.restart-button:hover {
    background: var(--bg);
    transform: scale(1.05);

}


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    background: var(--bg);
    padding: 5px;
    border-radius: 1px;
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 1px;
    margin-bottom: 1px;
}

.gallery-item h3 {
    color: var(--text);
    margin: 10px auto;
}

.gallery-item p {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 0.9em;
}

