:root {
    --text: #f1f1f0;
    --background: #150E10;
    /* Updated background color */
    --primary: #77888C;
    /* Updated primary color */
    --secondary: #5f5845;
    --accent: #a69a78;
}

@font-face {
    font-family: 'Chivo';
    src: url('./assets/fonts/chivo/Chivo-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HeinzHeinrich';
    src: url('./assets/fonts/heinzheinrich/HeinzHeinrich-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'dungeon-mode';
    src: url('./assets/fonts/dungeon-mode/dungeon-mode.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'dungeon-mode-inverted';
    src: url('./assets/fonts/dungeon-mode/dungeon-mode-inverted.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pixeled English Font';
    src: url('./assets/fonts/pixeled-english/Pixeled English Font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Chivo is now loaded from Google Fonts in the HTML head */


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

html,
body {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    color: rgba(255, 255, 255, 0.87);
    background-color: #150E10;
    /* Changed to our main background color */
    margin: 0;
    padding: 0;
}

#app {
    width: 100vw;
    height: var(--app-height, 100dvh);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    background-color: #150E10;
    /* Added background color */
}

#game-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background-color: #150E10;
    /* Added background color */
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container canvas {
    display: block;
    margin: 0 auto;
}

/*
 * Global fatal-error boundary banner. A top strip rather than a modal: the
 * game may still be playable, so it never covers the canvas permanently.
 */
.bathala-error-banner {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    width: min(960px, calc(100vw - 32px));
    padding: 14px 18px;
    border: 2px solid #77888C;
    background: rgba(21, 14, 16, 0.96);
    color: #f1f1f0;
    font-family: 'dungeon-mode', Chivo, Arial, sans-serif;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.bathala-error-banner__text {
    flex: 1 1 320px;
    min-width: 0;
}

.bathala-error-banner__message {
    font-size: 1.05rem;
    line-height: 1.35;
}

.bathala-error-banner__detail {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #dfe6ea;
    opacity: 0.85;
    overflow-wrap: anywhere;
}

.bathala-error-banner__actions {
    display: flex;
    gap: 10px;
}

.bathala-error-banner__button {
    padding: 10px 16px;
    border: 2px solid #77888C;
    background: rgba(119, 136, 140, 0.16);
    color: #f1f1f0;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.bathala-error-banner__button--primary {
    background: rgba(119, 136, 140, 0.4);
}

.bathala-error-banner__button:hover,
.bathala-error-banner__button:focus-visible {
    background: rgba(119, 136, 140, 0.55);
    outline: 2px solid #f1f1f0;
    outline-offset: 2px;
}