/* ============================================
   BANCRUPT - PAGRINDINIS STILIUS
   ============================================ */

:root {
    --side-col-width: 175px;
    --side-col-min: 175px;
    --board-min-width: 1600px;
    --board-max-width: 1900px;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1f0d;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
}

/* ============================================
   SPA PUSLAPIŲ VALDYMAS
   ============================================ */
.page {
    display: none;
    width: 100%;
    min-height: 100vh;
}
.page.active {
    display: flex;
}

/* ============================================
   LANDING PUSLAPIS
   ============================================ */
#page-landing {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    padding: 40px 20px;
    min-height: 100vh;
}

.landing-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a84c;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.landing-container h1 {
    color: #ffd700;
    font-size: 3.5em;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.landing-subtitle {
    color: #d4b896;
    font-size: 1.2em;
    margin-bottom: 40px;
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.landing-btn {
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
}

.landing-btn-primary {
    background: linear-gradient(145deg, #ffd700, #f0c000);
    color: #1a3b1a;
}

.landing-btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(255,215,0,0.5);
}

.landing-btn-secondary {
    background: linear-gradient(145deg, #17a2b8, #138496);
}

.landing-btn-secondary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(23,162,184,0.5);
}

/* ============================================
   MENU PUSLAPIS
   ============================================ */
#page-menu {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    padding: 40px 20px;
    min-height: 100vh;
}

.menu-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a84c;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.menu-container h1 {
    color: #ffd700;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.menu-container p {
    color: #d4b896;
    margin-bottom: 30px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-btn {
    padding: 16px 24px;
    border: 2px solid #c9a84c;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
    color: #ffd700;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
}

.menu-btn:hover {
    background: #ffd700;
    color: #0d1f0d;
    transform: scale(1.02);
}

.menu-btn-back {
    background: rgba(108, 117, 125, 0.3);
    color: #d4b896;
    border-color: #6c757d;
    margin-top: 15px;
}

.menu-btn-back:hover {
    background: #6c757d;
    color: #fff;
}

/* ============================================
   TAISYKLIŲ MODALAS
   ============================================ */
#rulesModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

#rulesModal.active {
    display: flex;
}

.rules-content {
    background: linear-gradient(145deg, #f5f0e8, #e8d5b5);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid #c9a84c;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    position: relative;
}

.rules-content h2 {
    color: #1a6b3c;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 10px;
}

.rules-content h3 {
    color: #1a6b3c;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-content p {
    color: #3d2b1f;
    line-height: 1.6;
    margin-bottom: 8px;
}

.rules-content ul {
    color: #3d2b1f;
    padding-left: 25px;
    margin-bottom: 10px;
}

.rules-content li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.rules-close {
    position: sticky;
    bottom: 0;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.rules-close:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(26,107,60,0.4);
}

.rules-content::-webkit-scrollbar {
    width: 6px;
}

.rules-content::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 3px;
}

/* ============================================
   VIEŠŲ STALŲ MODALAS
   ============================================ */
#publicGamesModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

#publicGamesModal.active {
    display: flex;
}

.public-games-content {
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    border-radius: 20px;
    padding: 30px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid #c9a84c;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.public-games-content h2 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.public-game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    border: 2px solid #c9a84c;
    cursor: pointer;
    transition: all 0.2s;
}

.public-game-item:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
    border-color: #ffd700;
}

.public-game-item .game-host {
    flex: 1;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.public-game-item .game-code {
    color: #ffd700;
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 16px;
}

.public-game-item .game-count {
    color: #d4b896;
    font-size: 12px;
    font-weight: 600;
}

.public-games-empty {
    text-align: center;
    padding: 30px;
    color: #d4b896;
    font-style: italic;
}

/* ---------- LOBBY ---------- */
.lobby-container {
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 2px 0 rgba(255,255,255,0.1);
    text-align: center;
    border: 2px solid #c9a84c;
    max-width: 550px;
    width: 100%;
}

.lobby-container h1 {
    color: #ffd700;
    font-size: 3em;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    letter-spacing: 3px;
}

.lobby-container .subtitle {
    color: #d4b896;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.lobby-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lobby-form input {
    padding: 14px 20px;
    border: 2px solid #c9a84c;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.lobby-form input:focus {
    border-color: #ffd700;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

.lobby-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.lobby-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    box-sizing: border-box;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: linear-gradient(145deg, #ffd700, #f0c000);
    color: #1a3b1a;
    box-sizing: border-box;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255,215,0,0.4);
}

.btn-secondary {
    background: linear-gradient(145deg, #6c757d, #495057);
    box-sizing: border-box;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(108,117,125,0.4);
}

#gameIdInput {
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---------- SPALVŲ PASIRINKIMAS ---------- */
.color-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    max-width: 280px;
    margin: 0 auto;
}

.color-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.color-circle:hover:not(.taken) {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.color-circle.selected {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.8), 0 4px 15px rgba(0,0,0,0.5);
    transform: scale(1.15);
}

.color-circle.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 0 5px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.9);
    pointer-events: none;
}

.color-circle.taken {
    opacity: 0.25;
    cursor: not-allowed;
    position: relative;
}

.color-circle.taken::after {
    content: '❌';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    pointer-events: none;
}

/* ---------- ŽAIDIMO EKRANAS ---------- */
#game {
    width: 100%;
    height: 100vh;
    max-width: 100vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

#gameHeader {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(26, 107, 60, 0.9);
    border-radius: 10px 10px 0 0;
    color: #ffd700;
    font-weight: bold;
    border-bottom: 2px solid #c9a84c;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    flex-shrink: 0;
    align-items: center;
    box-sizing: border-box;
}

/* ---------- KAIRĖ PANELĖ ---------- */
#gameBody {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}

#leftPanel {
    width: 130px;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #1a6b3c, #0f4a2a);
    border: 2px solid #c9a84c;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #ffd700;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    height: 99%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

#gameIdBox {
    background: #0d1f0d;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    word-break: break-all;
}

#gameIdBox span {
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
}

.left-btn {
    width: 100%;
    padding: 10px 8px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background: #0d1f0d;
    color: #ffd700;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.left-btn:hover {
    background: #ffd700;
    color: #0d1f0d;
    transform: scale(1.03);
}

.left-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.leave-btn {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
    border-color: #ff6b6b;
}

.leave-btn:hover {
    background: linear-gradient(145deg, #ff6b6b, #dc3545);
    color: #fff;
}

#leftPlayerCount, #leftTurnDisplay {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    text-align: center;
}

#leftTurnDisplay span {
    color: #fff;
}

/* ---------- HEADER MYGTUKAI ---------- */
.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #1a3b1a;
    padding: 6px 14px;
    border-radius: 8px;
    border: 2px solid #ffd700;
}

.header-btn {
    padding: 8px 14px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    background: #0d1f0d;
    color: #ffd700;
    font-size: clamp(10px, 0.8vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
}

.header-btn:hover {
    background: #ffd700;
    color: #0d1f0d;
}

.header-btn.active {
    background: #ffd700;
    color: #0d1f0d;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

#board {
    background: radial-gradient(ellipse at center, #1a7a4a, #0f4a2a);
    padding: 12px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 60px rgba(0,0,0,0.3);
    border: 3px solid #c9a84c;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.3s ease;
    position: relative;
    flex: 1 1 0;
    min-width: var(--board-min-width);
    max-width: var(--board-max-width);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    height: 99%;
    width: auto;
    margin: 0 auto;
    box-sizing: border-box;
}

#board.adaptive {
    width: 100%;
    max-width: 100vw;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

#board.fixed {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    box-sizing: border-box;
}

#board.fixed .board-row {
    flex-shrink: 0;
}

#board.fixed::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#board.fixed::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

