/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #003300;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
}

/* ─── Screens ─────────────────────────────────────────────────────────────── */
.screen { display: none; height: 100vh; width: 100vw; }
.screen.active { display: flex; }

/* ─── Setup Screen ────────────────────────────────────────────────────────── */
#setup-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a3d1a 0%, #0d260d 100%);
}
.setup-container {
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    background: rgba(20, 40, 20, 0.9);
    border-radius: 12px;
    border: 2px solid #555;
}
.title {
    text-align: center;
    color: #ffd700;
    font-size: 32px;
    margin-bottom: 4px;
}
.subtitle {
    text-align: center;
    color: #ccc;
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 20px;
}
.mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.mode-btn {
    padding: 8px 24px;
    border: 1px solid #888;
    border-radius: 6px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.mode-btn:hover { background: #50506e; }
.mode-btn.active {
    background: #007800;
    border-color: #ffd700;
    border-width: 2px;
}
.setup-panel { display: none; }
.setup-panel.active { display: block; }

.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #ccc;
    font-size: 13px;
}
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #666;
    border-radius: 4px;
    background: #2a2a2a;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
}
.form-group textarea { resize: vertical; font-size: 12px; }
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
}
.radio-group {
    display: flex;
    gap: 20px;
}
.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #ddd;
    font-size: 14px;
}
.number-control {
    display: flex;
    align-items: center;
    gap: 12px;
}
.num-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}
.num-btn:hover { background: #50506e; }
.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    color: #999;
    font-size: 13px;
}
.file-btn {
    padding: 4px 12px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}
