@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Roboto:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 1280px;
    height: 720px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    background-color: #000;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score-board {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 50px;
    font-family: 'Black Ops One', cursive;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.score-box .label {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 5px;
}

.score-box span[id^="score"] {
    font-size: 48px;
    color: #fff;
}

.timer-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#timer {
    font-size: 48px;
    color: #ffcc00;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

h1 {
    font-family: 'Black Ops One', cursive;
    font-size: 80px;
    margin: 0 0 20px 0;
    color: #ffcc00;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

p {
    font-size: 24px;
    color: #ccc;
}

.controls {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    text-align: left;
}

.control-group h3 {
    color: #ffcc00;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 5px;
}

button {
    background: #ffcc00;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 24px;
    font-family: 'Black Ops One', cursive;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.1s, background 0.2s;
}

button:hover {
    background: #ffdb4d;
    transform: scale(1.05);
}

/* Setup Screen Styles */
.setup-section {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.setup-section h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-size: 24px;
}

.options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.opt-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.opt-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.opt-btn.selected {
    background: #ffcc00;
    color: black;
    border-color: #ffcc00;
    font-weight: bold;
}

.char-selection-container {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
}

.char-item {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.char-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.char-item:hover {
    transform: scale(1.1);
}

.char-item.selected {
    border-color: #ffcc00;
    box-shadow: 0 0 10px #ffcc00;
}

.start-btn {
    margin-top: 30px;
    background: #4CAF50;
    /* Green for start */
    color: white;
}

.start-btn:hover {
    background: #45a049;
}

/* Hide original start screen elements if any remain */
#start-screen {
    display: none;
}