#board.fixed::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 4px;
}

#board.fixed::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.board-row {
    display: flex;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.row-top,
.row-bottom {
    min-width: 0;
}

/* ---------- LANGELIAI ---------- */
.cell {
    background: linear-gradient(145deg, #e8d5b5, #d4b896);
    border: 2px solid #c9a84c;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #3d2b1f;
    text-align: center;
    padding: 2px;
    transition: all 0.3s;
    position: relative;
    font-weight: 600;
    flex: 1 1 0;
    min-width: 0;
    min-height: clamp(20px, 4vh, 50px);
    overflow: visible;
}

.cell:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2;
}

.cell.corner {
    flex: 0 0 175px;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 175px;
    width: 175px;
    height: 175px;
    min-width: 175px;
    max-width: 175px;
    min-height: 175px;
    max-height: 175px;
    aspect-ratio: 1 / 1;
    font-size: 8px;
    border-width: 3px;
    font-weight: 700;
    box-sizing: border-box;
}

.row-top .cell.corner:first-child {
    margin-right: auto;
}

.row-top .cell.corner:last-child {
    margin-left: auto;
}

.row-bottom .cell.corner:first-child {
    margin-right: auto;
}

.row-bottom .cell.corner:last-child {
    margin-left: auto;
}

.cell.start {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: #fff;
}
.cell.start .cell-name,
.cell.start .cell-cost {
    color: #fff;
}

.cell.jail {
    background: linear-gradient(145deg, #6c757d, #495057);
    color: #fff;
}
.cell.jail .cell-name,
.cell.jail .cell-cost {
    color: #fff;
}

.cell.parking {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: #fff;
}
.cell.parking .cell-name,
.cell.parking .cell-cost {
    color: #fff;
}

.cell.go-to-jail {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
}
.cell.go-to-jail .cell-name,
.cell.go-to-jail .cell-cost {
    color: #fff;
}

.cell .cell-icon {
    font-size: 30px;
    line-height: 1;
}

.cell .cell-name {
    font-size: 11px;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    padding: 0 2px;
    color: #000000;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.cell .cell-cost {
    font-size: 10px;
    color: #000000;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

/* ---------- VIDURIO LANGELIAI ---------- */
.row-middle {
    display: flex;
    gap: 2px;
    flex: 1;
    min-height: 0;
    height: 100%;
    min-width: 0;
}

.row-middle-left,
.row-middle-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 175px;
    width: 175px;
    min-width: 175px;
    max-width: 175px;
}

.row-middle-left {
    margin-right: auto;
}

.row-middle-right {
    margin-left: auto;
}

.row-middle-left .cell,
.row-middle-right .cell {
    flex: 1 1 0;
    min-height: 30px;
    min-width: 0;
    width: 100%;
}

.row-middle-center {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 2px;
    min-height: 0;
    height: 100%;
    min-width: 0;
}

.center-row {
    display: flex;
    gap: 2px;
    flex: 1;
    min-height: 0;
    height: 50%;
}

.center-cell {
    background: linear-gradient(145deg, #d4b896, #c4a886);
    border: 2px solid #b8966a;
    border-radius: 8px;
    padding: 6px 8px;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.center-cell h4 {
    font-size: 10px;
    color: #3d2b1f;
    text-align: center;
    border-bottom: 1px solid rgba(61,43,31,0.2);
    padding-bottom: 3px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

/* ---------- 1 LANGELIS - AŠ ---------- */
#myInfo {
    font-size: clamp(9px, 0.6vw, 13px);
    color: #3d2b1f;
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    width: 100%;
    min-height: 0;
}

#myInfo .player-money {
    font-size: clamp(20px, 1.5vw, 34px);
    font-weight: 700;
    color: #000000;
}

#myInfo .player-name {
    font-size: clamp(12px, 0.9vw, 18px);
    font-weight: 600;
}

#myInfo .player-color {
    width: clamp(18px, 1.3vw, 28px);
    height: clamp(18px, 1.3vw, 28px);
    border-radius: 50%;
    border: 2px solid #3d2b1f;
}

/* ---------- 2 LANGELIS - VALDYMAS ---------- */
.controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.dice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 2px 0;
    padding: 2px;
}

.dice {
    width: clamp(50px, 5vw, 80px);
    height: clamp(50px, 5vw, 80px);
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25), inset 0 -2px 5px rgba(0,0,0,0.1);
    border: 2px solid #3d2b1f;
    transition: transform 0.3s, box-shadow 0.3s;
    user-select: none;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    box-sizing: border-box;
    flex-shrink: 0;
}

.dice:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(0,0,0,0.35), 0 0 20px rgba(255,215,0,0.4);
}

.dice-dots-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    width: clamp(36px, 4vw, 60px);
    height: clamp(36px, 4vw, 60px);
    padding: 3px;
    box-sizing: border-box;
}

.dice-dot {
    width: clamp(8px, 0.9vw, 14px);
    height: clamp(8px, 0.9vw, 14px);
    background: radial-gradient(circle at 30% 30%, #4a4a4a, #1a1a1a);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
    box-sizing: border-box;
}

.dice-dot.visible {
    opacity: 1;
}

@keyframes diceRollEnhanced {
    0% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    }
    20% {
        transform: rotate(72deg) scale(1.15);
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    }
    40% {
        transform: rotate(144deg) scale(0.9);
        box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    }
    60% {
        transform: rotate(216deg) scale(1.2);
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    }
    80% {
        transform: rotate(288deg) scale(0.95);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }
    100% {
        transform: rotate(360deg) scale(1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    }
}

@keyframes diceGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.25), 0 0 5px rgba(255,215,0,0.3);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.25), 0 0 25px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.4);
    }
}

.dice.rolling {
    animation: diceRollEnhanced 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), diceGlow 0.8s ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