.file-btn:hover { background: #50506e; }

.primary-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    background: #007800;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.primary-btn:hover { background: #009000; }
.secondary-btn {
    padding: 6px 16px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    margin-top: 8px;
}
.secondary-btn:hover { background: #50506e; }

.error-msg {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}
.rooms-list {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #444;
}
.rooms-list h3 { color: #ffd700; margin-bottom: 8px; font-size: 15px; }
.room-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #2a2a3a;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.room-item:hover { background: #3a3a4a; }

/* ─── Lobby Screen ────────────────────────────────────────────────────────── */
#lobby-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a3d1a 0%, #0d260d 100%);
}
.lobby-container {
    width: 500px;
    padding: 30px;
    background: rgba(20, 40, 20, 0.9);
    border-radius: 12px;
    border: 2px solid #555;
    text-align: center;
}
.lobby-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 16px 0;
    color: #ccc;
    font-size: 14px;
}
.player-list {
    margin: 20px 0;
    text-align: left;
}
.player-list-item {
    padding: 10px 16px;
    margin-bottom: 6px;
    background: #2a2a3a;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.player-list-item .status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00b800;
}
.player-list-item .status.disconnected { background: #888; }
.lobby-hint { color: #999; font-size: 13px; margin-top: 12px; }

/* ─── Game Screen ─────────────────────────────────────────────────────────── */
#game-screen {
    flex-direction: column;
    background: #005000;
}

/* Action Bar */
#action-bar {
    height: 30px;
    min-height: 30px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 2px;
    overflow-x: auto;
    z-index: 10;
}
.action-btn {
    padding: 2px 8px;
    border: 1px solid #666;
    border-radius: 3px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}
.action-btn:hover { background: #50506e; }
.action-separator {
    width: 1px;
    height: 18px;
    background: #555;
    margin: 0 4px;
}

/* Opponent Area */
#opponent-area {
    flex: 0 0 auto;
    background: #004000;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}
.opponent-section {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid #444;
}
.opponent-section:last-child {
    border-right: none;
}
.opponent-info-bar {
    height: 28px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
    gap: 16px;
    border-bottom: 1px solid #333;
}
.opponent-info-bar .player-name { color: #ffd700; font-weight: bold; }
.opponent-info-bar .life { color: #fff; }
.opponent-info-bar .zone-counts { color: #aaa; }
.opponent-battlefield {
    position: relative;
    min-height: 120px;
    background: #003800;
    border-bottom: 1px solid #333;
    flex: 1 1 auto;
}

/* Turn Divider */
#turn-divider {
    height: 20px;
    min-height: 20px;
    background: #282828;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffd700;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    cursor: row-resize;
    gap: 8px;
}
#turn-divider:hover { background: #363636; }
#turn-divider.dragging { background: #444; }
.divider-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 10px;
    padding: 0 4px;
    line-height: 1;
}
.divider-btn:hover { color: #ffd700; }

/* Viewer Battlefield */
#viewer-battlefield {
    flex: 1 1 auto;
    position: relative;
    background: #005000;
    overflow: hidden;
    min-height: 200px;
}

/* Viewer Info Bar */
#viewer-info-bar {
    height: 32px;
    min-height: 32px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 13px;
}
.info-left, .info-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.player-name { color: #ffd700; font-weight: bold; }
.life-display {
    display: flex;
    align-items: center;
    gap: 6px;
}
.life-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #666;
    border-radius: 3px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.life-btn:hover { background: #50506e; }
#viewer-life { font-size: 18px; font-weight: bold; min-width: 30px; text-align: center; }
.counter-display { color: #aaa; font-size: 12px; }
.zone-info { color: #aaa; font-size: 12px; }

/* Hand Area */
#hand-area {
    height: 210px;
    min-height: 170px;
    background: #003000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 40px;
    overflow: hidden;
    border-top: 2px solid #333;
}

/* Zone Piles */
#zone-piles {
    position: fixed;
    right: 8px;
    bottom: 225px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
}
.zone-pile {
    width: 55px;
    cursor: pointer;
    text-align: center;
}
.pile-label {
    font-size: 10px;
    color: #ccc;
    margin-bottom: 2px;
}
.pile-count { color: #ffd700; }
.pile-card {
    width: 50px;
    height: 70px;
    background: #2a2a3a;
    border: 1px solid #666;
    border-radius: 3px;
    overflow: hidden;
}
.pile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Card Elements ───────────────────────────────────────────────────────── */
.card {
    position: absolute;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s;
    border: 1px solid rgba(0,0,0,0.3);
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}
.card:hover { box-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }
.card.tapped { transform: rotate(90deg); }
.card.dragging {
    opacity: 0.7;
    z-index: 1000 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.card.selected { box-shadow: 0 0 0 2px #ffd700; }

/* Card in hand */
.hand-card {
    position: relative;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, margin-top 0.15s;
    border: 1px solid rgba(0,0,0,0.3);
}
.hand-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
}
.hand-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    z-index: 100;
}
.hand-card.dragging {
    opacity: 0.5;
    transform: none;
}

/* Card back */
.card-back {
    background: #191970;
    border: 2px solid #c8c8c8;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.card-back-inner {
    border: 2px solid #28288c;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8aa50;
    font-weight: bold;
    font-size: 11px;
}

/* Fallback card (no image) */
.card-fallback {
    background: #b4b4b4;
    border: 2px solid #646464;
    border-radius: 5px;
    padding: 4px;
    font-size: 10px;
    color: #000;
    word-wrap: break-word;
    overflow: hidden;
}

/* Counter badges */
.card-counters {
    position: absolute;
    bottom: 2px;
    left: 2px;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
.counter-badge {
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    color: #fff;
}
.counter-badge.positive { background: #00b400; }
.counter-badge.negative { background: #c80000; }
.counter-badge.generic { background: #0050c8; }

/* Stack indicators */
.stack-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ffd700;
    color: #000;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 5;
}
.stack-name-strip {
    position: absolute;
    left: 0;
    right: 0;
    height: 16px;
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    cursor: pointer;
    border-bottom: 1px solid #444;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.stack-name-strip:hover { background: rgba(80, 80, 110, 0.9); }

/* ─── Context Menu ────────────────────────────────────────────────────────── */
#context-menu {
    position: fixed;
    background: #32323c;
    border: 1px solid #fff;
    border-radius: 4px;
    z-index: 2000;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
#context-menu.hidden { display: none; }
.context-item {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #50505a;
}
.context-item:last-child { border-bottom: none; }
.context-item:hover { background: #50506e; }
.context-submenu { position: relative; }
.context-submenu-items {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #32323c;
    border: 1px solid #fff;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.context-submenu:hover .context-submenu-items { display: block; }

/* ─── Card Detail Popup ───────────────────────────────────────────────────── */
#card-detail {
    position: fixed;
    z-index: 1500;
    pointer-events: none;
    border: 2px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
#card-detail.hidden { display: none; }
#card-detail-img {
    width: 280px;
    height: auto;
    display: block;
}

/* ─── Overlays ────────────────────────────────────────────────────────────── */
#overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}
#overlay-container.hidden { display: none; }
#overlay-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
}
#overlay-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #141414;
    border: 2px solid #fff;
    border-radius: 8px;
    max-width: 85vw;
    max-height: 80vh;
    overflow: auto;
    padding: 20px;
}
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.overlay-title {
    color: #ffd700;
    font-size: 16px;
    font-weight: bold;
}
.overlay-close {
    width: 24px;
    height: 24px;
    background: #c80000;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.overlay-close:hover { background: #e00000; }

/* Zone viewer overlay */
.zone-viewer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.zone-viewer-card {
    width: 100px;
    height: 140px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #444;
}
.zone-viewer-card img { width: 100%; height: 100%; object-fit: cover; }
.zone-viewer-card:hover { box-shadow: 0 0 6px rgba(255,215,0,0.6); }

/* Scry overlay */
.scry-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 16px 0;
}
.scry-card {
    width: 120px;
    height: 168px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #444;
}
.scry-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.scry-card:hover { border-color: #ffd700; }
.scry-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    color: #afa;
    font-size: 13px;
}
.scry-hint { text-align: center; color: #999; font-size: 12px; margin-top: 8px; }

/* Library search overlay */
.library-search-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ffd700;
    border-radius: 4px;
    background: #323232;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    margin-bottom: 8px;
}
.library-search-input:focus { outline: none; }
.library-search-count { color: #ffd700; font-size: 12px; margin-bottom: 8px; }
.library-search-list {
    max-height: 50vh;
    overflow-y: auto;
}
.library-search-row {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 8px;
    cursor: pointer;
    border-bottom: 1px solid #3c3c3c;
}
.library-search-row:hover { background: #32324a; }
.library-search-row:nth-child(even) { background: rgba(255,255,255,0.03); }
.library-search-row:nth-child(even):hover { background: #32324a; }
.library-search-thumb {
    width: 26px;
    height: 36px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.library-search-thumb img { width: 100%; height: 100%; object-fit: cover; }
.library-search-name { flex: 1; font-size: 13px; }
.library-search-type { color: #a0a0a0; font-size: 12px; flex: 1; }
.library-search-mana { color: #c8c864; font-size: 12px; }

/* Token search overlay */
.token-search-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.token-search-card {
    width: 120px;
    cursor: pointer;
    text-align: center;
}
.token-search-card img {
    width: 120px;
    height: 168px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #444;
}
.token-search-card:hover img { border-color: #ffd700; }
.token-search-card .token-name {
    font-size: 11px;
    color: #ccc;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.token-search-hint { color: #999; font-size: 12px; margin-top: 8px; text-align: center; }

/* Commander damage overlay */
.cmd-damage-table {
    border-collapse: collapse;
    margin: 0 auto;
}
.cmd-damage-table th, .cmd-damage-table td {
    padding: 6px 12px;
    border: 1px solid #6e6e78;
    text-align: center;
    font-size: 13px;
}
.cmd-damage-table th { background: #32323c; color: #fff; }
.cmd-damage-table td { background: #28282e; }
.cmd-damage-table td.diagonal { background: #3c3c3c; color: #646464; }
.cmd-damage-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cmd-damage-cell button {
    width: 22px; height: 22px;
    border: 1px solid #666;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cmd-damage-cell .cmd-minus { background: #502828; }
.cmd-damage-cell .cmd-minus:hover { background: #703838; }
.cmd-damage-cell .cmd-plus { background: #285028; }
.cmd-damage-cell .cmd-plus:hover { background: #387038; }
.cmd-damage-cell .cmd-val { min-width: 20px; font-weight: bold; }
.cmd-damage-hint { color: #b4b4b4; font-size: 11px; text-align: center; margin-top: 8px; }

/* Number input dialog */
.number-dialog {
    text-align: center;
    padding: 10px;
}
.number-dialog .dialog-value {
    font-size: 28px;
    font-weight: bold;
    margin: 16px 0;
}
.number-dialog .dialog-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}
.dialog-btn {
    padding: 6px 16px;
    border: 1px solid #888;
    border-radius: 4px;
    background: #3c3c50;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.dialog-btn:hover { background: #50506e; }
.dialog-btn.confirm {
    background: #007800;
    border-color: #ffd700;
}
.dialog-btn.confirm:hover { background: #009000; }

/* Mulligan dialog */
.mulligan-dialog { text-align: center; }

/* Text input dialog */
.text-dialog { text-align: center; }
.text-dialog input {
    width: 80%;
    padding: 8px;
    margin: 12px 0;
    border: 2px solid #ffd700;
    border-radius: 4px;
    background: #323232;
    color: #fff;
    font-size: 14px;
}
.text-dialog input:focus { outline: none; }

/* Save dialog */
.save-dialog input {
    width: 80%;
    padding: 8px;
    margin: 12px 0;
    border: 2px solid #ffd700;
    border-radius: 4px;
    background: #323232;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
}
.save-dialog input:focus { outline: none; }
.save-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 8px 0;
}
.save-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
}
.save-item:hover { background: #32324a; }

/* ─── Toast Notifications ─────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    top: 40px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.toast {
    padding: 8px 16px;
    background: #323250;
    border: 1px solid #888;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    animation: toast-in 0.3s ease;
    max-width: 300px;
}
.toast.error { border-color: #ff6b6b; background: #502828; }
.toast.success { border-color: #6bff6b; background: #285028; }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
.toast.fade-out {
    animation: toast-out 0.3s ease forwards;
}
@keyframes toast-out {
    to { opacity: 0; transform: translateX(40px); }
}

/* ─── Drop zone highlights ────────────────────────────────────────────────── */
.drop-highlight {
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.4);
}
#hand-area.drop-highlight { background: #004800; }
#viewer-battlefield.drop-highlight { background: #006800; }
.zone-pile.drop-highlight .pile-card { border-color: #ffd700; border-width: 2px; }

/* ─── Scrollbar styling ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1e1e1e; }
::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #777; }

/* ─── Lobby enhancements ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.lobby-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
    align-items: center;
}
.lobby-buttons .primary-btn { margin-top: 0; flex: 1; }
.lobby-buttons .secondary-btn { margin-top: 0; }
.lobby-buttons .primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #555;
    border-color: #888;
}

/* Slot selection */
.lobby-slots {
    text-align: left;
    margin: 16px 0;
}
.slots-header {
    color: #ffd700;
    font-size: 15px;
    margin-bottom: 10px;
}
.slot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 6px;
    background: #2a2a3a;
    border-radius: 6px;
}
.slot-saved-name {
    flex: 1;
    color: #ccc;
    font-size: 14px;
}
.slot-arrow {
    color: #888;
    font-size: 16px;
}
.slot-claimed-by {
    color: #aaa;
    font-size: 14px;
}
.slot-claimed-by.mine {
    color: #6bff6b;
    font-weight: bold;
}
.slot-claim-btn {
    padding: 4px 14px;
    border: 1px solid #ffd700;
    border-radius: 4px;
    background: #007800;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}
.slot-claim-btn:hover { background: #009000; }

.lobby-connected-players {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #444;
}
.lobby-connected-players h4 {
    color: #999;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Loaded game tag in rooms list */
.loaded-tag {
    color: #ffd700;
    font-size: 11px;
    font-weight: bold;
}

/* Load save overlay */
.load-save-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
}
.load-save-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
}
.load-save-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #141414;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 20px;
    min-width: 350px;
    max-width: 500px;
    max-height: 70vh;
    overflow: auto;
}
.load-save-list {
    margin-top: 8px;
}
.save-pick-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #2a2a3a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: monospace;
    color: #ddd;
}
.save-pick-item:hover { background: #3a3a4a; }
