* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0e1726; color: #eee; font-family: 'Segoe UI', Arial, sans-serif; display: flex; flex-direction: column; align-items: center; padding-top: 30px; min-height: 100vh; }

/* AUTH */
#authScreen { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 340px; }
h1 { font-size: 2.4rem; letter-spacing: 1px; }
.tagline { color: #7fa8cc; font-size: 0.9rem; margin-top: -6px; }
.tabs { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid #2a3f5f; width: 100%; }
.tab { flex: 1; padding: 10px; background: #162135; color: #7fa8cc; border: none; cursor: pointer; font-size: 0.9rem; }
.tab.active { background: #1e90ff; color: white; font-weight: bold; }
.authForm { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.authForm input { padding: 10px 12px; background: #162135; border: 1px solid #2a3f5f; border-radius: 6px; color: #eee; font-size: 0.9rem; width: 100%; }
.authForm input:focus { outline: none; border-color: #1e90ff; }
.bigBtn { padding: 10px; background: #1e90ff; color: white; border: none; border-radius: 6px; font-size: 0.95rem; font-weight: bold; cursor: pointer; width: 100%; }
.bigBtn:hover { background: #1a7de0; }
.authError { color: #ff6b6b; font-size: 0.82rem; min-height: 16px; text-align: center; }
.orDivider { width: 100%; text-align: center; position: relative; color: #445566; }
.orDivider::before, .orDivider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: #2a3f5f; }
.orDivider::before { left: 0; } .orDivider::after { right: 0; }
.guestBtn { padding: 9px; background: #1a2a40; color: #7fa8cc; border: 1px solid #2a3f5f; border-radius: 6px; font-size: 0.9rem; cursor: pointer; width: 100%; }
.guestBtn:hover { background: #1e3550; }
.guestNote { color: #445566; font-size: 0.75rem; text-align: center; }

/* GAME */
#gameScreen { display: flex; flex-direction: column; align-items: center; }
#gameCanvas { display: block; border: 3px solid #1a2740; border-radius: 6px 6px 0 0; }
#bottomBar { width: 806px; background: #111827; border: 3px solid #1a2740; border-top: none; border-radius: 0 0 6px 6px; padding: 5px 10px; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; flex-wrap: nowrap; overflow: hidden; }
#statusLine { color: #7fa8cc; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#coinDisplay { color: #ffc400; font-weight: bold; white-space: nowrap; font-size: 0.82rem; }
#filterBtn { background: #1e3050; color: #aac8e8; border: 1px solid #2a4060; border-radius: 4px; padding: 3px 8px; cursor: pointer; font-size: 0.78rem; white-space: nowrap; }
#filterBtn.on { background: #1a6030; color: #80e080; border-color: #2a8040; }
#modPanelBtn { background: #2a1a40; color: #c8a0f0; border: 1px solid #4a2a60; border-radius: 4px; padding: 3px 8px; cursor: pointer; font-size: 0.78rem; white-space: nowrap; }
#customiseBtn { background: #1a2a40; color: #f0c8f0; border: 1px solid #3a2a50; border-radius: 4px; padding: 3px 8px; cursor: pointer; font-size: 0.78rem; white-space: nowrap; }
#customiseBtn:hover { background: #2a3a55; }
.hint { color: #445566; white-space: nowrap; font-size: 0.75rem; }
#chatInput { width: 806px; padding: 8px 12px; background: #162135; border: 2px solid #1e90ff; border-top: none; border-radius: 0 0 6px 6px; color: white; font-size: 0.9rem; display: none; outline: none; }

/* BAN/KICK */
#bannedScreen, #kickedScreen { justify-content: center; align-items: center; min-height: 60vh; }
.banBox { background: #1a0a0a; border: 2px solid #cc2222; border-radius: 10px; padding: 40px 50px; text-align: center; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.banBox h2 { color: #ff4444; } .banBox p { color: #cc8888; } .banSub { color: #664444 !important; font-size: 0.82rem !important; }
.kickBox { background: #1a1200; border: 2px solid #cc8800; border-radius: 10px; padding: 36px 46px; text-align: center; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.kickBox h2 { color: #ffaa00; } .kickBox p { color: #ccaa66; margin-bottom: 6px; }

/* POPUPS */
.popup { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.popupBox { background: #1a2010; border: 2px solid #aacc44; border-radius: 10px; padding: 30px 40px; text-align: center; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.popupBox h3 { color: #ccee66; } .popupBox p { color: #aabb88; }
.popupBox .bigBtn { width: auto; padding: 8px 24px; align-self: center; }
.modHeader { background: #1e1030; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; color: #c8a0f0; font-weight: bold; border-bottom: 1px solid #3a1a50; }
.modHeader button { background: none; border: none; color: #c8a0f0; font-size: 1.1rem; cursor: pointer; }

/* CUSTOMISE */
.customiseBox { background: #10182a; border: 2px solid #2a4060; border-radius: 10px; width: 460px; display: flex; flex-direction: column; overflow: hidden; }
.customiseContent { padding: 16px; display: flex; gap: 16px; }
.previewArea { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#previewCanvas { border-radius: 50%; background: #1a2a40; border: 2px solid #2a3f5f; }
.previewLabel { color: #556677; font-size: 0.78rem; }
.colourSection { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sectionLabel { color: #7fa8cc; font-size: 0.85rem; font-weight: bold; }
#colourGrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.colourSwatch { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: transform 0.1s, border-color 0.1s; }
.colourSwatch:hover { transform: scale(1.15); }
.colourSwatch.selected { border-color: white; transform: scale(1.1); }
.customColour { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #7fa8cc; }
#customColourPicker { width: 40px; height: 30px; border: none; border-radius: 4px; cursor: pointer; background: none; padding: 0; }

/* MOD PANEL */
.modBox { background: #10182a; border: 2px solid #4a2a70; border-radius: 10px; width: 500px; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.modControls { padding: 10px 14px; display: flex; gap: 8px; border-bottom: 1px solid #2a1a40; }
.modControls input { flex: 1; padding: 6px 10px; background: #162135; border: 1px solid #2a3f5f; border-radius: 4px; color: #eee; font-size: 0.85rem; }
.modControls select { padding: 6px 8px; background: #162135; border: 1px solid #2a3f5f; border-radius: 4px; color: #eee; font-size: 0.85rem; }
#modPlayerList { overflow-y: auto; flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.modPlayerRow { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #162135; border-radius: 6px; }
.modPlayerName { flex: 1; font-size: 0.9rem; color: #c0d8f0; }
.modPlayerName small { color: #556677; }
.modWarnBtn { background: #403010; color: #ffcc44; border: 1px solid #806020; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 0.78rem; }
.modTempBtn { background: #102040; color: #6699ff; border: 1px solid #204080; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 0.78rem; }
.modBanBtn  { background: #3a0a0a; color: #ff6666; border: 1px solid #802020; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 0.78rem; }
.modNoPlayers { text-align: center; color: #445566; padding: 20px; font-size: 0.9rem; }