@keyframes diceSettle {
    0% { transform: scale(1.1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.dice.settle {
    animation: diceSettle 0.3s ease-out;
}

.control-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.control-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.control-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-dice {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}
.btn-dice:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}
.btn-dice:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-trade {
    background: linear-gradient(145deg, #ffd700, #f0c000);
    color: #3d2b1f;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}
.btn-trade:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}
.btn-trade:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- ACTION ROW ---------- */
.action-row {
    display: flex;
    gap: 4px;
    width: 100%;
    margin-bottom: 4px;
    flex-wrap: nowrap;
}

.btn-half {
    flex: 1;
    font-size: clamp(9px, 0.7vw, 13px);
    padding: 8px 4px;
    width: auto;
    min-width: 0;
    border-radius: 6px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 🆕 VISI ACTION MYGTUKAI – vienoda išvaizda */
.btn-bankrupt,
.btn-jail,
.btn-build {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
    width: 100%;
    padding: 8px 6px;
    border: none;
    border-radius: 6px;
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.btn-bankrupt:hover:not(:disabled),
.btn-jail:hover:not(:disabled),
.btn-build:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-bankrupt:disabled,
.btn-jail:disabled,
.btn-build:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 🆕 Griauti mygtukas – tokia pati išvaizda kaip bankrotas */
.btn-demolish {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
    width: 100%;
    padding: 8px 6px;
    border: none;
    border-radius: 6px;
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.btn-demolish:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-demolish:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- 3 LANGELIS - CHAT ---------- */
.chat {
    display: flex;
    flex-direction: column;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    font-size: clamp(9px, 0.8vw, 14px);
    color: #3d2b1f;
    max-height: 100%;
    padding: clamp(5px, 0.6vw, 10px) clamp(8px, 1vw, 12px);
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    margin-bottom: clamp(3px, 0.4vw, 6px);
    min-height: 70px;
}

#chatMessages::-webkit-scrollbar,
#journal::-webkit-scrollbar,
#notifications::-webkit-scrollbar,
#playersList::-webkit-scrollbar {
    width: 4px;
}
#chatMessages::-webkit-scrollbar-track,
#journal::-webkit-scrollbar-track,
#notifications::-webkit-scrollbar-track,
#playersList::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}
#chatMessages::-webkit-scrollbar-thumb,
#journal::-webkit-scrollbar-thumb,
#notifications::-webkit-scrollbar-thumb,
#playersList::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 2px;
}

.chat-input {
    display: flex;
    gap: clamp(3px, 0.4vw, 6px);
}

.chat-input input {
    flex: 1;
    padding: clamp(3px, 0.4vw, 6px) clamp(6px, 0.7vw, 10px);
    border: 1px solid #b8966a;
    border-radius: 5px;
    font-size: clamp(8px, 0.7vw, 12px);
    background: rgba(255,255,255,0.5);
    outline: none;
}

.chat-input input:focus {
    border-color: #3d2b1f;
    background: rgba(255,255,255,0.7);
}

.chat-input button {
    padding: clamp(3px, 0.4vw, 6px) clamp(8px, 1vw, 14px);
    background: #3d2b1f;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: clamp(9px, 0.8vw, 14px);
    font-weight: 700;
}

.chat-input button:hover {
    background: #5a3d2b;
}

/* ---------- 4 LANGELIS - ŽAIDĖJAI ---------- */
#playersList {
    flex: 1;
    overflow-y: auto;
    font-size: clamp(10px, 0.9vw, 16px);
    max-height: 200px;
    padding: 2px 4px;
    min-height: 50px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.1);
}

.player-item .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.player-item .pname {
    flex: 1;
    font-weight: 600;
    font-size: clamp(10px, 0.9vw, 16px);
}

.player-item .pmoney {
    color: #000000;
    font-weight: 700;
    font-size: clamp(10px, 0.9vw, 16px);
}

.player-item.active {
    background: rgba(255,215,0,0.2);
    border-left: 3px solid #ffd700;
}

.player-item.bankrupt {
    opacity: 0.4;
    text-decoration: line-through;
}

.player-item.me {
    background: rgba(40, 167, 69, 0.2);
}

/* ---------- 5 LANGELIS - PRANEŠIMAI ---------- */
#notifications {
    flex: 1;
    overflow-y: auto;
    font-size: clamp(9px, 0.7vw, 13px);
    color: #3d2b1f;
    max-height: 100%;
    padding: 6px 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    margin: 2px 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-item {
    padding: 3px 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    border-left: 2px solid #c9a84c;
    margin-bottom: 1px;
    font-size: 9px;
    line-height: 1.3;
    word-wrap: break-word;
}

.notification-item .ntime {
    font-size: 7px;
    color: rgba(61,43,31,0.5);
    margin-right: 4px;
}

/* ---------- PIRKIMO PASIRINKIMAS ---------- */
#buyChoice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    z-index: 100;
    animation: choiceFadeIn 0.25s ease;
    pointer-events: all;  /* 🆕 Neleisti praleisti paspaudimų */
}

/* 🆕 Neleisti uždaryti paspaudus išorę */
#buyChoice.show {
    display: flex;
    pointer-events: all;
}

/* 🆕 Neleisti ESC uždaryti */
#buyChoice.show * {
    pointer-events: all;
}

#buyChoice.show {
    display: flex;
}

@keyframes choiceFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.buy-choice-box {
    background: linear-gradient(145deg, #f5f0e8, #e8d5b5);
    border-radius: 10px;
    padding: 12px 14px 14px;
    width: 85%;
    max-width: 220px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 2px solid #c9a84c;
}

.buy-choice-header {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1a6b3c;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 5px;
    margin-bottom: 6px;
}

.buy-choice-body {
    text-align: center;
    margin-bottom: 8px;
}

.buy-choice-body p {
    font-size: 11px;
    color: #3d2b1f;
    margin: 2px 0;
}

.buy-choice-body #choiceFieldName {
    font-size: 14px;
    color: #1a6b3c;
    font-weight: 700;
}

.buy-choice-body #choiceFieldCost {
    color: #28a745;
    font-weight: 700;
    font-size: 13px;
}

.buy-choice-body #choicePlayerMoney {
    color: #007bff;
    font-weight: 700;
    font-size: 13px;
}

.buy-choice-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.choice-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: clamp(10px, 0.8vw, 13px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    box-sizing: border-box;
    min-width: 0;
}

.choice-btn:hover {
    transform: scale(1.04);
}

.choice-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.choice-buy {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: #fff;
}
.choice-buy:hover {
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.choice-cancel {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
}
.choice-cancel:hover {
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

#center-5 {
    position: relative;
    overflow: hidden;
}

#turnIndicator.hidden {
    display: none;
}

/* ---------- 6 LANGELIS - ŽURNALAS ---------- */
#journal {
    flex: 1;
    overflow-y: auto;
    font-size: clamp(10px, 0.9vw, 16px);
    color: #3d2b1f;
    max-height: 100%;
    padding: clamp(5px, 0.6vw, 10px) clamp(8px, 1vw, 12px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(61, 43, 31, 0.1);
    margin: 2px 0;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.3vw, 4px);
}

.journal-item {
    padding: clamp(2px, 0.3vw, 5px) clamp(4px, 0.5vw, 8px);
    border-bottom: 1px solid rgba(61, 43, 31, 0.06);
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    font-size: clamp(9px, 0.8vw, 14px);
    line-height: 1.4;
    color: #3d2b1f;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.journal-item .jnum {
    color: rgba(61, 43, 31, 0.4);
    font-weight: 700;
    font-size: clamp(8px, 0.7vw, 13px);
    min-width: 24px;
}

.journal-item .jtext {
    flex: 1;
    word-wrap: break-word;
    font-weight: 500;
    font-size: clamp(9px, 0.8vw, 14px);
}

.journal-item .jtime {
    font-size: clamp(7px, 0.6vw, 12px);
    color: rgba(61, 43, 31, 0.4);
    white-space: nowrap;
}

/* ---------- SPALVOTOS JUOSTELĖS ---------- */

/* SERVICE grupės – BE spalvotos juostelės */
.cell.service1::before,
.cell.service2::before,
.cell.service3::before {
    display: none;
}

