:root {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --primary-color: #8b0000; /* Dark Red */
    --secondary-color: #2c2c2c;
    --accent-color: #d32f2f;
    --success-color: #388e3c;
    --font-family: 'Courier New', Courier, monospace;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    user-select: none;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-switch button {
    background: var(--secondary-color);
    color: white;
    border: 1px solid #555;
    padding: 5px 10px;
    cursor: pointer;
}

/* Menu */
h1 {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 50px;
    letter-spacing: 5px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

button {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid #444;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    min-width: 200px;
}

button:hover {
    background: var(--primary-color);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* Game Layout */
#game {
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    background: radial-gradient(circle, #2a2a2a 0%, #111 100%);
}

.player-area {
    width: 100%;
    height: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

.player-info {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hp-bar {
    font-size: 2rem;
    letter-spacing: 5px;
}

.items-bar {
    display: flex;
    gap: 10px;
    height: 50px;
    align-items: center;
}

.item-btn {
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
    padding: 5px;
    transition: transform 0.2s;
}

.item-btn:hover {
    transform: scale(1.2);
    border-color: #555;
}

.status-indicators {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
}

.table-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
}

.gun {
    font-size: 8rem;
    transition: transform 0.1s;
    cursor: pointer;
}

.gun:hover {
    transform: rotate(-10deg);
}

.gun.shooting {
    animation: recoil 0.2s;
}

@keyframes recoil {
    0% { transform: scale(1); }
    50% { transform: scale(0.9) rotate(10deg); }
    100% { transform: scale(1); }
}

#gun-controls {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.hidden {
    display: none !important;
}

.info-center {
    position: absolute;
    top: 10px;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border: 1px solid #444;
}

#turn-indicator {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 5px;
}

.game-logs {
    position: absolute;
    left: 20px;
    bottom: 25%; /* Above player area */
    width: 300px;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.8);
    border: 1px solid #444;
    padding: 10px;
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    flex-direction: column-reverse; /* Newest at bottom visually if standard, but here flex-col-rev puts bottom element at top? No. */
}

.log-entry {
    margin-bottom: 5px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 200; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
}

.modal-content {
    background-color: var(--secondary-color);
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px;
    color: white;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

/* Animations */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake {
    animation: shake 0.5s;
}
