* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #111;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

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

.hidden {
    display: none !important;
}

.card {
    background-color: #222;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    text-align: center;
    max-width: 450px;
    width: 100%;
}

h1, h2 {
    color: #4CAF50;
    margin-bottom: 15px;
}

h3 {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 5px;
    text-align: left;
}

.custom-section {
    margin-bottom: 12px;
    text-align: left;
}

.palette {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 3px;
    background: #151515;
    padding: 5px;
    border-radius: 4px;
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 2px;
}

.color-swatch.selected {
    border-color: #fff;
    transform: scale(1.1);
}

select, input[type="text"], button {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 0.95rem;
}

button {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

button:hover {
    background-color: #45a049;
}

.secondary-btn {
    background-color: #2196F3;
}
.secondary-btn:hover {
    background-color: #0b7dda;
}

#my-id {
    font-weight: bold;
    color: #FFD700;
    font-size: 1rem;
    user-select: all;
    background: #111;
    padding: 8px;
    border-radius: 4px;
}

#status-message {
    color: #888;
    font-style: italic;
    font-size: 0.85rem;
    margin-top: 10px;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #101714;
}

/* Canvas WebGL em tela cheia para a arena 3D. */
canvas {
    display: block;
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: #101714;
    outline: none;
}

#ui-overlay {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1rem;
    background: rgba(0,0,0,0.8);
    padding: 10px 20px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid #333;
    gap: 18px;
    flex-wrap: wrap;
    gap: 18px;
    flex-wrap: wrap;
}

#cooldown-indicator {
    color: #00ffff;
}

.css-explosion {
    position: absolute;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: #ff5722;
    border-radius: 50%;
    animation: explode 0.6s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        background-color: #ffeb3b;
    }
    50% {
        background-color: #ff5722;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
        background-color: #f44336;
    }
}