* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
}

#app {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.screen {
    display: none;
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.screen.active {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

h1 {
    font-size: 3em;
    text-align: center;
    color: #00ff00;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

h2 {
    font-size: 2em;
    text-align: center;
    color: #00ff00;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3 {
    font-size: 1.3em;
    color: #cccccc;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.subtitle {
    text-align: center;
    color: #888;
    font-size: 1.1em;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 300px;
    margin: 0 auto;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.1s ease;
    font-weight: 600;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    border-color: #00ff00;
    color: #00ff00;
}

.btn-primary:hover {
    background: #00ff00;
    color: #0a0a0a;
}

.btn-secondary {
    border-color: #666;
    color: #999;
}

.btn-secondary:hover {
    background: #333;
    color: #e0e0e0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid #333;
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff00;
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.1s;
}

.color-option:hover {
    border-color: #666;
}

.color-option.selected {
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.color-option.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.color-option.disabled:hover {
    border-color: transparent;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.button-group .btn {
    flex: 1;
}

.lobby-code {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 30px;
    padding: 15px;
    background: #0a0a0a;
    border: 2px solid #333;
}

.lobby-code strong {
    color: #00ff00;
    font-size: 1.5em;
    letter-spacing: 8px;
}

.players-list {
    margin-bottom: 30px;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #0a0a0a;
    border: 2px solid;
    border-left-width: 5px;
}

.player-color {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border: 1px solid #333;
}

.player-name {
    flex: 1;
    font-weight: 600;
    font-size: 1.1em;
}

.player-bot {
    color: #666;
    font-size: 0.9em;
}

.player-score {
    font-weight: bold;
    font-size: 1.2em;
    color: #00ff00;
}

.empty-slot {
    color: #555;
    font-style: italic;
    padding: 15px;
    text-align: center;
    background: #0a0a0a;
    border: 2px dashed #333;
    margin-bottom: 10px;
}

#gameScreen {
    padding: 20px;
    max-width: 840px;
}

.game-header {
    margin-bottom: 20px;
}

.score-board {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #0a0a0a;
    border: 2px solid #333;
    border-left-width: 5px;
}

.score-name {
    font-weight: 600;
}

.score-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #00ff00;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    background: #0a0a0a;
    border: 2px solid #333;
}

.game-controls {
    text-align: center;
    margin-top: 15px;
    color: #666;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.winner-text {
    text-align: center;
    font-size: 1.5em;
    color: #00ff00;
    margin: 30px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #ff0000;
    color: #ffffff;
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    display: none;
    animation: slideIn 0.2s ease;
    z-index: 1000;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.message-box.show {
    display: block;
}

.message-box.info {
    background: #0066ff;
    border-color: #0066ff;
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.5);
}

.message-box.success {
    background: #00ff00;
    border-color: #00ff00;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .screen {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
        letter-spacing: 2px;
    }

    h2 {
        font-size: 1.5em;
    }

    .color-picker {
        grid-template-columns: repeat(3, 1fr);
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}
