/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0f0f1a;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(16, 36, 80, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(60, 20, 60, 0.3) 0%, transparent 50%);
    color: #e8e8f0;
    min-height: 100vh;
}
a { color: #f39c12; }

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: #1e2a45;
    border: 1px solid #2a3a5c;
    border-left: 4px solid #e94560;
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    color: #ddd;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
    max-width: 340px;
}
.toast.toast-out {
    animation: toastOut 0.25s ease-in forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px); }
}

/* === Landing Page === */
.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1.5rem 3rem;
    min-height: 100vh;
}
.landing h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}
.subtitle {
    color: #7a7a90;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}
.landing-panels {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.panel {
    background: linear-gradient(160deg, #161e35, #121828);
    border-radius: 16px;
    padding: 2rem;
    width: 300px;
    border: 1px solid #1e2d50;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.panel h2 {
    margin-bottom: 1.25rem;
    color: #ccc;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}
.panel input, .lobby-join-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    border: 1px solid #1e2d50;
    background: #0c0f1a;
    color: #e8e8f0;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.panel input::placeholder, .lobby-join-input::placeholder { color: #4a4a60; }
.panel input:focus, .lobby-join-input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}
/* Bot selector */
.bot-select {
    margin-bottom: 0.85rem;
}
.bot-select label {
    display: block;
    font-size: 0.8rem;
    color: #5a5a70;
    margin-bottom: 0.4rem;
}
.bot-buttons {
    display: flex;
    gap: 0.35rem;
}
.bot-btn {
    flex: 1;
    padding: 0.5rem 0;
    border: 1px solid #1e2d50;
    border-radius: 8px;
    background: #0c0f1a;
    color: #888;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.bot-btn:hover { border-color: #e94560; color: #ccc; }
.bot-btn.active {
    background: linear-gradient(135deg, #e94560, #c0392b);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}
.panel-divider {
    border-top: 1px solid #1e2d50;
    margin: 1.25rem 0;
}

#join-code {
    text-transform: uppercase;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 1.15rem;
    letter-spacing: 3px;
    text-align: center;
}

/* Buttons */
.btn-primary, .panel button, .btn-start, .winner-content button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(233, 69, 96, 0.25);
}
.panel button:hover, .btn-start:hover, .winner-content button:hover, .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.35);
}
.panel button:active, .btn-start:active, .btn-primary:active { transform: translateY(0); }
.error {
    color: #e74c3c;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* === Lobby List === */
.lobby-list-section {
    margin-top: 3rem;
    width: 100%;
    max-width: 640px;
}
.lobby-list-section h2 {
    color: #7a7a90;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-align: center;
}
.lobby-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.lobby-item {
    background: linear-gradient(160deg, #161e35, #121828);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid #1e2d50;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lobby-item:hover {
    border-color: #2a3a5c;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.lobby-item .li-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lobby-item .li-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.lobby-item .li-host { font-weight: 600; font-size: 1rem; color: #e8e8f0; }
.lobby-item .li-meta { font-size: 0.78rem; color: #5a5a70; }
.lobby-item .li-join-btn {
    padding: 0.5rem 1.3rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.2);
    white-space: nowrap;
}
.lobby-item .li-join-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}
.lobby-item .li-join-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.lobby-join-input {
    flex: 1;
    margin-bottom: 0;
    font-size: 0.9rem;
    padding: 0.6rem 0.85rem;
}
.li-join-confirm {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s;
}
.li-join-confirm:hover { transform: translateY(-1px); }
.li-join-cancel {
    padding: 0.6rem 0.85rem;
    border: none;
    border-radius: 10px;
    background: #1e2d50;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.li-join-cancel:hover { background: #2a3a5c; }

/* === Game Lobby === */
.lobby {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}
.lobby h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}
.lobby-code {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #999;
}
.lobby-code span {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 2.8rem;
    font-weight: 700;
    color: #f39c12;
    letter-spacing: 6px;
    background: #161e35;
    padding: 0.4rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #1e2d50;
    user-select: all;
    display: inline-block;
    margin-top: 0.25rem;
}
.lobby-share { color: #5a5a70; margin-bottom: 2.5rem; font-size: 0.95rem; }
.lobby-players {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}
.lobby-player {
    background: #161e35;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid;
    font-size: 1.05rem;
    font-weight: 500;
    border: 1px solid #1e2d50;
    border-left: 4px solid;
}
.btn-start {
    width: auto;
    padding: 0.85rem 3.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
}
.lobby-wait { color: #5a5a70; font-style: italic; font-size: 0.95rem; }

/* === Game Layout === */
.game-container { padding: 1rem; }
.game-layout {
    display: flex;
    gap: 1.25rem;
    max-width: 2000px;
    margin: 0 auto;
    align-items: flex-start;
}

/* Board wrapper + zoom controls */
.board-wrapper { position: relative; flex-shrink: 0; }
.board-zoom {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.35rem;
    align-items: center;
    z-index: 5;
}
.board-zoom button {
    width: 28px;
    height: 28px;
    border: 1px solid #2a3a5c;
    border-radius: 6px;
    background: #161e35;
    color: #888;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}
.board-zoom button:hover { background: #1e2d50; color: #ddd; }
.board-zoom .zoom-label {
    font-size: 0.7rem;
    color: #5a5a70;
    min-width: 2.5rem;
    text-align: center;
}

/* === Board === */
.board {
    --bs: 660px;
    display: grid;
    grid-template-columns: 1.4fr repeat(9, 1fr) 1.4fr;
    grid-template-rows: 1.4fr repeat(9, 1fr) 1.4fr;
    width: var(--bs);
    height: var(--bs);
    background: #dcedc8;
    border: 2px solid #2a3a5c;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    /* Scale-dependent sizes via container units (approximated with calc) */
    --sq-font: calc(var(--bs) * 0.0078);
    --sq-price-font: calc(var(--bs) * 0.0073);
    --sq-corner-font: calc(var(--bs) * 0.009);
    --band-size: calc(var(--bs) * 0.013);
    --token-size: calc(var(--bs) * 0.016);
    --dot-size: calc(var(--bs) * 0.013);
}

.square {
    border: 1px solid #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #eef5e6;
    padding: 1px;
}

.square .color-band {
    position: absolute;
    background: var(--band-color);
}
.square.bottom .color-band { top: 0; left: 0; right: 0; height: var(--band-size); }
.square.top .color-band { bottom: 0; left: 0; right: 0; height: var(--band-size); }
.square.left .color-band { top: 0; right: 0; bottom: 0; width: var(--band-size); }
.square.right .color-band { top: 0; left: 0; bottom: 0; width: var(--band-size); }

.square .sq-name {
    font-size: var(--sq-font);
    text-align: center;
    color: #2a2a2a;
    font-weight: 600;
    line-height: 1.15;
    z-index: 1;
    padding: 0 2px;
    word-break: break-word;
}
.square .sq-price {
    font-size: var(--sq-price-font);
    color: #555;
    z-index: 1;
    font-weight: 500;
}
.square.corner {
    font-weight: 700;
    color: #2a2a2a;
}
.square.corner .sq-name { font-size: var(--sq-corner-font); }

.square .tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    position: absolute;
    bottom: 2px;
    left: 2px;
    z-index: 2;
}
.token {
    width: var(--token-size);
    height: var(--token-size);
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.15s ease;
}
.token-moving {
    animation: token-pop 0.15s ease;
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.4);
    z-index: 10;
}
@keyframes token-pop {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.square .owner-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    z-index: 2;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* === Sidebar === */
.sidebar {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Dice */
.dice-area { text-align: center; padding: 0.25rem 0; }
.dice-display {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.die {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, #ffffff, #e8e8e8);
    color: #1a1a2e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}
.die.rolling { animation: diceRoll 0.4s ease-out; }
@keyframes diceRoll {
    0% { transform: rotateZ(0deg) scale(0.7); }
    50% { transform: rotateZ(180deg) scale(1.15); }
    100% { transform: rotateZ(360deg) scale(1); }
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    color: white;
    flex: 1;
    min-width: 120px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-roll {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 2px 12px rgba(39, 174, 96, 0.3);
}
.btn-roll:hover { box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4); }
.btn-buy {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    box-shadow: 0 2px 12px rgba(41, 128, 185, 0.3);
}
.btn-buy:hover { box-shadow: 0 4px 20px rgba(41, 128, 185, 0.4); }
.btn-skip {
    background: #2a3344;
    border: 1px solid #3a4a64;
    box-shadow: none;
}
.btn-skip:hover { background: #343f55; }
.btn-endturn {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    box-shadow: 0 2px 12px rgba(142, 68, 173, 0.3);
}
.btn-endturn:hover { box-shadow: 0 4px 20px rgba(142, 68, 173, 0.4); }

/* Turn info */
.turn-info {
    background: #161e35;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    text-align: center;
    border-left: 4px solid #f39c12;
    border: 1px solid #1e2d50;
    border-left: 4px solid #f39c12;
}

/* Player panel */
.player-panel {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.player-card {
    background: #161e35;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    border-left: 4px solid;
    border: 1px solid #1e2d50;
    border-left: 4px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s;
}
.player-card.active {
    background: #1a2a48;
    box-shadow: 0 0 0 1px rgba(243, 156, 18, 0.3), 0 0 16px rgba(243, 156, 18, 0.1);
}
.player-card.bankrupt {
    opacity: 0.35;
}
.player-card.bankrupt .p-name { text-decoration: line-through; }
.player-card .p-name { font-weight: 600; font-size: 0.9rem; }
.player-card .p-money {
    color: #2ecc71;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
}
.player-card .p-props {
    font-size: 0.72rem;
    color: #5a5a70;
}

/* Log */
.log-section h3 {
    color: #5a5a70;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.log {
    background: #0c0f1a;
    border-radius: 10px;
    border: 1px solid #1a2035;
    padding: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.6;
}
.log::-webkit-scrollbar { width: 4px; }
.log::-webkit-scrollbar-track { background: transparent; }
.log::-webkit-scrollbar-thumb { background: #2a3a5c; border-radius: 4px; }
.log p { color: #5a5a70; padding: 1px 0; }
.log p:last-child { color: #c0c0d0; }

/* Winner overlay */
.winner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.winner-content {
    background: linear-gradient(160deg, #1a2540, #141c30);
    border-radius: 20px;
    padding: 3rem 4rem;
    text-align: center;
    border: 1px solid #2a3a5c;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: scaleIn 0.3s ease-out;
}
@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.winner-content h2 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}
.winner-content p { font-size: 1.4rem; margin-bottom: 2rem; font-weight: 600; }
.winner-content button { width: auto; padding: 0.85rem 2.5rem; border-radius: 12px; }

/* === Houses on board === */
.houses {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1px;
    z-index: 3;
}
.square.bottom .houses { top: auto; bottom: 1px; left: 50%; }
.square.top .houses { top: 1px; }
.square.left .houses { top: 50%; left: auto; right: 1px; transform: translateY(-50%); flex-direction: column; }
.square.right .houses { top: 50%; left: 1px; right: auto; transform: translateY(-50%); flex-direction: column; }

.house {
    width: calc(var(--bs) * 0.01);
    height: calc(var(--bs) * 0.008);
    background: #27ae60;
    border: 0.5px solid #1a7a3a;
    border-radius: 1px;
}
.house.hotel {
    width: calc(var(--bs) * 0.015);
    height: calc(var(--bs) * 0.01);
    background: #e74c3c;
    border-color: #a93226;
    border-radius: 2px;
}

/* Mortgaged overlay */
.square.mortgaged::after {
    content: 'M';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    color: #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: var(--sq-corner-font);
    z-index: 4;
}

/* === Dice pips === */
.die-face {
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    width: 38px;
    height: 38px;
    padding: 4px;
    gap: 2px;
}
.pip {
    width: 8px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 50%;
    place-self: center;
}

/* === Property Popup === */
.property-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(160deg, #1a2540, #141c30);
    border: 1px solid #2a3a5c;
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 280px;
    max-width: 340px;
    z-index: 150;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: scaleIn 0.2s ease-out;
}
.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.popup-close:hover { color: #ddd; }

.pp-color {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.pp-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #e8e8f0;
}
.pp-price {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0.75rem;
}
.pp-rent-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
}
.pp-rent-table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #1e2d50;
}
.pp-rent-table td:first-child { color: #888; }
.pp-rent-table td:last-child { text-align: right; color: #2ecc71; font-weight: 600; }
.pp-detail {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}
.pp-owner {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.pp-status {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.25rem;
}
.pp-status.mortgaged { color: #e74c3c; }
.pp-status.hotel { color: #e74c3c; font-weight: 600; }
.pp-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #2980b9, #2471a3);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    text-align: center;
}
.btn-sm:hover { transform: translateY(-1px); }
.btn-sm.btn-warn {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

/* === Auction panel === */
.auction-panel {
    background: linear-gradient(160deg, #1e2a45, #161e35);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #f39c12;
    animation: fadeIn 0.3s;
}
.auction-panel h4 {
    font-size: 0.95rem;
    color: #f39c12;
    margin-bottom: 0.5rem;
}
.auction-bid {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 0.25rem;
}
.auction-bidder {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}
.auction-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}
.auction-wait {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}
.bid-input {
    width: 100px;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #1e2d50;
    background: #0c0f1a;
    color: #e8e8f0;
    font-size: 0.9rem;
    font-family: 'SF Mono', monospace;
}
.bid-input:focus {
    outline: none;
    border-color: #f39c12;
}

/* === Trade panel === */
.trade-panel {
    background: linear-gradient(160deg, #1e2a45, #161e35);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #9b59b6;
    animation: fadeIn 0.3s;
}
.trade-panel h4 {
    font-size: 0.95rem;
    color: #9b59b6;
    margin-bottom: 0.5rem;
}
.trade-from, .trade-to {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 600;
    margin-top: 0.4rem;
}
.trade-items {
    font-size: 0.8rem;
    color: #ddd;
    padding-left: 0.5rem;
}
.trade-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}
.trade-wait {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* === Trade modal (proposal form) === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 160;
    animation: fadeIn 0.2s;
}
.modal-box {
    background: linear-gradient(160deg, #1a2540, #141c30);
    border: 1px solid #2a3a5c;
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 320px;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.modal-box h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #e8e8f0;
}
.trade-section {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #0c0f1a;
    border-radius: 8px;
}
.trade-section h5 {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.4rem;
}
.trade-props {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
}
.trade-prop {
    font-size: 0.82rem;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.trade-prop input[type="checkbox"] {
    accent-color: #9b59b6;
}
.trade-section label {
    font-size: 0.82rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.trade-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* === Surrender button === */
.surrender-area {
    text-align: center;
}
.btn-surrender {
    background: #2a2a3a;
    border: 1px solid #3a3a50;
    color: #888;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 0;
    flex: none;
}
.btn-surrender:hover {
    background: #3a1a1a;
    border-color: #e74c3c;
    color: #e74c3c;
}

/* === Jail-free button === */
.btn-jailfree {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 2px 12px rgba(243, 156, 18, 0.3);
}
.btn-jailfree:hover { box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4); }

/* === Player card prop dots === */
.p-info { display: flex; flex-direction: column; gap: 0.15rem; }
.p-props-dots {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
.prop-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    border: 0.5px solid rgba(255,255,255,0.2);
}
.jail-card-badge {
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

/* === Timer in turn-info === */
.timer {
    font-size: 0.75rem;
    color: #5a5a70;
    float: right;
}

/* === Log new entry animation === */
.log-new {
    animation: logSlide 0.3s ease-out;
}
@keyframes logSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 1100px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
    }
    .board {
        --bs: min(95vw, 660px) !important;
    }
    .sidebar {
        max-width: 100%;
        width: 100%;
    }
}
@media (max-width: 500px) {
    .landing { padding: 2.5rem 1rem 2rem; }
    .landing h1 { font-size: 2.2rem; }
    .panel { width: 100%; }
    .board {
        --bs: 98vw !important;
    }
}
