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

body {
    font-family: "Courier New", monospace;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #4ec9b0;
    text-shadow: 0 0 10px rgba(78, 201, 176, 0.5);
}

.main-grid {
    display: grid;
    grid-template-columns: 840px 1fr;
    gap: 20px;
}

.arena-section {
    background: #252526;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3e3e42;
}

#arena {
    width: 800px;
    height: 600px;
    background: #000;
    border: 2px solid #4ec9b0;
    position: relative;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section {
    background: #252526;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3e3e42;
}

.section h2 {
    color: #4ec9b0;
    margin-bottom: 10px;
    font-size: 18px;
}

input,
select,
button {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    background: #3c3c3c;
    border: 1px solid #555;
    color: #d4d4d4;
    border-radius: 4px;
    font-family: "Courier New", monospace;
}

button {
    background: #0e639c;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

button:hover {
    background: #1177bb;
}

button:disabled {
    background: #555;
    cursor: not-allowed;
}

.error {
    color: #f48771;
    padding: 10px;
    background: #3c1f1e;
    border-radius: 4px;
    margin-top: 10px;
}

.success {
    color: #4ec9b0;
    padding: 10px;
    background: #1e3c3a;
    border-radius: 4px;
    margin-top: 10px;
}

.info {
    color: #d4d4d4;
    font-size: 12px;
    line-height: 1.6;
}

.scoreboard {
    max-height: 200px;
    overflow-y: auto;
}

.score-entry {
    padding: 5px;
    border-bottom: 1px solid #3e3e42;
}

.score-entry.active {
    color: #4ec9b0;
}

#joinForm {
    display: block;
}

#gameInterface {
    display: none;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group button {
    flex: 1;
}

.deploy-btn {
    background: #ce9178 !important;
}

.deploy-btn:hover {
    background: #d4a589 !important;
}

/* Error Display */
#errorDisplay {
    display: none;
    background: #3c1f1e;
    border: 1px solid #f48771;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    color: #f48771;
    font-size: 12px;
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: "Consolas", "Courier New", monospace;
}

#errorDisplay.show {
    display: block;
}

/* Documentation Styling */
.doc-section {
    margin-bottom: 15px;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    overflow: hidden;
}

.doc-header {
    background: #2d2d30;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s;
}

.doc-header:hover {
    background: #3e3e42;
}

.doc-header h3 {
    color: #4ec9b0;
    font-size: 14px;
    margin: 0;
}

.doc-arrow {
    color: #858585;
    transition: transform 0.2s;
}

.doc-arrow.open {
    transform: rotate(90deg);
}

.doc-content {
    padding: 15px;
    background: #1e1e1e;
    display: none;
}

.doc-content.open {
    display: block;
}

.doc-content code {
    background: #2d2d30;
    padding: 2px 6px;
    border-radius: 3px;
    color: #ce9178;
    font-size: 12px;
}

.doc-content pre {
    background: #2d2d30;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
    border-left: 3px solid #4ec9b0;
}

.doc-content pre code {
    background: none;
    padding: 0;
}

.param {
    color: #9cdcfe;
}

.return {
    color: #4ec9b0;
}
