body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

#container {
    width: 100vw;
    height: 100vh;
}

#title-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    cursor: pointer;
}

#main-title {
    position: relative; /* Needed for the absolute positioning of the overlay */
    font-size: 5vw;
    min-font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    background-image: url('title_text_texture.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* This will be overridden by JS for end game */
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 5px rgba(0,0,0,0.5);
}

.countdown-fade-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    background-image: url('a_black_texture.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0;
    transition: opacity 60s linear; /* Match countdown duration */
    pointer-events: none;
}

#blocker {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#instructions {
    font-size: 20px;
    line-height: 1.5;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    text-shadow: 1px 1px 2px black;
    pointer-events: none; 
}

#current-block-display {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none; 
}

#health-bar {
    position: absolute;
    bottom: 60px; 
    left: 20px;
    display: flex;
    pointer-events: none;
}

.heart-icon {
    width: 24px; 
    height: 24px;
    margin-right: 2px;
    image-rendering: pixelated; 
}

#stamina-bar-container {
    position: absolute;
    bottom: 90px; /* Above health bar */
    left: 20px;
    width: 184px; /* Roughly 9 hearts wide */
    height: 15px;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid #555;
    border-radius: 3px;
    padding: 1px;
    box-sizing: border-box;
    pointer-events: none;
    display: none; /* Initially hidden */
}

#stamina-bar {
    width: 100%;
    height: 100%;
    background-color: #f0e68c; /* Khaki / yellow */
    border-radius: 2px;
    transition: width 0.1s linear;
}

#hotbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: rgba(0,0,0,0.5);
    padding: 5px;
    border-radius: 5px;
    pointer-events: none; 
}

.hotbar-slot {
    width: 40px;
    height: 40px;
    border: 2px solid #555;
    margin: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,0.1);
    image-rendering: pixelated; 
}

.hotbar-slot.active {
    border-color: #fff;
    box-shadow: 0 0 10px #fff;
}

.hotbar-slot img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

#side-hotbar {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    background-color: rgba(0,0,0,0.5);
    padding: 5px;
    border-radius: 5px;
    pointer-events: none;
}

.side-hotbar-slot {
    width: 40px;
    height: 40px;
    border: 2px solid #555;
    margin: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,0.1);
    image-rendering: pixelated;
}

.side-hotbar-slot.active {
    border-color: #fff;
    box-shadow: 0 0 10px #fff;
}

.side-hotbar-slot img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

#chat-container {
    position: absolute;
    bottom: 110px; /* Above hotbar and current block display */
    left: 20px;
    width: 350px;
    max-width: 40%;
    height: 200px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
    display: none; /* Initially hidden */
    flex-direction: column;
    z-index: 20; /* Above other UI elements except maybe title screen */
}

#seromnik-chat-container {
    position: absolute;
    bottom: 320px; /* Above Sonova's chat */
    left: 20px;
    width: 350px;
    max-width: 40%;
    height: 200px;
    background-color: rgba(10,0,20,0.7); /* Slightly different color */
    border: 1px solid #4A004A;
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
    display: none; /* Initially hidden */
    flex-direction: column;
    z-index: 20;
}

#brandon-chat-container {
    position: absolute;
    bottom: 530px; /* Above Seromnik's chat */
    left: 20px;
    width: 350px;
    max-width: 40%;
    height: 200px;
    background-color: rgba(0, 20, 30, 0.7); /* Teal/blue color */
    border: 1px solid #00aabb;
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
    display: none; /* Initially hidden */
    flex-direction: column;
    z-index: 20;
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#seromnik-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#brandon-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#chat-messages div {
    margin-bottom: 5px;
    word-wrap: break-word;
}

#seromnik-chat-messages div {
    margin-bottom: 5px;
    word-wrap: break-word;
}

#brandon-chat-messages div {
    margin-bottom: 5px;
    word-wrap: break-word;
}

#chat-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
}

#seromnik-chat-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
}

#brandon-chat-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
}

#chat-input:focus {
    outline: none;
    border-color: #888;
}

#seromnik-chat-input:focus {
    outline: none;
    border-color: #967bb6; /* Amethyst color for focus */
}

#brandon-chat-input:focus {
    outline: none;
    border-color: #00aabb; /* Teal color for focus */
}

#countdown-timer {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 2px 2px 4px #000;
    display: none; /* Initially hidden */
    z-index: 100;
}

/* Ascension overlay for HELIOS command */
#ascend-overlay {
    pointer-events: none;
}
#ascend-message {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}