.cell.service1,
.cell.service2,
.cell.service3 {
    background: linear-gradient(145deg, #f0e8d8, #e0d5c0);
    --property-color: transparent;
}

.cell.property {
    position: relative;
    overflow: hidden;
}

.row-top .cell.property::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: var(--property-color, #ffd700);
    z-index: 1;
}

.row-bottom .cell.property::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: var(--property-color, #ffd700);
    z-index: 1;
}

.row-middle-left .cell.property::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 20%;
    background: var(--property-color, #ffd700);
    z-index: 1;
}

.row-middle-right .cell.property::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20%;
    background: var(--property-color, #ffd700);
    z-index: 1;
}

.cell.corner.property::before {
    display: none;
}

.cell .cell-number {
    position: relative;
    font-size: 10px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 5;
}

/* ---------- KAMPŲ NUMERIŲ POZICIJOS ---------- */
.cell.corner .cell-number {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.cell.corner.row-top .cell-number {
    top: 4px;
    right: 6px;
}

.cell.corner.row-bottom .cell-number {
    bottom: 4px;
    left: 6px;
}

.cell.corner.row-middle-right .cell-number {
    bottom: 4px;
    right: 6px;
}

.cell.corner.row-middle-left .cell-number {
    top: 4px;
    left: 6px;
}

/* ---------- SAVININKŲ RUTULIUKŲ IŠVAZDA ---------- */
.cell .cell-owner {
    position: absolute;
    width: 14px;
    height: 14px;
    min-width: 14px;
    max-width: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.95);
    pointer-events: none;
    z-index: 5;
    opacity: 0.9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

/* ---------- MINI KORTELĖS ---------- */
.mini-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-content: flex-start;
    margin-top: 4px;
    flex: 1 1 45%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.mini-cards-container::-webkit-scrollbar {
    width: 6px;
}

.mini-cards-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.mini-cards-container::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 3px;
}

.mini-cards-container::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.mini-card {
    width: 40px;
    height: 60px;
    min-width: 40px;
    max-width: 40px;
    min-height: 60px;
    max-height: 60px;
    flex: 0 0 auto;
    background: #f5f0e8;
    border: 2px solid #3d2b1f;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.mini-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 10;
    border-color: #ffd700;
}

.mini-card-color {
    width: 100%;
    height: 20px;
    background: var(--card-color, #c9a84c);
    border-bottom: 2px solid #3d2b1f;
    flex-shrink: 0;
}

.mini-card-color.mini-card-icon {
    background: linear-gradient(145deg, #f0e8d8, #e0d5c0);
    border-bottom: 1px solid rgba(61,43,31,0.2);
}

.mini-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3px 2px;
    text-align: center;
    background: #f5f0e8;
    position: relative;
}

.mini-card-name {
    font-size: 6px;
    font-weight: 700;
    color: #3d2b1f;
    line-height: 1.1;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    padding: 0 1px;
}

.mini-card-info {
    font-size: 5px;
    font-weight: 600;
    color: #6c757d;
    margin-top: auto;
    padding-top: 2px;
    border-top: 1px solid rgba(61,43,31,0.2);
    line-height: 1;
}

.mini-card-houses {
    position: absolute;
    bottom: 8px;
    right: 2px;
    font-size: 7px;
    line-height: 1;
    background: rgba(255,255,255,0.9);
    border-radius: 3px;
    padding: 1px 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ============================================
   🆕 PREKYBOS MINI KORTELĖS
   ============================================ */

.trade-mini-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-content: flex-start;
    padding: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    min-height: 80px;
    box-sizing: border-box;
    width: 100%;
}

.trade-mini-cards::-webkit-scrollbar {
    width: 6px;
}

.trade-mini-cards::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.trade-mini-cards::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 3px;
}

.trade-mini-cards::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.trade-mini-cards .mini-card {
    width: 50px;
    height: 75px;
    min-width: 50px;
    max-width: 50px;
    min-height: 75px;
    max-height: 75px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    border: 2px solid #3d2b1f;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f0e8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.trade-mini-cards .mini-card:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 10;
    border-color: #ffd700;
}

.trade-mini-cards .mini-card.selected {
    border-color: #28a745;
    border-width: 3px;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.7);
    background: rgba(40, 167, 69, 0.1);
}

.trade-mini-cards .mini-card-color {
    width: 100%;
    height: 22px;
    border-bottom: 2px solid #3d2b1f;
    flex-shrink: 0;
}

.trade-mini-cards .mini-card-color.mini-card-icon {
    background: linear-gradient(145deg, #f0e8d8, #e0d5c0);
    border-bottom: 1px solid rgba(61,43,31,0.2);
}

.trade-mini-cards .mini-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px;
    text-align: center;
    background: #f5f0e8;
    position: relative;
    min-height: 0;
}

.trade-mini-cards .mini-card-name {
    font-size: 6px;
    font-weight: 700;
    color: #3d2b1f;
    line-height: 1.1;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    padding: 0 1px;
}
.trade-mini-cards .mini-card-info {
    font-size: 7px;
    font-weight: 700;
    color: #28a745;
    margin-top: auto;
    padding-top: 1px;
    border-top: 1px solid rgba(61,43,31,0.2);
    line-height: 1;
}

.trade-mini-cards .mini-card-houses {
    position: absolute;
    bottom: 18px;
    right: 1px;
    font-size: 8px;
    line-height: 1;
    background: rgba(255,255,255,0.95);
    border-radius: 3px;
    padding: 1px 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.trade-mini-cards .mini-card input[type="checkbox"],
.trade-mini-cards .mini-card input[type="radio"] {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    z-index: 10;
    accent-color: #28a745;
}

/* ---------- GRIAUTI NAMUS - KORTELĖS ---------- */
.demolish-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 4px 0;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    border: 2px solid #c9a84c;
    cursor: pointer;
    transition: all 0.2s;
}

.demolish-card:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.02);
    border-color: #dc3545;
}

.demolish-card .card-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.demolish-card .card-name {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    margin-left: 8px;
}

.demolish-card .card-houses {
    font-size: 16px;
    margin: 0 8px;
}

.demolish-card .card-refund {
    color: #28a745;
    font-weight: 700;
    font-size: 13px;
}

/* ---------- NAMELIAI ---------- */
.cell-houses {
    position: absolute;
    font-size: 14px;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    line-height: 1;
    display: flex;
    gap: 1px;
    align-items: center;
}

.row-top .cell .cell-houses {
    bottom: 4px;
    left: 10px;
    flex-direction: column;
}

.row-bottom .cell .cell-houses {
    top: 4px;
    right: 6px;
    flex-direction: column;
}

.row-middle-left .cell .cell-houses {
    bottom: 4px;
    right: 4px;
    flex-direction: column;
}

.row-middle-right .cell .cell-houses {
    top: 4px;
    left: 6px;
    flex-direction: column;
}

.cell.corner .cell-houses {
    font-size: 10px;
}

.cell-houses span {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 3px;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.2;
}

/* ---------- ŽAIDĖJŲ IKONĖLĖS ---------- */
.cell .players-on-cell {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-template-rows: repeat(2, auto);
    gap: 4px;
    z-index: 20;
    justify-content: center;
    align-content: center;
    padding: 2px;
    margin: 0;
    pointer-events: none;
}

.cell .players-on-cell .player-dot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.4);
    flex-shrink: 0;
    pointer-events: auto;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.cell .players-on-cell .player-dot:hover {
    transform: scale(1.2);
    z-index: 21;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.cell.corner .players-on-cell .player-dot {
    width: 38px;
    height: 38px;
}



/* ---------- BLINK ANIMACIJA ---------- */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    #board.fixed {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    :root { 
        --board-min-width: 1000px;
    }
    
    .cell.corner {
        flex: 0 0 175px;
        width: 175px;
        height: 175px;
        min-width: 175px;
        max-width: 175px;
    }
    .row-middle-left,
    .row-middle-right {
        flex: 0 0 175px;
        width: 175px;
        min-width: 175px;
        max-width: 175px;
    }
    .cell .cell-icon {
        font-size: 24px;
    }
    .cell .cell-name {
        font-size: 10px;
    }
    .cell .cell-cost {
        font-size: 9px;
    }
    .dice {
        width: 55px;
        height: 55px;
    }
    .dice-dots-container {
        width: 38px;
        height: 38px;
        gap: 4px;
    }
    .dice-dot {
        width: 9px;
        height: 9px;
    }
    .header-btn {
        font-size: 11px;
        padding: 4px 10px;
        min-width: 60px;
    }
    .header-controls {
        padding: 4px 10px;
        gap: 6px;
    }
    .cell .players-on-cell .player-dot {
        width: 38px;
        height: 38px;
    }
    .cell {
        font-size: 8px;
    }
    .cell-bg-icon {
        font-size: 5em;
    }
    .row-middle-left .cell-bg-icon,
    .row-middle-right .cell-bg-icon {
        font-size: 4em;
    }
    .cell.corner .cell-bg-icon {
        font-size: 6em;
    }
}

