* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #222;
    color: #eee;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    display: flex;
    height: 100%;
}

#game-area {
    flex: 1;
    position: relative;
    background-color: #333;
    cursor: crosshair;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

#visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.2s, background-color 0.2s;
}

#click-blocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.1);
    z-index: 20;
    cursor: not-allowed;
}

/* Visual Effects Classes */
.effect-glitch {
    animation: glitch-anim 0.2s infinite;
    background: rgba(0, 255, 0, 0.1);
    transform: translate(2px, -2px);
}

.effect-sun {
    background-color: white !important;
    opacity: 0.95 !important;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, 5px); }
    80% { transform: translate(5px, -5px); }
    100% { transform: translate(0); }
}

#ui-sidebar {
    width: 350px;
    background-color: #1a1a1a;
    padding: 20px;
    overflow-y: auto;
    border-left: 2px solid #444;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffd700;
    text-align: center;
}

h2 {
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.section {
    margin-bottom: 25px;
}

.stats p {
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #4a4a4a;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #5a5a5a;
}

button:active {
    background-color: #3a3a3a;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#enemy-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.enemy-btn {
    text-align: left;
    background-color: #2c2c2c;
    border: 1px solid #444;
    padding: 8px;
}

.enemy-btn.active {
    background-color: #0055aa;
    border-color: #0077ff;
}

.enemy-btn small {
    display: block;
    color: #aaa;
    font-size: 0.8em;
}

/* Floating Text for Damage */
.floating-text {
    position: absolute;
    pointer-events: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 1px 1px 0 #000;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-50px); }
}