@media (max-width: 768px) {
    #board {
        width: 1200px;
        height: 800px;
        min-width: 1200px;
        max-width: 1200px;
        min-height: 800px;
        max-height: 800px;
        overflow: auto;
        padding: 6px;
        gap: 1px;
    }
    
    #game {
        height: 100dvh;
    }
    
    #gameBody {
        gap: 4px;
    }
    .board-row {
        gap: 1px;
        width: 100%;
        min-width: 0;
    }
    .cell {
        font-size: 6px;
        min-height: 30px;
        padding: 1px;
        border-width: 1px;
        min-width: 0;
    }
    .cell.corner {
        flex: 0 0 130px;
        width: 130px;
        height: 130px;
        min-width: 130px;
        max-width: 130px;
        aspect-ratio: 1;
        font-size: 7px;
        border-width: 2px;
    }
    .cell .cell-icon {
        font-size: 18px;
    }
    .cell .cell-name {
        font-size: 8px;
    }
    .cell .cell-cost {
        font-size: 7px;
    }
    .cell .players-on-cell .player-dot {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
    .cell.corner .players-on-cell .player-dot {
        width: 14px;
        height: 14px;
    }
    .row-middle-left,
    .row-middle-right {
        flex: 0 0 130px;
        width: 130px;
        min-width: 130px;
        max-width: 130px;
    }
    .row-middle {
        gap: 1px;
        width: 100%;
        min-width: 0;
    }
    .row-middle-center {
        gap: 1px;
        padding: 0 1px;
        flex: 1 1 0;
        min-width: 0;
    }
    .center-row {
        gap: 1px;
    }
    .center-cell {
        padding: 3px 4px;
        min-height: 50px;
        border-width: 1px;
        min-width: 0;
    }
    .center-cell h4 {
        font-size: 8px;
        padding-bottom: 2px;
        margin-bottom: 2px;
    }
    .dice {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        border-width: 1.5px;
    }
    .dice-dots-container {
        width: 36px;
        height: 36px;
        gap: 4px;
        padding: 2px;
    }
    .dice-dot {
        width: 8px;
        height: 8px;
    }
    .dice-container {
        gap: 12px;
        margin: 0;
        padding: 0;
    }
    .control-buttons button {
        font-size: 8px;
        padding: 3px 8px;
        border-radius: 4px;
    }
    .action-row {
        gap: 3px;
        margin-bottom: 3px;
    }
    .btn-half {
        font-size: 9px;
        padding: 4px 3px;
    }
    #myInfo .player-money {
        font-size: 24px;
    }
    #myInfo .player-name {
        font-size: 11px;
    }
    #myInfo .player-color {
        width: 18px;
        height: 18px;
    }
    #myInfo {
        font-size: 9px;
        gap: 1px;
    }
    #playersList {
        font-size: 9px;
        max-height: 50px;
        min-height: 30px;
        padding: 1px 3px;
    }
    .player-item {
        padding: 1px 3px;
        font-size: 8px;
    }
    .player-item .dot {
        width: 8px;
        height: 8px;
    }
    #notifications {
        font-size: 9px;
        max-height: 50px;
        min-height: 30px;
        padding: 4px 6px;
    }
    .notification-item {
        font-size: 8px;
        padding: 2px 6px;
    }
    #gameHeader {
        font-size: 10px;
        padding: 4px 10px;
        gap: 4px;
    }
    .header-btn {
        font-size: 10px;
        padding: 3px 8px;
        min-width: 50px;
    }
    .header-controls {
        padding: 4px 8px;
        gap: 4px;
    }
    .buy-choice-box {
        padding: 12px 14px 14px;
        max-width: 220px;
    }
    .buy-choice-header {
        font-size: 14px;
        padding-bottom: 6px;
        margin-bottom: 8px;
    }
    .buy-choice-body p {
        font-size: 12px;
    }
    .buy-choice-body #choiceFieldName {
        font-size: 15px;
    }
    .choice-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    #leftPanel {
        width: 80px;
        padding: 6px 4px;
        font-size: 9px;
        gap: 4px;
    }
    #gameIdBox { font-size: 8px; padding: 4px 2px; }
    #gameIdBox span { font-size: 9px; }
    .left-btn { font-size: 9px; padding: 6px 4px; }
    #leftPlayerCount, #leftTurnDisplay { font-size: 8px; padding: 3px 4px; }
    .cell-bg-icon {
        font-size: 4em;
    }
    .row-middle-left .cell-bg-icon,
    .row-middle-right .cell-bg-icon {
        font-size: 3em;
    }
    .cell.corner .cell-bg-icon {
        font-size: 5em;
    }
}

@media (max-width: 480px) {
    :root { 
        --board-min-width: 700px;
    }
    
    #board {
        padding: 4px;
        gap: 1px;
        border-width: 2px;
    }
    .board-row {
        gap: 1px;
    }
    .cell {
        min-height: 20px;
        border-radius: 3px;
        padding: 1px;
        border-width: 1px;
        min-width: 0;
    }
    .cell.corner {
        flex: 0 0 175px;
        width: 175px;
        height: 175px;
        min-width: 175px;
        max-width: 175px;
        aspect-ratio: 1;
        border-width: 3px;
    }
    .cell .cell-icon {
        font-size: 14px;
    }
    .cell .cell-name {
        font-size: 6px;
    }
    .cell .cell-cost {
        font-size: 6px;
    }
    .cell .players-on-cell .player-dot {
        width: 13px;
        height: 13px;
        border-width: 1.5px;
    }
    .cell.corner .players-on-cell .player-dot {
        width: 11px;
        height: 11px;
    }
    .row-middle-left,
    .row-middle-right {
        flex: 0 0 175px;
        width: 175px;
        min-width: 175px;
        max-width: 175px;
    }
    .row-middle {
        gap: 1px;
    }
    .row-middle-center {
        gap: 1px;
        padding: 0 1px;
    }
    .center-row {
        gap: 1px;
    }
    .center-cell {
        min-height: 35px;
        padding: 2px 3px;
        border-radius: 4px;
        border-width: 1px;
    }
    .center-cell h4 {
        font-size: 6px;
        padding-bottom: 1px;
        margin-bottom: 1px;
    }
    .dice {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    .dice-dots-container {
        width: 28px;
        height: 28px;
        gap: 3px;
        padding: 2px;
    }
    .dice-dot {
        width: 6px;
        height: 6px;
    }
    .dice-container {
        gap: 8px;
        margin: 0;
        padding: 0;
    }
    .control-buttons button {
        font-size: 7px;
        padding: 2px 6px;
        border-radius: 3px;
    }
    .action-row {
        gap: 2px;
        margin-bottom: 2px;
    }
    .btn-half {
        font-size: 8px;
        padding: 3px 2px;
    }
    #myInfo .player-money {
        font-size: 11px;
    }
    #myInfo .player-name {
        font-size: 9px;
    }
    #myInfo .player-color {
        width: 14px;
        height: 14px;
        border-width: 1.5px;
    }
    #myInfo {
        font-size: 7px;
        gap: 0px;
    }
    #playersList {
        font-size: 7px;
        max-height: 40px;
        min-height: 25px;
        padding: 1px 2px;
    }
    .player-item {
        padding: 1px 2px;
        font-size: 7px;
        gap: 2px;
    }
    .player-item .dot {
        width: 6px;
        height: 6px;
    }
    #notifications {
        font-size: 7px;
        max-height: 40px;
        min-height: 25px;
        padding: 3px 4px;
        border-radius: 4px;
    }
    .notification-item {
        font-size: 7px;
        padding: 2px 4px;
        border-left-width: 2px;
    }
    #gameHeader {
        font-size: 8px;
        padding: 3px 6px;
        gap: 3px;
        border-radius: 6px 6px 0 0;
    }
    .header-btn {
        font-size: 8px;
        padding: 2px 6px;
        min-width: 40px;
        border-width: 1px;
    }
    .header-controls {
        padding: 3px 6px;
        gap: 3px;
        border-width: 1px;
    }
    .lobby-container {
        padding: 16px 20px;
        border-radius: 20px;
    }
    .lobby-container h1 {
        font-size: 1.8em;
    }
    .lobby-container .subtitle {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    .lobby-form input {
        padding: 10px 14px;
        font-size: 14px;
    }
    .btn {
        padding: 10px;
        font-size: 14px;
        border-radius: 8px;
    }
    .buy-choice-box {
        padding: 10px 12px 12px;
        max-width: 180px;
        border-radius: 8px;
    }
    .buy-choice-header {
        font-size: 12px;
        padding-bottom: 4px;
        margin-bottom: 6px;
    }
    .buy-choice-body p {
        font-size: 10px;
        margin: 2px 0;
    }
    .buy-choice-body #choiceFieldName {
        font-size: 13px;
    }
    .choice-btn {
        font-size: 10px;
        padding: 4px 10px;
        border-radius: 6px;
    }
    #leftPanel { width: 65px; padding: 4px 3px; font-size: 7px; }
    #gameIdBox { font-size: 7px; }
    #gameIdBox span { font-size: 8px; }
    .left-btn { font-size: 8px; padding: 5px 3px; }
    #leftPlayerCount, #leftTurnDisplay { font-size: 7px; }
    
    .color-circle {
        width: 38px;
        height: 38px;
    }
    
    .color-circle.selected::after {
        font-size: 20px;
    }
    
    .color-picker {
        gap: 8px;
        padding: 8px;
    }
    
    .cell .cell-name {
        font-size: 5px;
    }
    
    .cell .players-on-cell .player-dot {
        width: 10px;
        height: 10px;
    }
    .cell-bg-icon {
        font-size: 3.5em;
    }
    .row-middle-left .cell-bg-icon,
    .row-middle-right .cell-bg-icon {
        font-size: 2.5em;
    }
    .cell.corner .cell-bg-icon {
        font-size: 4em;
    }
    .landing-container h1 {
        font-size: 2.5em;
    }
    .landing-container {
        padding: 30px 20px;
    }
    .landing-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    .menu-container h1 {
        font-size: 2em;
    }
    .rules-content {
        padding: 20px 15px;
    }
    .rules-content h2 {
        font-size: 1.4em;
    }
}

/* ---------- GARSO SLIDER ---------- */
#volumeSlider,
#musicVolumeSlider,
#sfxVolumeSlider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(to right, #dc3545, #ffc107, #28a745);
    border-radius: 3px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb,
#musicVolumeSlider::-webkit-slider-thumb,
#sfxVolumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #0d1f0d;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

#volumeSlider::-moz-range-thumb,
#musicVolumeSlider::-moz-range-thumb,
#sfxVolumeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #0d1f0d;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

#soundPanel {
    animation: soundPanelFadeIn 0.2s ease;
}

@keyframes soundPanelFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

#muteBtn:hover {
    background: #ffd700;
    color: #0d1f0d;
}

/* 🆕 PREKYBOS MYGTUKAI – vienoda išvaizda */
.btn-trade-option {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: clamp(12px, 0.9vw, 16px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0;
}

.btn-trade-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-trade-option:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ---------- INFO MYGTUKAS ---------- */
.info-btn {
    background: linear-gradient(145deg, #dc3545, #a71d2a);
    color: #fff;
    border-color: #ff6b6b;
    transition: all 0.3s;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-btn.active {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    border-color: #4ade80;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

.info-btn:hover {
    transform: scale(1.03);
}

/* ---------- INFO PANELĖ ---------- */
#cellInfoPanel {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(61, 43, 31, 0.1);
    margin-top: 3px;
    min-height: 30px;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: var(--info-font-size, 11px);
    color: #3d2b1f;
    line-height: 1.25;
    flex-shrink: 0;
}

#cellInfoPanel.show {
    display: flex;
}

#cellInfoPanel::-webkit-scrollbar {
    width: 4px;
}

#cellInfoPanel::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 2px;
}

#cellInfoPanel::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.info-header {
    font-weight: 700;
    font-size: var(--info-header-size, 14px);
    color: #1a6b3c;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 3px;
    margin-bottom: 3px;
    text-align: center;
    flex-shrink: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 1px 0;
    font-size: var(--info-font-size, 11px);
}

.info-row .label {
    color: #6c757d;
    font-weight: 600;
    font-size: var(--info-font-size, 11px);
}

.info-row .value {
    color: #3d2b1f;
    font-weight: 700;
    font-size: var(--info-font-size, 11px);
}

.info-row .value.green {
    color: #28a745;
}

.info-row .value.red {
    color: #dc3545;
}

.info-section {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed rgba(61, 43, 31, 0.2);
}

.info-section-title {
    font-weight: 700;
    font-size: var(--info-section-size, 12px);
    color: #1a6b3c;
    margin-bottom: 2px;
}

.info-placeholder {
    text-align: center;
    color: #6c757d;
    font-size: 11px;
    padding: 8px;
    font-style: italic;
}

/* ---------- BALSAVIMO MYGTUKAS ---------- */
.vote-kick-btn {
    background: linear-gradient(145deg, #6f42c1, #5a32a3);
    color: #fff;
    border-color: #8b5cf6;
    font-size: clamp(9px, 0.7vw, 11px);
    padding: 8px 6px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-kick-btn:hover {
    background: linear-gradient(145deg, #8b5cf6, #6f42c1);
    color: #fff;
}

/* ---------- BALSAVIMO MODALAS ---------- */
.vote-kick-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 4px 0;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    border: 2px solid #c9a84c;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-kick-card:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.02);
    border-color: #dc3545;
}

.vote-kick-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.vote-kick-card .card-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.vote-kick-card .card-name {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    margin-left: 8px;
    color: #3d2b1f;
}

.vote-kick-card .card-votes {
    font-size: 13px;
    font-weight: 700;
    color: #dc3545;
}

.vote-kick-status {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #3d2b1f;
    text-align: center;
    border: 1px solid #c9a84c;
}

.vote-kick-timer {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
    margin: 5px 0;
}

/* ---------- FONO IKONA ---------- */
.cell-bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8em;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

.cell .cell-icon,
.cell .cell-name,
.cell .cell-cost,
.cell .cell-houses,
.cell .players-on-cell {
    position: relative;
    z-index: 1;
}

.cell .cell-owner {
    position: relative;
    z-index: 5;
}

.row-middle-left .cell-bg-icon,
.row-middle-right .cell-bg-icon {
    font-size: 5em;
}

.cell.corner .cell-bg-icon {
    font-size: 8em;
    opacity: 0.8;
}

.cell-top-bar {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    pointer-events: none;
    flex-direction: row;
}

.row-top .cell-top-bar {
    top: 2px;
    left: 2px;
}

.row-bottom .cell-top-bar {
    bottom: 4px;
    left: 6px;
}

.row-middle-right .cell-top-bar {
    bottom: 4px;
    right: 6px;
}

.row-middle-left .cell-top-bar {
    top: 4px;
    left: 6px;
}

/* ============================================ */
/* WAITING ROOM OVERLAY */
/* ============================================ */
#waitingRoomOverlay {
    animation: waitingFadeIn 0.3s ease;
}

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

#waitingPlayersList::-webkit-scrollbar,
#waitingChatMessages::-webkit-scrollbar {
    width: 4px;
}

#waitingPlayersList::-webkit-scrollbar-thumb,
#waitingChatMessages::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 2px;
}

#waitingPlayersList::-webkit-scrollbar-track,
#waitingChatMessages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

#readyBtn:disabled,
#startGameBtn:disabled {
    cursor: not-allowed;
}

#waitingIsPublic {
    accent-color: #ffd700;
}

#createIsPublic {
    accent-color: #ffd700;
}

/* ---------- INFO TOOLTIP ---------- */
#cellInfoTooltip {
    position: fixed;
    display: none;
    background: linear-gradient(145deg, #f5f0e8, #e8d5b5);
    border: 2px solid #c9a84c;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 11px;
    color: #3d2b1f;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 180px;
    max-width: 280px;
    pointer-events: none;
    animation: tooltipFadeIn 0.15s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

#cellInfoTooltip .info-header {
    font-weight: 700;
    font-size: 12px;
    color: #1a6b3c;
    border-bottom: 1px solid #c9a84c;
    padding-bottom: 3px;
    margin-bottom: 5px;
    text-align: center;
}

#cellInfoTooltip .info-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 1px 0;
    font-size: 10px;
}

#cellInfoTooltip .info-row .label {
    color: #6c757d;
    font-weight: 600;
}

#cellInfoTooltip .info-row .value {
    color: #3d2b1f;
    font-weight: 700;
}

#cellInfoTooltip .info-row .value.green {
    color: #28a745;
}

#cellInfoTooltip .info-row .value.red {
    color: #dc3545;
}

#cellInfoTooltip .info-section {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed rgba(61, 43, 31, 0.2);
}

#cellInfoTooltip .info-section-title {
    font-weight: 700;
    font-size: 10px;
    color: #1a6b3c;
    margin-bottom: 3px;
}

/* ---------- ŽAIDĖJO JUDĖJIMO ANIMACIJA ---------- */
.player-dot.jumping {
    transform: scale(1.4);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    z-index: 101;
}

/* ---------- LANGELIO PRANEŠIMŲ BLOKAS ---------- */
#cellActionInfo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    z-index: 8;
    animation: choiceFadeIn 0.25s ease;
}

#cellActionInfo.show {
    display: flex;
}

.cell-action-box {
    background: linear-gradient(145deg, #f5f0e8, #e8d5b5);
    border-radius: 10px;
    padding: 12px 14px 14px;
    width: 90%;
    max-width: 250px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 2px solid #c9a84c;
}

.cell-action-header {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1a6b3c;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 5px;
    margin-bottom: 8px;
}

.cell-action-body {
    text-align: center;
    font-size: 12px;
    color: #3d2b1f;
    line-height: 1.4;
}

.cell-action-body p {
    margin: 4px 0;
}

/* ============================================
   🎨 EMODŽIŲ ANIMACIJOS
   ============================================ */

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes wave {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-8px); }
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-12px); }
}

@keyframes glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px gold); 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 15px gold); 
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.cell[data-id="0"] .cell-bg-icon { animation: pulse 2s ease-in-out infinite; }
.cell[data-id="2"] .cell-bg-icon { animation: glow 1.5s ease-in-out infinite; }
.cell[data-id="4"] .cell-bg-icon { animation: pulse 1.8s ease-in-out infinite; }
.cell[data-id="5"] .cell-bg-icon { animation: blink 1.2s ease-in-out infinite; }
.cell[data-id="8"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="11"] .cell-bg-icon { animation: bounce 1.5s ease-in-out infinite; }
.cell[data-id="13"] .cell-bg-icon { animation: pulse 2s ease-in-out infinite; }
.cell[data-id="14"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="16"] .cell-bg-icon { animation: blink 1.5s ease-in-out infinite; }
.cell[data-id="19"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="21"] .cell-bg-icon { animation: bounce 1.8s ease-in-out infinite; }
.cell[data-id="24"] .cell-bg-icon { animation: spin 8s linear infinite; }
.cell[data-id="26"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="28"] .cell-bg-icon { animation: blink 1s ease-in-out infinite; }
.cell[data-id="32"] .cell-bg-icon { animation: pulse 2.5s ease-in-out infinite; }
.cell[data-id="37"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="42"] .cell-bg-icon { animation: blink 0.8s ease-in-out infinite; }
.cell[data-id="44"] .cell-bg-icon { animation: wave 2.5s ease-in-out infinite; }
.cell[data-id="46"] .cell-bg-icon { animation: wave 3s ease-in-out infinite; }
.cell[data-id="48"] .cell-bg-icon { animation: pulse 2s ease-in-out infinite; }
.cell[data-id="50"] .cell-bg-icon { animation: bounce 1.5s ease-in-out infinite; }

/* ============================================
   🏆 LAIMĖJIMO EKRANAS SU KONFETI
   ============================================ */

@keyframes winnerBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

@keyframes winnerGlow {
    0%, 100% { 
        text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 4px 20px rgba(0,0,0,0.9);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 60px rgba(255,215,0,1), 0 0 80px rgba(255,215,0,0.6), 0 4px 20px rgba(0,0,0,0.9);
        transform: scale(1.05);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 12px;
    height: 12px;
    top: -20px;
    z-index: 99998;
    animation: confettiFall linear forwards;
    pointer-events: none;
}

.confetti-piece.rect {
    width: 8px;
    height: 16px;
    border-radius: 2px;
}

.confetti-piece.circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.confetti-piece.triangle {
    width: 0;
    height: 0;
    background: transparent;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid;
}

#winnerModal.active {
    display: flex;
}

/* ============================================
   🏠 NAMŲ STATYMO ANIMACIJA
   ============================================ */

@keyframes houseGrow {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes houseBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes hotelGrow {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.5) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.1) rotate(0deg); opacity: 1; }
}

.cell-houses span.new-house {
    animation: houseGrow 0.6s ease-out;
    display: inline-block;
}

.cell-houses span.new-hotel {
    animation: hotelGrow 0.8s ease-out;
    display: inline-block;
}

.cell-houses span.house-bounce {
    animation: houseBounce 0.4s ease-out;
    display: inline-block;
}

/* ============================================
   🎨 SKLYPO HIGHLIGHT
   ============================================ */

.cell.highlight-yellow {
    background: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), inset 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.08);
    z-index: 100;
    transition: all 0.12s ease;
    animation: highlightPulse 0.6s ease-in-out infinite alternate;
}

.cell.highlight-green {
    background: rgba(40, 167, 69, 0.5);
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.9), inset 0 0 20px rgba(40, 167, 69, 0.5);
    transform: scale(1.1);
    z-index: 100;
    transition: all 0.15s ease;
    animation: highlightGreenPulse 0.5s ease-in-out infinite alternate;
}

.cell.highlight-red {
    background: rgba(220, 53, 69, 0.5);
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.9), inset 0 0 20px rgba(220, 53, 69, 0.5);
    transform: scale(1.08);
    z-index: 100;
    transition: all 0.12s ease;
    animation: highlightRedBlink 0.4s ease-in-out infinite;
}

@keyframes highlightPulse {
    0% { 
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), inset 0 0 15px rgba(255, 215, 0, 0.5);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), inset 0 0 25px rgba(255, 215, 0, 0.7);
        transform: scale(1.1);
    }
}

@keyframes highlightGreenPulse {
    0% { 
        box-shadow: 0 0 30px rgba(40, 167, 69, 0.9), inset 0 0 20px rgba(40, 167, 69, 0.5);
        transform: scale(1.08);
    }
    100% { 
        box-shadow: 0 0 50px rgba(40, 167, 69, 1), inset 0 0 30px rgba(40, 167, 69, 0.7);
        transform: scale(1.15);
    }
}

@keyframes highlightRedBlink {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 30px rgba(220, 53, 69, 0.9), inset 0 0 20px rgba(220, 53, 69, 0.5);
    }
    50% { 
        opacity: 0.7;
        box-shadow: 0 0 50px rgba(220, 53, 69, 1), inset 0 0 30px rgba(220, 53, 69, 0.7);
    }
}

/* ============================================
   🎨 SKLYPŲ GRUPAVIMAS
   ============================================ */

.cell.property[data-group] {
    border-width: 3px;
    position: relative;
}

/* Pilnos grupės – ŽAIDĖJO spalvos rėmelis */
.cell.property.full-group {
    border-color: var(--owner-color, #ffd700);
    box-shadow: 
        0 0 15px var(--owner-color, #ffd700), 
        inset 0 0 10px var(--owner-color, #ffd700);
    animation: fullGroupPulse 2s ease-in-out infinite;
}

/* Žaidėjo spalvos juostelė pilnai grupei */
.cell.property.full-group::after {
    background: var(--owner-color, #ffd700);
    height: 5px;
    box-shadow: 0 0 10px var(--owner-color, #ffd700);
}

@keyframes fullGroupPulse {
    0%, 100% { 
        box-shadow: 
            0 0 15px var(--owner-color, #ffd700), 
            inset 0 0 10px var(--owner-color, #ffd700);
    }
    50% { 
        box-shadow: 
            0 0 25px var(--owner-color, #ffd700), 
            inset 0 0 15px var(--owner-color, #ffd700);
    }
}


/* ============================================
   💸 SKRENDANTYS PINIGAI
   ============================================ */

@keyframes flyMoney {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--fly-x, 0px), var(--fly-y, -200px)) scale(0.3);
        opacity: 0;
    }
}

.flying-money {
    position: fixed;
    font-size: 36px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.9), 0 2px 5px rgba(0,0,0,0.5);
    z-index: 99999;
    pointer-events: none;
    animation: flyMoney 1.2s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 5px;
}

.flying-money.negative {
    color: #dc3545;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.9), 0 2px 5px rgba(0,0,0,0.5);
}

.flying-money.positive {
    color: #28a745;
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.9), 0 2px 5px rgba(0,0,0,0.5);
}

/* ============================================
   🖱️ MYGTUKŲ HOVER EFEKTAI
   ============================================ */

button,
.btn,
.menu-btn,
.landing-btn,
.header-btn,
.left-btn,
.control-buttons button,
.choice-btn,
.action-row button,
.btn-trade-option,
.btn-bankrupt,
.btn-jail,
.btn-build,
.btn-demolish {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    box-sizing: border-box;
}

.landing-btn {
    position: relative;
    overflow: hidden;
}

.landing-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.landing-btn:hover::before {
    width: 300px;
    height: 300px;
}

.landing-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.landing-btn-primary:hover {
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.landing-btn-secondary:hover {
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.5);
}

.menu-btn {
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.menu-btn:hover::before {
    width: 300px;
    height: 300px;
}

.menu-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.header-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.left-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.leave-btn:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.control-buttons button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-dice:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.btn-trade:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.action-row button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
}

.btn-bankrupt:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.btn-demolish:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.choice-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.choice-buy:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.choice-cancel:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.btn-secondary:hover {
    box-shadow: 0 10px 30px rgba(108, 117, 125, 0.5);
}

button:active:not(:disabled),
.btn:active,
.menu-btn:active,
.landing-btn:active,
.header-btn:active,
.left-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ============================================
   🌙 TAMSAUS REŽIMO SPALVOS
   ============================================ */

body.dark-mode {
    background: #0a0a0a;
}

body.dark-mode .cell {
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .cell .cell-name,
body.dark-mode .cell .cell-cost,
body.dark-mode .cell .cell-number {
    color: #e0e0e0;
}

body.dark-mode .center-cell {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .center-cell h4 {
    color: #e0e0e0;
    border-bottom-color: rgba(224, 224, 224, 0.2);
}

body.dark-mode #chatMessages,
body.dark-mode #journal,
body.dark-mode #notifications,
body.dark-mode #playersList {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

body.dark-mode .journal-item {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notification-item {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .player-item {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

body.dark-mode #myInfo {
    color: #e0e0e0;
}

body.dark-mode #myInfo .player-money {
    color: #fff;
}

body.dark-mode #myInfo .player-name {
    color: #e0e0e0;
}

body.dark-mode #cellInfoPanel {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

/* ============================================
   🆕 BUY CARD (5 langelyje)
   ============================================ */

#buyCard.pending #buyCardBox {
    border-color: #ffc107;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.5);
}

#buyCard.pending #buyCardHeader {
    color: #e0a800;
    border-bottom-color: #ffc107;
}

#buyCard.success #buyCardBox {
    border-color: #28a745;
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.5);
}

#buyCard.success #buyCardHeader {
    color: #28a745;
    border-bottom-color: #28a745;
}

#buyCard.cancel #buyCardBox {
    border-color: #dc3545;
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.5);
}

#buyCard.cancel #buyCardHeader {
    color: #dc3545;
    border-bottom-color: #dc3545;
}

/* ============================================
   🆕 MINI KORTELIŲ HOVER FIX
   ============================================ */

#center-1 {
    overflow: hidden;
    position: relative;
    z-index: 100;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#center-1 .center-cell {
    overflow: hidden;
}

#center-1 .mini-cards-container {
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    flex: 1 1 45%;
    min-height: 0;
}

#center-1 #myInfo {
    overflow: hidden;
}

.row-middle-center,
.center-row {
    overflow: visible;
}

/* ============================================
   🆕 PREKYBOS MINI KORTELĖS (gavėjo lange)
   ============================================ */

.trade-mini-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    min-height: 50px;
    padding: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
}

.trade-mini-cards > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    width: 100%;
}

/* ============================================
   🆕 AUKCIONO MINI KORTELĖ
   ============================================ */

#auctionMiniCardContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    min-height: 100px;
}

#auctionMiniCardContainer .mini-card {
    width: 80px;
    height: 120px;
    min-width: 80px;
    max-width: 80px;
    min-height: 120px;
    max-height: 120px;
    flex: 0 0 auto;
    background: #f5f0e8;
    border: 3px solid #3d2b1f;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* ============================================ */
/* WAITING ROOM – TELEFONUI */
/* ============================================ */

@media (max-width: 768px) {
    #waitingRoomOverlay > div > div:nth-child(3) {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    #waitingPlayersList {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================ */
/* 🌐 KALBOS PASIRINKIMAS */
/* ============================================ */
.lang-btn {
    padding: 6px 10px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: #ffd700;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.lang-btn:hover {
    background: rgba(255,215,0,0.2);
    transform: scale(1.05);
}

.lang-btn.active {
    background: #ffd700;
    color: #1a3b1a;
}

/* 🌐 Kalbos mygtukai – matomi visada */
#langSwitcher {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 999999 !important;
    display: flex !important;
    gap: 5px !important;
    pointer-events: auto !important;
}

#langSwitcher .lang-btn {
    padding: 6px 10px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    background: rgba(0,0,0,0.8);
    color: #ffd700;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    z-index: 999999;
}

#langSwitcher .lang-btn:hover {
    background: rgba(255,215,0,0.3);
    transform: scale(1.05);
}

#langSwitcher .lang-btn.active {
    background: #ffd700;
    color: #1a3b1a;
    box-shadow: 0 0 15px rgba(255,215,0,0.8);
}

/* 🌐 Paslėpti viršutinį kalbos pasirinkimą, kai aktyvus page-game */
body:has(#page-game.active) #langSwitcher {
    display: none !important;
}

/* 🌐 Rodyti kalbos pasirinkimą žaidimo lange tik kai page-game aktyvus */
#gameLangSwitcher {
    display: none;
}

body:has(#page-game.active) #gameLangSwitcher {
    display: flex !important;
}