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

        :root {
            --gold: #FFD700;
            --board-bg: #C8E6C9;
            --sidebar-bg: rgba(26, 26, 46, 0.95);
        }

        body {
            font-family: 'Montserrat', sans-serif;
            background: radial-gradient(circle at center, #1a1a2e 0%, #0f3460 100%);
            min-height: 100vh;
            color: #fff;
            overflow-x: hidden;
            font-size: 0.85rem;
            background-attachment: fixed;
        }

        /* Layout */
        .game-wrapper {
            display: flex;
            width: 100vw;
            height: 100vh;
            padding: 20px;
            gap: 20px;
            align-items: stretch;
        }

        .side-panel {
            width: 320px;
            flex-shrink: 0;
            /* Prevent panel from resizing */
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: rgba(18, 20, 29, 0.7);
            backdrop-filter: blur(25px) saturate(180%);
            -webkit-backdrop-filter: blur(25px) saturate(180%);
            border-radius: 20px;
            padding: 18px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        }

        .side-panel.collapsed {
            transform: translateX(-100%);
            opacity: 0;
            pointer-events: none;
            width: 0;
            padding: 0;
            margin: 0;
            overflow: hidden;
        }

        #rightPanel.collapsed {
            transform: translateX(100%);
        }

        .panel-toggle {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1000;
            width: 40px;
            height: 80px;
            background: rgba(18, 20, 29, 0.9);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        }

        /* Show panel toggles on all desktop screens (except mobile) */
        @media (min-width: 768px) {
            .panel-toggle {
                display: flex !important;
            }
        }

        /* Medium screens - ensure board fits */
        @media (min-width: 768px) and (max-width: 1200px) {
            .board {
                min-width: 600px;
                min-height: 600px;
            }

            /* Ensure center panel is scrollable */
            .center-panel {
                overflow: auto;
                -webkit-overflow-scrolling: touch;
            }
        }

        .panel-toggle:hover {
            background: rgba(18, 20, 29, 0.98);
            border-color: var(--gold);
            box-shadow: 2px 0 20px rgba(212, 175, 55, 0.5);
            transform: translateY(-50%) scale(1.05);
        }
        
        .panel-toggle:active {
            transform: translateY(-50%) scale(0.95);
        }

        .panel-toggle-left {
            left: 0;
        }

        .panel-toggle-right {
            right: 0;
            border-radius: 8px 0 0 8px;
        }

        .panel-toggle-icon {
            color: var(--gold);
            font-size: 1.4rem;
            font-weight: 900;
            transition: all 0.3s ease;
            text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
        }

        .panel-toggle:hover .panel-toggle-icon {
            transform: scale(1.3);
            text-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
        }
        
        /* Icon rotation is handled by JavaScript, but we can add visual feedback */
        .panel-toggle.active {
            background: rgba(212, 175, 55, 0.2);
            border-color: var(--gold);
        }

        .center-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }

        .game-header h1 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 3.5rem;
            background: linear-gradient(to right, var(--gold), #ffdf5d, var(--gold));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.5));
            letter-spacing: 12px;
            margin-bottom: 20px;
            text-align: center;
            text-transform: uppercase;
        }

        @keyframes glowTitle {
            from {
                filter: drop-shadow(0 0 5px var(--gold));
            }

            to {
                filter: drop-shadow(0 0 20px var(--gold));
            }
        }

        .board-container {
            position: relative;
            width: min(88vh, 90vw);
            height: min(88vh, 90vw);
            perspective: 2000px;
            /* Keep for toggle support */
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            overflow: visible;
            /* Mobile optimizations */
            will-change: transform;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }

        .board-container.tilt-active {
            perspective: 2000px;
        }

        .board {
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: repeat(11, 1fr);
            grid-template-rows: repeat(11, 1fr);
            background: var(--board-bg, #fff);
            border: 12px solid #1a1a1a;
            border-radius: 12px;
            box-shadow:
                0 30px 100px rgba(0, 0, 0, 0.7),
                inset 0 0 40px rgba(0, 0, 0, 0.2);
            position: relative;
            overflow: visible;
        }

        /* Premium Bezel Effect */
        .board::before {
            content: '';
            position: absolute;
            inset: -15px;
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 16px;
            pointer-events: none;
            z-index: -1;
            box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
        }

        .board-container:hover .board {
            transform: none;
        }


        .board-center {
            grid-column: 2 / 11;
            grid-row: 2 / 11;
            background: transparent;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 0;
            gap: 8px;
        }

        .board-center::before {
            content: '';
            position: absolute;
            inset: 3%;
            border: 1px solid rgba(212, 175, 55, 0.04);
            border-radius: 50%;
            animation: rotateBorder 120s linear infinite;
        }

        .center-logo {
            display: none;
        }

        .center-logo::after {
            display: none;
        }

        .dice-container {
            display: flex;
            gap: 20px;
            margin: 20px 0 10px 0;
            pointer-events: auto;
            flex-direction: row;
            align-items: center;
            justify-content: center;
        }
        
        /* Passive state for dice when no more rolls available */
        .dice-container.passive .dice {
            opacity: 0.4;
            background: linear-gradient(145deg, #888 0%, #666 50%, #555 100%);
            filter: grayscale(0.7);
            cursor: default;
            pointer-events: none;
            box-shadow:
                0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 0 2px #555,
                0 0 0 4px rgba(85, 85, 85, 0.2),
                inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .dice-container.passive .dice:hover {
            transform: none;
            box-shadow:
                0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 0 2px #555,
                0 0 0 4px rgba(85, 85, 85, 0.2),
                inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        /* Next Turn Button in Board Center */
        .btn-next-turn-center {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(56, 142, 60, 0.9) 50%, rgba(45, 80, 22, 0.85) 100%);
            color: white;
            border: 1px solid rgba(76, 175, 80, 0.6);
            box-shadow: 
                0 8px 24px rgba(76, 175, 80, 0.4),
                0 4px 12px rgba(76, 175, 80, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.25);
            font-weight: 700;
            font-size: 1.6rem;
            padding: 12px 24px;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 12px;
            min-height: 50px;
            min-width: 50px;
            margin-top: 8px;
            cursor: pointer;
            z-index: 200;
            position: relative;
        }

        .btn-next-turn-center:hover {
            background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 0.95) 50%, rgba(45, 80, 22, 0.9) 100%);
            box-shadow: 
                0 12px 32px rgba(76, 175, 80, 0.5),
                0 6px 16px rgba(76, 175, 80, 0.4),
                inset 0 2px 6px rgba(255, 255, 255, 0.3);
            transform: translateY(-3px) scale(1.05);
            border-color: rgba(76, 175, 80, 0.8);
        }

        .btn-next-turn-center:active {
            transform: translateY(-1px) scale(1.02);
        }
        
        /* Mobile adjustments for center button */
        @media (max-width: 900px) {
            .btn-next-turn-center {
                font-size: 1.3rem;
                padding: 10px 20px;
                min-height: 45px;
                min-width: 45px;
            }
        }

        .dice {
            width: clamp(50px, 10vw, 70px);
            height: clamp(50px, 10vw, 70px);
            background: linear-gradient(145deg, #fffef8 0%, #f5f0e6 50%, #ebe4d4 100%);
            border-radius: 14px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, 1fr);
            padding: 10px;
            box-shadow:
                0 8px 25px rgba(0, 0, 0, 0.4),
                0 0 0 3px #c9a227,
                0 0 0 6px rgba(201, 162, 39, 0.3),
                inset 0 3px 6px rgba(255, 255, 255, 0.9),
                inset 0 -3px 6px rgba(139, 105, 20, 0.15);
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
            position: relative;
            z-index: 100;
            will-change: transform;
            transform: translateZ(0);
            /* Mobile touch optimizations */
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
            -webkit-user-select: none;
        }

        .dice:hover {
            transform: scale(1.15) translateY(-3px) translateZ(0);
            box-shadow:
                0 10px 30px rgba(0, 0, 0, 0.5),
                0 0 0 4px rgba(212, 175, 55, 0.5),
                0 0 25px rgba(212, 175, 55, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.8);
        }

        .dice:active {
            transform: scale(1.05);
        }

        .dice.rolling {
            animation: rollDice 0.5s ease-out;
            will-change: transform;
        }

        @keyframes rollDice {
            0% {
                transform: rotate(0deg) scale(1);
            }

            50% {
                transform: rotate(180deg) scale(1.2);
            }

            100% {
                transform: rotate(360deg) scale(1);
            }
        }

        .setup-screen {
            position: fixed;
            inset: 0;
            z-index: 5000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding: 20px;
            overflow-y: auto;
            background: #020205;
            transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s, background 0.5s ease;
            padding: 40px 20px;
        }

        .setup-screen.hidden {
            display: none;
        }

        .setup-screen::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(5, 5, 20, 0.9), rgba(15, 15, 35, 0.7)),
                url('hero-bg.jpg') no-repeat center center/cover;
            z-index: 0;
            animation: bgZoom 60s infinite alternate ease-in-out;
            opacity: 1;
        }

        .setup-container {
            width: min(1100px, 95vw);
            display: grid;
            grid-template-columns: 0.85fr 1.15fr;
            gap: 18px;
            background: rgba(10, 10, 25, 0.4);
            backdrop-filter: blur(40px) saturate(180%);
            -webkit-backdrop-filter: blur(40px) saturate(180%);
            border-radius: 28px;
            padding: 22px;
            border: 1px solid rgba(255, 215, 0, 0.15);
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
            position: relative;
            z-index: 5;
            margin-top: 20px;
            margin-bottom: 20px;
            align-items: start;
        }

        .setup-left {
            display: flex;
            flex-direction: column;
            gap: 12px;
            align-items: stretch;
        }
        
        /* Web view: Align start and resume buttons at the same height */
        @media (min-width: 901px) {
            .setup-container {
                align-items: stretch;
            }
            
            .setup-left,
            .setup-right {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
            }
            
            .btn-start-game,
            .btn-resume-game {
                margin-top: auto;
            }
        }

        .setup-right {
            display: flex;
            flex-direction: column;
            gap: 14px;
            align-items: stretch;
        }

        .setup-card {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 14px;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: transform 0.3s ease, border-color 0.3s ease;
        }

        .setup-left .setup-card {
            padding: 10px;
        }

        .setup-card:hover {
            border-color: rgba(212, 175, 55, 0.3);
        }

        .setup-title {
            color: var(--gold);
            font-size: 0.75rem;
            letter-spacing: 1.2px;
            text-transform: uppercase;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 800;
        }

        .setup-left .setup-title {
            font-size: 0.65rem;
            margin-bottom: 8px;
            gap: 5px;
        }

        .player-config-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }

        .player-config-slot {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(255, 255, 255, 0.03);
            padding: 10px 14px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            transition: all 0.3s ease;
        }

        .player-config-slot:hover {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(212, 175, 55, 0.3);
        }

        .rule-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .rule-item:last-child {
            border-bottom: none;
        }

        .rule-item:hover {
            background: rgba(255, 255, 255, 0.07);
            border-color: rgba(212, 175, 55, 0.3);
        }

        .rule-item label {
            font-size: 0.65rem !important;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.5);
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .rule-input {
            background: rgba(0, 0, 0, 0.2) !important;
            border: 1px solid rgba(212, 175, 55, 0.1) !important;
            border-radius: 6px !important;
            color: var(--gold) !important;
            font-weight: 800 !important;
            width: 70px;
            text-align: center;
            padding: 4px;
            outline: none;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.8rem !important;
        }

        .rule-input:focus {
            border-bottom-color: var(--gold) !important;
        }

        .rule-toggle {
            width: 48px;
            height: 26px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 13px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 
                inset 0 2px 4px rgba(0, 0, 0, 0.2),
                0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .rule-toggle:hover {
            border-color: rgba(212, 175, 55, 0.3);
            background: rgba(255, 255, 255, 0.08);
        }

        .rule-toggle.on {
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.6) 100%);
            border-color: rgba(212, 175, 55, 0.5);
            box-shadow: 
                inset 0 2px 4px rgba(0, 0, 0, 0.2),
                0 2px 8px rgba(212, 175, 55, 0.3);
        }

        .rule-toggle.on:hover {
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.5) 0%, rgba(212, 175, 55, 0.7) 100%);
            border-color: rgba(212, 175, 55, 0.6);
        }

        .rule-toggle.on::after {
            left: 24px;
            background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .rule-toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 20px;
            height: 20px;
            background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
            border-radius: 50%;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }


        .dot {
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }

        .dot.active {
            background: #c41e3a;
            /* Keeping original as the provided edit was syntactically incorrect for this line */
        }

        /* Token colors added based on instruction "Polished token colors and borders" */
        .token-red {
            background: #e53935;
            box-shadow: 0 0 10px rgba(229, 57, 53, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.3);
        }

        .token-blue {
            background: #1e88e5;
            box-shadow: 0 0 10px rgba(30, 136, 229, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.3);
        }

        .token-green {
            background: #43a047;
            box-shadow: 0 0 10px rgba(67, 160, 71, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.3);
        }

        .token-yellow {
            background: #fbc02d;
            color: #000;
            box-shadow: 0 0 10px rgba(251, 192, 45, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.3);
        }

        .square {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
            border: 1.5px solid rgba(0, 0, 0, 0.12);
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: visible;
            cursor: pointer;
            font-size: clamp(7px, 1.3vw, 11px);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            backdrop-filter: blur(8px) saturate(120%);
            -webkit-backdrop-filter: blur(8px) saturate(120%);
            will-change: transform;
            /* Mobile touch optimizations */
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            /* Premium card effect */
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
            border-radius: 2px;
        }

        .square:hover {
            z-index: 100;
            transform: scale(1.18) translateZ(30px) rotateY(2deg);
            box-shadow:
                0 25px 60px rgba(0, 0, 0, 0.5),
                0 10px 30px rgba(212, 175, 55, 0.4),
                0 0 0 2px rgba(212, 175, 55, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.95);
            background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
            border-color: var(--gold);
            border-width: 2px;
        }

        .square.owned {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 240, 0.95) 100%);
            box-shadow: 
                0 3px 10px rgba(0, 0, 0, 0.12),
                0 1px 4px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.95),
                inset 0 -1px 0 rgba(212, 175, 55, 0.1);
            border-color: rgba(212, 175, 55, 0.25);
        }

        .square.current {
            animation: currentPulse 1.5s ease-in-out infinite;
            z-index: 10;
            will-change: box-shadow, outline;
        }

        @keyframes currentPulse {

            0%,
            100% {
                box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
                outline: 3px solid var(--gold);
            }

            50% {
                box-shadow: 0 0 25px rgba(255, 215, 0, 0.8), 0 0 50px rgba(255, 215, 0, 0.4);
                outline: 4px solid var(--gold);
            }
        }

        .color-bar {
            height: 30%;
            width: 100%;
            border-bottom: 2px solid rgba(0, 0, 0, 0.15);
            box-shadow: 
                inset 0 -3px 6px rgba(0, 0, 0, 0.12),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .color-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
            pointer-events: none;
        }

        .color-bar .square-name {
            position: relative;
            z-index: 2;
            font-weight: 900;
            font-size: clamp(6px, 1.1vw, 10px);
            line-height: 1.2;
            color: #fff;
            text-shadow: 
                -1px -1px 0 rgba(0, 0, 0, 0.8), 
                1px -1px 0 rgba(0, 0, 0, 0.8), 
                -1px 1px 0 rgba(0, 0, 0, 0.8), 
                1px 1px 0 rgba(0, 0, 0, 0.8),
                0 0 4px rgba(0, 0, 0, 0.6),
                0 2px 4px rgba(0, 0, 0, 0.4);
            letter-spacing: 0.5px;
            padding: 0 4px;
            text-align: center;
        }

        .owner-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            top: 0;
            text-align: center;
            font-size: clamp(5px, 0.85vw, 7px);
            font-weight: 700;
            text-transform: uppercase;
            color: #fff;
            text-shadow: 
                -1px -1px 0 rgba(0, 0, 0, 0.9), 
                1px -1px 0 rgba(0, 0, 0, 0.9), 
                -1px 1px 0 rgba(0, 0, 0, 0.9), 
                1px 1px 0 rgba(0, 0, 0, 0.9), 
                0 0 4px rgba(0, 0, 0, 0.8),
                0 1px 2px rgba(0, 0, 0, 0.6);
            z-index: 10;
            pointer-events: none;
            letter-spacing: 0.4px;
            padding: 0 4px;
            line-height: 1.2;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .owner-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 20px;
            transition: all 0.3s ease;
            z-index: 5;
            opacity: 0.9 !important;
            border-top: 2px solid rgba(0, 0, 0, 0.3);
            box-shadow:
                inset 0 3px 6px rgba(255, 255, 255, 0.25),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2),
                0 -1px 2px rgba(0, 0, 0, 0.1);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .square-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2px 3px 6px 3px;
            text-align: center;
            position: relative;
            z-index: 2;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
        }

        .square-name {
            font-weight: 900;
            font-size: clamp(6px, 1.1vw, 10px);
            line-height: 1.2;
            color: #1a1a1a;
            margin-bottom: 4px;
            text-shadow: 
                0 1px 2px rgba(255, 255, 255, 0.9),
                0 0 1px rgba(0, 0, 0, 0.1);
            letter-spacing: 0.4px;
            padding: 0 2px;
        }

        /* Override for square-name inside color-bar */
        .color-bar .square-name {
            margin-bottom: 0;
        }

        .square-price {
            font-size: clamp(7px, 1.2vw, 11px);
            font-weight: 600;
            color: #0d4a0d;
            background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 1) 50%, rgba(45, 80, 22, 1) 100%);
            padding: 5px 9px;
            border-radius: 8px;
            border: 1.5px solid rgba(45, 80, 22, 0.8);
            box-shadow: 
                0 3px 8px rgba(0, 0, 0, 0.3),
                0 1px 4px rgba(0, 0, 0, 0.2),
                inset 0 2px 4px rgba(255, 255, 255, 0.7),
                inset 0 -1px 2px rgba(0, 0, 0, 0.2);
            text-shadow: 
                0 1px 4px rgba(255, 255, 255, 1),
                0 0 3px rgba(0, 0, 0, 0.5),
                0 1px 2px rgba(0, 0, 0, 0.3);
            display: inline-block;
            position: relative;
            margin-top: -4px;
            margin-bottom: 0;
            letter-spacing: 0.5px;
            opacity: 1;
            /* Remove blur effects for clarity */
            filter: none;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }

        .square-price::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
            border-radius: 8px;
            pointer-events: none;
            /* Further reduce blur effect for clarity */
            opacity: 0.25;
        }

        .square-price::after {
            content: '';
            position: absolute;
            top: 1px;
            left: 1px;
            right: 1px;
            height: 40%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
            border-radius: 8px 8px 0 0;
            pointer-events: none;
            /* Further reduce blur effect for clarity */
            opacity: 0.2;
        }

        .corner {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            font-weight: 900;
            padding: 6px;
            text-align: center;
            font-size: clamp(6px, 1vw, 9px);
            box-shadow: 
                0 3px 10px rgba(0, 0, 0, 0.15),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(0, 0, 0, 0.1);
            border-radius: 4px;
        }

        .corner-go {
            background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 50%, #e8ffe8 100%);
            color: #1a8d1a;
            border: 2px solid #2e7d32;
        }

        .corner-jail {
            background: linear-gradient(135deg, #ffb74d 0%, #ff9800 50%, #f57c00 100%);
            color: #3e2723;
            border: 2px solid #bf360c;
        }

        .corner-parking {
            background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%);
            color: white;
            border: 2px solid #b71c1c;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .corner-gotojail {
            background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 50%, #303f9f 100%);
            color: white;
            border: 2px solid #1a237e;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }

        .corner-icon {
            font-size: clamp(12px, 2.5vw, 22px);
            margin-bottom: 2px;
        }

        .chance {
            background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 50%, #ffe082 100%);
            border-left: 4px solid #ff6f00 !important;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset -4px 0 8px rgba(255, 111, 0, 0.2);
        }

        .chest {
            background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
            border-left: 4px solid #1565c0 !important;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset -4px 0 8px rgba(21, 101, 192, 0.2);
        }

        .tax {
            background: linear-gradient(145deg, #fce4ec 0%, #f8bbd9 50%, #f48fb1 100%);
            border-left: 4px solid #c2185b !important;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset -4px 0 8px rgba(194, 24, 91, 0.2);
        }

        .railroad {
            background: linear-gradient(145deg, #fafafa 0%, #eeeeee 50%, #e0e0e0 100%);
            border-left: 4px solid #424242 !important;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset -4px 0 8px rgba(66, 66, 66, 0.2);
        }

        .utility {
            background: linear-gradient(145deg, #f3e5f5 0%, #e1bee7 50%, #ce93d8 100%);
            border-left: 4px solid #7b1fa2 !important;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset -4px 0 8px rgba(123, 31, 162, 0.2);
        }

        .tokens-box {
            position: absolute;
            bottom: 22%;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 3px;
            flex-wrap: wrap;
            justify-content: center;
            z-index: 50;
        }

        .token {
            width: clamp(20px, 3vw, 28px);
            height: clamp(20px, 3vw, 28px);
            border-radius: 50%;
            border: 3px solid white;
            box-shadow:
                0 4px 8px rgba(0, 0, 0, 0.5),
                0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: clamp(14px, 2.2vw, 18px);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
            user-select: none;
            z-index: 50;
            position: relative;
            will-change: transform, left, top;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
            /* GPU acceleration for smooth animations */
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        .token::after {
            content: '';
            position: absolute;
            inset: 2px;
            border-radius: 50%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
            pointer-events: none;
        }

        .active-token {
            width: clamp(26px, 3.5vw, 36px);
            height: clamp(26px, 3.5vw, 36px);
            z-index: 200;
            animation: tokenPulse 1.2s infinite ease-in-out;
            box-shadow:
                0 0 20px rgba(255, 215, 0, 0.9),
                0 0 40px rgba(255, 215, 0, 0.5),
                0 6px 12px rgba(0, 0, 0, 0.5);
            border: 3px solid var(--gold) !important;
        }

        @keyframes tokenPulse {
            0% {
                transform: translateY(0) scale(1.05);
            }

            50% {
                transform: translateY(-3px) scale(1.15);
            }

            100% {
                transform: translateY(0) scale(1.05);
            }
        }

        .square.current-active {
            box-shadow: inset 0 0 25px var(--gold);
            border-color: var(--gold) !important;
            z-index: 5;
        }

        .token.bounce {
            animation: tokenBounce 0.4s ease;
        }

        @keyframes tokenBounce {

            0%,
            100% {
                transform: translateY(0) scale(1.1);
            }

            50% {
                transform: translateY(-20px) scale(1.3);
            }
        }

        .token.jumping {
            animation: tokenBounce 0.3s ease-in-out;
        }

        .token-red {
            background: linear-gradient(135deg, #f44336, #c62828);
        }

        .token-blue {
            background: linear-gradient(135deg, #2196f3, #1565c0);
        }

        .token-green {
            background: linear-gradient(135deg, #4caf50, #2e7d32);
        }

        .token-yellow {
            background: linear-gradient(135deg, #ffeb3b, #f9a825);
            border-color: #333;
        }

        .buildings {
            position: absolute;
            top: -5px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 2px;
            z-index: 20;
        }

        .house {
            width: clamp(8px, 1.5vw, 14px);
            height: clamp(8px, 1.5vw, 14px);
            background: #2e7d32;
            clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
            filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
            border: 1px solid #1b5e20;
        }

        .hotel {
            width: clamp(14px, 2.5vw, 22px);
            height: clamp(10px, 1.8vw, 16px);
            background: #c62828;
            border-radius: 3px;
            filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
            border: 1px solid #8e0000;
        }

        .players-panel {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 8px;
            width: 100%;
            max-width: 620px;
            padding: 8px;
        }

        .player-card {
            background: rgba(255, 255, 255, 0.04);
            backdrop-filter: blur(15px);
            border-radius: 16px;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .player-card.active {
            border-color: var(--gold);
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
            background: rgba(255, 215, 0, 0.05);
            transform: translateY(-5px) scale(1.02);
        }

        .player-card.active::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
            animation: cardShine 3s infinite;
        }

        @keyframes cardShine {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        .player-card.bankrupt {
            opacity: 0.35;
            filter: grayscale(1);
        }

        .player-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }

        .player-token-icon {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: 3px solid white;
        }

        .player-name {
            font-weight: 700;
            font-size: 0.8rem;
        }

        .player-money {
            font-size: 0.9rem;
            font-weight: 800;
            color: var(--gold);
        }

        .player-money.up {
            animation: moneyUp 0.4s;
            color: #4caf50;
        }

        .player-money.down {
            animation: moneyDown 0.4s;
            color: #f44336;
        }

        @keyframes moneyUp {
            50% {
                transform: scale(1.15);
            }
        }

        @keyframes moneyDown {
            50% {
                transform: scale(0.9);
            }
        }

        .player-props {
            display: flex;
            flex-wrap: wrap;
            gap: 2px;
            margin-top: 6px;
        }

        .prop-dot {
            width: 10px;
            height: 10px;
            border-radius: 2px;
        }

        .controls {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            padding: 10px;
        }

        .controls-vertical {
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: rgba(255, 255, 255, 0.1);
            padding: 12px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
        }

        /* Compact UI Settings for Web */
        .ui-settings {
            padding: 8px !important;
            margin-bottom: 10px !important;
            gap: 6px !important;
        }

        .ui-settings > div {
            margin-bottom: 8px !important;
            margin-top: 6px !important;
        }

        .ui-settings > div:first-child {
            margin-bottom: 8px !important;
        }

        .ui-settings span {
            font-size: 0.65rem !important;
            letter-spacing: 0.5px !important;
        }

        .ui-settings label {
            font-size: 0.65rem !important;
            margin-bottom: 4px !important;
        }

        .ui-settings input[type="range"] {
            margin: 4px 0 !important;
        }

        .ui-settings > div[style*="display:flex"] {
            margin-top: 6px !important;
            margin-bottom: 0 !important;
        }

        /* Compact theme selector buttons */
        .ui-settings > div > div[style*="display:flex"][style*="gap"] {
            gap: 5px !important;
        }

        .ui-settings > div > div[style*="display:flex"][style*="gap"] > div[onclick*="setTheme"] {
            width: 16px !important;
            height: 16px !important;
            border-width: 1px !important;
        }

        /* Compact toggle switches */
        .ui-settings .rule-toggle {
            transform: scale(0.75) !important;
        }

        /* Compact language button */
        .ui-settings > div > div[onclick*="toggleLang"] {
            font-size: 0.65rem !important;
            padding: 2px 6px !important;
        }

        .ai-waiting-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(2px);
            z-index: 99;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            display: none;
            pointer-events: none;
        }

        .ai-waiting-overlay.active {
            display: flex;
        }

        /* AI sırasında "Turu Atla" butonunu her zaman görünür yap */
        .controls-vertical #endBtn {
            position: relative;
            z-index: 101;
            background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%) !important;
        }

        .mobile-bottom-bar #mobEndBtn {
            position: relative;
            z-index: 101;
            background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%) !important;
        }

        /* AI overlay'i butonları engellemesin */
        .ai-waiting-overlay.active ~ #endBtn,
        .controls-vertical #endBtn {
            pointer-events: auto !important;
            opacity: 1 !important;
        }

        .loading-dots:after {
            content: ' .';
            animation: dots 1.5s steps(5, end) infinite;
        }

        @keyframes dots {

            0%,
            20% {
                content: ' .';
            }

            40% {
                content: ' ..';
            }

            60% {
                content: ' ...';
            }

            80%,
            100% {
                content: '';
            }
        }

        .btn {
            padding: 16px 28px;
            border: none;
            border-radius: 16px;
            font-family: var(--font-main);
            font-weight: 800;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            text-transform: uppercase;
            letter-spacing: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            position: relative;
            overflow: hidden;
            /* Premium glassmorphism effect */
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            /* Subtle inner glow */
            box-shadow: 
                0 4px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            /* Mobile touch optimizations */
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
            -webkit-user-select: none;
        }
        
        /* Compact buttons for controls panel */
        .side-panel .btn {
            padding: 12px 20px;
            font-size: 0.85rem;
            letter-spacing: 1.5px;
            border-radius: 12px;
        }
        
        .side-panel .btn-action,
        .side-panel .btn-secondary {
            padding: 10px 16px;
            font-size: 0.8rem;
            letter-spacing: 1.2px;
        }

        /* Elegant shine effect on hover */
        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s ease;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn:active {
            transform: scale(0.95);
            transition: transform 0.1s ease;
        }

        .btn:disabled {
            opacity: 0.4;
            filter: grayscale(1);
            background: rgba(100, 100, 100, 0.2) !important;
            color: rgba(255, 255, 255, 0.5) !important;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
            box-shadow: none !important;
            cursor: not-allowed;
            animation: none !important;
            text-shadow: none;
        }

        body.theme-marble .btn:disabled,
        body.theme-parchment .btn:disabled {
            background: rgba(0, 0, 0, 0.05) !important;
            color: rgba(0, 0, 0, 0.3) !important;
            border: 1px solid rgba(0, 0, 0, 0.1) !important;
        }

        .btn-roll {
            background: linear-gradient(135deg, #ffd700 0%, #f4d03f 25%, #f9e79f 50%, #f4d03f 75%, #d4af37 100%);
            color: #000;
            box-shadow: 
                0 8px 32px rgba(212, 175, 55, 0.4),
                0 4px 16px rgba(212, 175, 55, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.4),
                inset 0 -2px 4px rgba(139, 105, 20, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
            font-weight: 900;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
        }

        .btn-roll:hover {
            box-shadow: 
                0 12px 40px rgba(212, 175, 55, 0.6),
                0 6px 20px rgba(212, 175, 55, 0.4),
                inset 0 2px 6px rgba(255, 255, 255, 0.5),
                inset 0 -2px 6px rgba(139, 105, 20, 0.3);
            transform: translateY(-3px) scale(1.02);
            background: linear-gradient(135deg, #ffed4e 0%, #ffd700 25%, #f9e79f 50%, #ffd700 75%, #f4d03f 100%);
        }

        .btn-roll:active {
            transform: translateY(-1px) scale(0.98);
        }

        .btn-roll:disabled {
            opacity: 0.3;
            background: #555;
            box-shadow: none;
            cursor: not-allowed;
        }

        /* Passive state for human players when dice is rolled and no more rolls available */
        .btn-roll.passive {
            opacity: 0.4;
            background: linear-gradient(135deg, #555 0%, #444 25%, #333 50%, #444 75%, #555 100%);
            color: rgba(255, 255, 255, 0.4);
            box-shadow: 
                0 2px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 2px rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.05);
            cursor: default;
            pointer-events: none;
            filter: grayscale(0.6);
        }

        .btn-roll.passive:hover {
            transform: none;
            box-shadow: 
                0 2px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 2px rgba(0, 0, 0, 0.4);
            background: linear-gradient(135deg, #555 0%, #444 25%, #333 50%, #444 75%, #555 100%);
            filter: grayscale(0.6);
        }

        /* Next Turn Button - Elegant design */
        .btn-next-turn {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(56, 142, 60, 0.9) 50%, rgba(45, 80, 22, 0.85) 100%);
            color: white;
            border: 1px solid rgba(76, 175, 80, 0.6);
            box-shadow: 
                0 8px 24px rgba(76, 175, 80, 0.4),
                0 4px 12px rgba(76, 175, 80, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.25);
            font-weight: 700;
            font-size: 1.8rem;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 12px;
            min-height: 56px;
        }

        .btn-next-turn:hover {
            background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 0.95) 50%, rgba(45, 80, 22, 0.9) 100%);
            box-shadow: 
                0 12px 32px rgba(76, 175, 80, 0.5),
                0 6px 16px rgba(76, 175, 80, 0.4),
                inset 0 2px 6px rgba(255, 255, 255, 0.3);
            transform: translateY(-3px) scale(1.05);
            border-color: rgba(76, 175, 80, 0.8);
        }

        .btn-next-turn:active {
            transform: translateY(-1px) scale(1.02);
        }

        .btn-action {
            background: linear-gradient(135deg, #4caf50 0%, #43a047 50%, #2e7d32 100%);
            color: white;
            box-shadow: 
                0 6px 24px rgba(67, 160, 71, 0.35),
                0 3px 12px rgba(67, 160, 71, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(76, 175, 80, 0.3);
            font-weight: 800;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
            position: relative;
        }

        .btn-action:hover {
            box-shadow: 
                0 10px 32px rgba(67, 160, 71, 0.5),
                0 5px 16px rgba(67, 160, 71, 0.35),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(0, 0, 0, 0.3);
            transform: translateY(-2px) scale(1.02);
            background: linear-gradient(135deg, #66bb6a 0%, #4caf50 50%, #43a047 100%);
        }

        .btn-action:active {
            transform: translateY(0) scale(0.98);
        }

        .btn-secondary {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
            color: white;
            border: 1.5px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(12px) saturate(180%);
            -webkit-backdrop-filter: blur(12px) saturate(180%);
            box-shadow: 
                0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
            font-weight: 700;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
            border-color: var(--gold);
            box-shadow: 
                0 6px 24px rgba(212, 175, 55, 0.3),
                0 3px 12px rgba(0, 0, 0, 0.25),
                inset 0 2px 4px rgba(255, 255, 255, 0.2),
                inset 0 -2px 4px rgba(0, 0, 0, 0.15);
            transform: translateY(-2px) scale(1.02);
        }

        .btn-secondary:active {
            transform: translateY(0) scale(0.98);
        }

        .btn-end {
            background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%);
            color: white;
            box-shadow: 
                0 6px 24px rgba(229, 57, 53, 0.4),
                0 3px 12px rgba(229, 57, 53, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(229, 57, 53, 0.4);
            font-weight: 900;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .btn-end:hover {
            box-shadow: 
                0 10px 32px rgba(229, 57, 53, 0.6),
                0 5px 16px rgba(229, 57, 53, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.3),
                inset 0 -2px 4px rgba(0, 0, 0, 0.4);
            transform: translateY(-2px) scale(1.02);
            background: linear-gradient(135deg, #ff6b6b 0%, #ef5350 50%, #e53935 100%);
        }

        .btn-end:active {
            transform: translateY(0) scale(0.98);
        }
        
        /* Passive state for end button when center button is shown */
        .btn-end.passive {
            opacity: 0.5;
            cursor: default;
            pointer-events: none;
        }
        
        .btn-end.passive:hover {
            transform: none;
            box-shadow: 
                0 6px 24px rgba(229, 57, 53, 0.4),
                0 3px 12px rgba(229, 57, 53, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.3);
            background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%);
        }

        /* Rent Animation */
        .rent-money {
            position: fixed;
            z-index: 10000;
            font-size: 2rem;
            pointer-events: none;
            animation: flyMoney 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes flyMoney {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            100% {
                transform: scale(0.5);
                opacity: 0;
                top: var(--target-y);
                left: var(--target-x);
            }
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 15px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            border-radius: 15px;
            padding: 25px;
            max-width: 420px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            border: 2px solid var(--gold);
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from {
                transform: scale(0.85) translateY(30px);
                opacity: 0;
            }

            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
        }

        /* Physical Card Visuals and Animation */
        #cardModal.active .modal {
            animation: cardFlipIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            background: #fff !important;
            color: #222 !important;
            border: none !important;
            max-width: 340px;
            padding: 0 !important;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
            transform-style: preserve-3d;
        }

        #cardModal .modal h2 {
            margin: 0;
            padding: 20px;
            background: #ff9800;
            color: white !important;
            font-family: 'Bebas Neue', sans-serif;
            letter-spacing: 2px;
            font-size: 1.8rem;
            text-align: center;
        }

        #cardModal .card-inner {
            padding: 35px 25px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            background: #fff;
        }

        #cardModal .card-icon {
            font-size: 4rem;
            filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
            margin-bottom: 5px;
        }

        #cardModal .card-text {
            font-size: 1.1rem;
            font-weight: 700;
            line-height: 1.5;
            color: #333;
            margin: 0;
        }

        #cardModal .modal-buttons {
            padding: 15px 20px 20px;
            background: #f8f9fa;
            border-top: 1px solid #eee;
            display: flex;
        }

        #cardModal .btn-roll {
            height: 48px !important;
            font-size: 0.95rem !important;
            padding: 0 !important;
            width: 100%;
        }

        @keyframes cardFlipIn {
            0% {
                transform: rotateY(90deg) scale(0.8);
                opacity: 0;
            }

            100% {
                transform: rotateY(0deg) scale(1);
                opacity: 1;
            }
        }

        .gold-glow {
            text-shadow: 0 0 10px rgba(212, 175, 55, 0.8), 0 0 20px rgba(212, 175, 55, 0.4);
            animation: goldPulse 2s infinite alternate;
        }

        @keyframes goldPulse {
            from {
                opacity: 0.8;
                transform: scale(1);
            }

            to {
                opacity: 1;
                transform: scale(1.05);
            }
        }

        .modal h2 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.7rem;
            color: var(--gold);
            margin-bottom: 15px;
            text-align: center;
        }

        .modal-details {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 15px;
        }

        .modal-details p {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.85rem;
        }

        .modal-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .card-display {
            text-align: center;
            padding: 15px;
        }

        .card-inner {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 25px;
            animation: cardFlip 0.5s ease;
        }

        @keyframes cardFlip {
            0% {
                transform: rotateY(90deg);
            }

            100% {
                transform: rotateY(0);
            }
        }

        .card-icon {
            font-size: 3.5rem;
            margin-bottom: 12px;
        }

        .card-text {
            font-size: 1rem;
            line-height: 1.5;
        }

        .game-log {
            background: rgba(0, 0, 0, 0.35);
            border-radius: 8px;
            padding: 10px;
            max-height: 100px;
            overflow-y: auto;
            width: 100%;
            max-width: 620px;
            -webkit-overflow-scrolling: touch;
        }

        /* Stats modal log styling */
        #statsLogContent {
            background: rgba(0, 0, 0, 0.25);
            border-radius: 6px;
            padding: 8px;
            font-size: 0.75rem;
            line-height: 1.4;
            -webkit-overflow-scrolling: touch;
        }

        #statsLogContent .log-entry {
            padding: 3px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        #statsLogContent .log-entry:last-child {
            border-bottom: none;
        }

        :root {
            --gold: #d4af37;
            --gold-bright: #f9e29d;
            --bg-dark: #050508;
            --deep-slate: #0a0c10;
            --premium-blue: #16213e;
            --panel-bg: rgba(10, 12, 16, 0.7);
            --marble-bg: #fdfdfd;
            --paper-bg: #f4e4bc;
            --font-main: 'Montserrat', sans-serif;
            --transition-smooth: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        }

        body {
            background: #050508;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            height: 100vh;
            width: 100vw;
        }

        #bg-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -1;
            filter: blur(60px) brightness(0.3) saturate(1.2);
            opacity: 0.8;
            transition: background-image 1s ease-in-out;
            background-size: cover;
            background-position: center;
        }

        .tokens-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1000;
        }

        .token {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            cursor: default;
            user-select: none;
            transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
            background: white;
            z-index: 100;
            transform: translate(-50%, -50%);
        }

        .tokens-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1000;
        }

        .token {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            cursor: default;
            user-select: none;
            transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
            background: white;
            z-index: 100;
            transform: translate(-50%, -50%);
        }

        /* AI Speech Bubbles */
        .speech-bubble {
            position: absolute;
            bottom: 120%;
            left: 50%;
            transform: translateX(-50%) scale(0);
            background: white;
            color: #000;
            padding: 8px 12px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 700;
            white-space: nowrap;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            opacity: 0;
            border: 2px solid var(--gold);
        }

        .speech-bubble::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 8px solid transparent;
            border-top-color: var(--gold);
        }

        .speech-bubble.active {
            transform: translateX(-50%) scale(1);
            opacity: 1;
        }

        /* Trade Response Popup - Modern Premium Design */
        .trade-response-popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            z-index: 10000;
            background: linear-gradient(145deg, rgba(15, 15, 25, 0.95), rgba(25, 30, 50, 0.98));
            backdrop-filter: blur(25px) saturate(200%);
            -webkit-backdrop-filter: blur(25px) saturate(200%);
            border-radius: 24px;
            padding: 35px 40px;
            min-width: 320px;
            max-width: 90vw;
            text-align: center;
            border: 2px solid transparent;
            box-shadow:
                0 30px 80px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            opacity: 0;
            visibility: hidden;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .trade-response-popup.active {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) scale(1);
        }

        .trade-response-popup.accepted {
            border-color: #4caf50;
            box-shadow:
                0 30px 80px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(76, 175, 80, 0.3),
                0 0 80px rgba(76, 175, 80, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .trade-response-popup.rejected {
            border-color: #f44336;
            box-shadow:
                0 30px 80px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(244, 67, 54, 0.3),
                0 0 80px rgba(244, 67, 54, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .trade-response-icon {
            font-size: 4rem;
            margin-bottom: 15px;
            animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
            filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
        }

        .trade-response-popup.accepted .trade-response-icon {
            animation: popInBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
        }

        .trade-response-popup.rejected .trade-response-icon {
            animation: shakeIn 0.5s ease-out 0.1s both;
        }

        @keyframes popIn {
            0% {
                transform: scale(0);
                opacity: 0;
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        @keyframes popInBounce {
            0% {
                transform: scale(0) rotate(-10deg);
                opacity: 0;
            }

            60% {
                transform: scale(1.2) rotate(5deg);
            }

            100% {
                transform: scale(1) rotate(0deg);
                opacity: 1;
            }
        }

        @keyframes shakeIn {
            0% {
                transform: scale(0) rotate(0deg);
                opacity: 0;
            }

            40% {
                transform: scale(1.1) rotate(-8deg);
            }

            60% {
                transform: scale(1.1) rotate(8deg);
            }

            80% {
                transform: scale(1) rotate(-4deg);
            }

            100% {
                transform: scale(1) rotate(0deg);
                opacity: 1;
            }
        }

        .trade-response-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.8rem;
            letter-spacing: 3px;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .trade-response-popup.accepted .trade-response-title {
            background: linear-gradient(135deg, #4caf50, #81c784, #a5d6a7);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .trade-response-popup.rejected .trade-response-title {
            background: linear-gradient(135deg, #f44336, #ef5350, #ff8a80);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .trade-response-message {
            font-size: 1rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.85);
            line-height: 1.5;
        }

        .trade-response-player {
            color: var(--gold);
            font-weight: 800;
        }

        .trade-response-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .trade-response-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Responsive for mobile */
        /* Extra small mobile devices */
        @media (max-width: 600px) {
            /* Compact stats modal for mobile */
            #statsModal .modal {
                max-width: 95vw !important;
                max-height: 90vh !important;
            }

            #statsContent {
                gap: 8px !important;
                max-height: 40vh !important;
            }

            #statsLogContent {
                max-height: 25vh !important;
                font-size: 0.7rem !important;
            }

            #statsModalTitle {
                font-size: 1.1rem !important;
                margin-bottom: 12px !important;
            }

            #statsLogTitle {
                font-size: 0.9rem !important;
                margin-bottom: 8px !important;
            }

            /* Ultra-compact board for very small screens */
            .board-container {
                width: min(100vw, calc(100vh - 126px)) !important;
                height: min(100vw, calc(100vh - 126px)) !important;
                max-height: calc(100vh - 126px) !important;
                flex-shrink: 0;
                box-sizing: border-box;
            }

            .board {
                border-width: 8px !important;
            }

            /* Further reduce token size on very small screens */
            .token {
                width: clamp(14px, 3.5vw, 20px) !important;
                height: clamp(14px, 3.5vw, 20px) !important;
                font-size: clamp(10px, 2vw, 14px) !important;
                border-width: 2px !important;
            }

            .active-token {
                width: clamp(18px, 4vw, 26px) !important;
                height: clamp(18px, 4vw, 26px) !important;
            }

            /* Optimize square text for readability - smaller fonts on mobile */
            .square-name {
                font-size: clamp(3.5px, 0.7vw, 6px) !important;
                line-height: 1.0 !important;
                letter-spacing: 0.1px !important;
            }

            .color-bar .square-name {
                font-size: clamp(3.5px, 0.7vw, 6px) !important;
                line-height: 1.0 !important;
                letter-spacing: 0.1px !important;
            }

            .square-price {
                font-size: clamp(4px, 0.75vw, 6px) !important;
                font-weight: 500 !important;
                padding: 2px 4px !important;
                /* Remove blur effects for clarity on very small screens */
                filter: none !important;
                -webkit-font-smoothing: antialiased !important;
                -moz-osx-font-smoothing: grayscale !important;
                text-rendering: optimizeLegibility !important;
                background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 0.98) 50%, rgba(45, 80, 22, 0.96) 100%) !important;
                color: #0d4a0d !important;
                text-shadow: 
                    0 1px 2px rgba(255, 255, 255, 1),
                    0 0 1px rgba(0, 0, 0, 0.5) !important;
                letter-spacing: 0.2px !important;
            }

            .square-price::before,
            .square-price::after {
                opacity: 0.3 !important;
            }

            .owner-info {
                font-size: clamp(3px, 0.6vw, 5px) !important;
                letter-spacing: 0.1px !important;
            }

            .owner-bar {
                height: 14px !important;
            }

            .corner-icon {
                font-size: clamp(8px, 1.8vw, 16px) !important;
            }

            /* Reduce building indicators size */
            .buildings {
                font-size: clamp(6px, 1.2vw, 10px) !important;
            }

            .credit-badge {
                bottom: 8px;
                right: 12px;
                font-size: 0.6rem;
                padding: 5px 12px;
            }

            .credit-badge span {
                margin-left: 3px;
            }

            .credit-badge small {
                margin-left: 6px !important;
                font-size: 0.5rem !important;
            }

            .btn-theme-selector {
                padding: 12px 16px;
                font-size: 0.85rem;
            }

            .theme-modal-grid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
            }

            .theme-card-modal {
                padding: 10px;
            }

            .theme-card-modal div {
                height: 40px !important;
            }

            .map-modal-grid {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
            }

            .map-card-modal {
                padding: 14px;
                min-height: 90px;
            }

            .map-card-modal div {
                font-size: 2rem !important;
            }

            .setup-container {
                padding: 20px !important;
                margin-top: 10px !important;
                margin-bottom: 10px !important;
            }

            .game-header {
                margin-bottom: 15px !important;
                padding-top: 5px !important;
            }

            .game-header img {
                height: 80px !important;
            }

            .btn-start-game {
                height: 60px !important;
                font-size: 1rem !important;
                letter-spacing: 1.5px !important;
            }

            .btn-resume-game {
                height: 56px !important;
                font-size: 0.9rem !important;
                letter-spacing: 1px !important;
            }

            .mobile-bottom-bar {
                padding: 8px 6px max(8px, env(safe-area-inset-bottom)) !important;
                gap: 4px !important;
            }

            .mobile-bottom-bar .btn {
                padding: 7px 5px !important;
                font-size: 0.6rem !important;
                min-height: 50px;
                height: 50px;
            }

            .mobile-bottom-bar .mob-btn-icon {
                font-size: 1.1rem;
            }

            .mobile-bottom-bar .mob-btn-text {
                font-size: 0.55rem !important;
            }

            .btn-roll-mob .mob-btn-icon {
                font-size: 1.3rem;
            }

            .btn-roll-mob .mob-btn-text {
                font-size: 0.6rem !important;
            }

            .mobile-header {
                height: 52px !important;
                min-height: 52px !important;
                padding: 0 10px !important;
            }

            #mobCurrentName {
                font-size: 0.8rem !important;
                max-width: 80px;
            }

            .mobile-money {
                font-size: 0.75rem !important;
            }
        }

        @media (max-width: 600px) {
            .trade-response-popup {
                padding: 25px 30px;
                min-width: 280px;
                border-radius: 20px;
            }

            .trade-response-icon {
                font-size: 3rem;
            }

            .trade-response-title {
                font-size: 1.5rem;
            }

            .trade-response-message {
                font-size: 0.9rem;
            }
        }



        /* Branding Badge */
        .credit-badge {
            position: fixed;
            bottom: 10px;
            right: 20px;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(8px);
            color: rgba(255, 255, 255, 0.4);
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.65rem;
            font-weight: 500;
            letter-spacing: 0.5px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            z-index: 9999;
            pointer-events: none;
            opacity: 0.6;
            transition: opacity 0.3s ease;
        }

        .token.moving {
            transform: scale(1.2) rotate(15deg) translateZ(0);
            z-index: 1001;
            will-change: transform, left, top;
            /* GPU acceleration */
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        .credit-badge span {
            color: rgba(212, 175, 55, 0.5);
            margin-left: 4px;
            font-weight: 600;
        }

        .credit-badge:hover {
            opacity: 0.9;
        }

        /* Themes Contrast Fixes */
        /* Themes Contrast Fixes & Texture Confinement */
        body.theme-marble {
            --gold: #7b5b00;
            --bg-dark: #f0f0f0;
            --panel-bg: rgba(255, 255, 255, 0.98);
        }

        body.theme-marble {
            background: url('assets/marble_bg.png') center/cover fixed !important;
            background-color: #f8f8f8 !important;
        }

        body.theme-marble #bg-canvas {
            background-image: url('assets/marble_bg.png') !important;
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.7) saturate(0.8) !important;
            opacity: 0.5 !important;
        }

        body.theme-marble .game-wrapper {
            background: transparent !important;
        }

        body.theme-marble .setup-screen {
            background: transparent !important;
        }

        body.theme-marble .setup-screen::before {
            background: url('assets/marble_bg.png') center/cover !important;
            opacity: 0.95 !important;
        }

        body.theme-marble .board {
            --board-bg: url('assets/marble_bg.png') center/cover;
            border: 15px solid #222 !important;
            color: #000;
            background-image: url('assets/marble_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        body.theme-marble .board .square {
            background: rgba(255, 255, 255, 0.7);
            border-color: rgba(0, 0, 0, 0.1);
        }

        body.theme-marble .square-price {
            color: #0d4a0d !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.85), rgba(56, 142, 60, 0.8), rgba(45, 80, 22, 0.75)) !important;
            text-shadow: 
                0 1px 3px rgba(255, 255, 255, 1),
                0 0 2px rgba(0, 0, 0, 0.5),
                0 1px 2px rgba(0, 0, 0, 0.3) !important;
            border: 1px solid rgba(45, 80, 22, 0.6) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-marble .board-center {
            background-color: #f8f8f8;
            background-image: url('assets/marble_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            filter: sepia(0.05) contrast(1.15) brightness(1.05) saturate(0.95);
            box-shadow: 
                inset 0 0 60px rgba(0, 0, 0, 0.2),
                inset 0 0 20px rgba(0, 0, 0, 0.1),
                0 0 35px rgba(0, 0, 0, 0.25);
        }

        body.theme-marble .side-panel {
            background: rgba(255, 255, 255, 0.98);
            color: #000;
            border: 1px solid #ccc;
        }

        body.theme-marble .player-card {
            background: rgba(0, 0, 0, 0.05);
            color: #000;
        }

        body.theme-marble .player-card.active {
            background: #fff;
            border: 2px solid #000;
        }

        body.theme-parchment {
            --gold: #5d4037;
            --bg-dark: #ccb08a;
            --panel-bg: rgba(244, 228, 188, 0.98);
        }

        body.theme-parchment {
            background: url('assets/parchment_bg.png') center/cover fixed !important;
            background-color: #f4e4bc !important;
        }

        body.theme-parchment #bg-canvas {
            background-image: url('assets/parchment_bg.png') !important;
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.7) saturate(0.8) !important;
            opacity: 0.5 !important;
        }

        body.theme-parchment .game-wrapper {
            background: transparent !important;
        }

        body.theme-parchment .setup-screen {
            background: transparent !important;
        }

        body.theme-parchment .setup-screen::before {
            background: url('assets/parchment_bg.png') center/cover !important;
            opacity: 0.95 !important;
        }

        body.theme-parchment .board {
            --board-bg: url('assets/parchment_bg.png') center/cover;
            border: 15px solid #3e2723 !important;
            color: #3e2723;
            background-image: url('assets/parchment_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        body.theme-parchment .board .square {
            background: rgba(255, 248, 220, 0.7);
            border-color: rgba(62, 39, 35, 0.2);
        }

        body.theme-parchment .square-price {
            color: #1a4a1a !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(56, 142, 60, 0.85), rgba(45, 80, 22, 0.8)) !important;
            text-shadow: 
                0 1px 3px rgba(255, 255, 255, 1),
                0 0 2px rgba(0, 0, 0, 0.5),
                0 1px 2px rgba(0, 0, 0, 0.3) !important;
            border: 1px solid rgba(45, 80, 22, 0.7) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-parchment .board-center {
            background-color: #f4e4bc;
            background-image: url('assets/parchment_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            filter: sepia(0.25) contrast(1.1) brightness(0.92) saturate(1.15);
            box-shadow: 
                inset 0 0 70px rgba(139, 105, 20, 0.35),
                inset 0 0 25px rgba(139, 105, 20, 0.25),
                inset 0 0 10px rgba(212, 175, 55, 0.1),
                0 0 40px rgba(0, 0, 0, 0.3);
        }

        body.theme-parchment .side-panel {
            background: rgba(244, 228, 188, 0.98);
            color: #3e2723;
            border: 1px solid #8d6e63;
        }

        body.theme-parchment .player-card {
            background: rgba(62, 39, 35, 0.08);
            color: #3e2723;
        }

        body.theme-parchment .player-card.active {
            background: #fff;
            border: 2px solid #3e2723;
        }

        body.theme-premium {
            --gold: #d4af37;
            --bg-dark: #07070a;
            --panel-bg: rgba(10, 12, 16, 0.85);
            --board-center-bg: rgba(20, 22, 30, 0.95);
        }

        body.theme-premium #bg-canvas {
            background-image: url('assets/premium_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            opacity: 0.4;
            filter: blur(3px);
        }

        body.theme-premium .board {
            --board-bg: url('assets/premium_bg.png') center/cover;
            box-shadow: 0 60px 150px rgba(0, 0, 0, 0.8) !important;
            border: 15px solid #1a1a1a !important;
            background-image: url('assets/premium_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        body.theme-premium .board-center {
            background-color: #1a1a2e;
            background-image: url('assets/premium_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            filter: sepia(0.12) contrast(1.1) brightness(0.96) saturate(1.05);
            box-shadow: 
                inset 0 0 80px rgba(0, 0, 0, 0.5),
                inset 0 0 30px rgba(212, 175, 55, 0.2),
                inset 0 0 15px rgba(212, 175, 55, 0.1),
                0 0 45px rgba(212, 175, 55, 0.2);
        }

        body.theme-premium .board .square {
            border-color: rgba(255, 255, 255, 0.05);
        }

        body.theme-premium .square-price {
            color: #66ff66 !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.75), rgba(56, 142, 60, 0.7), rgba(45, 80, 22, 0.65)) !important;
            text-shadow: 
                0 1px 4px rgba(0, 0, 0, 1),
                0 0 10px rgba(76, 175, 80, 0.8),
                0 1px 3px rgba(0, 0, 0, 0.6) !important;
            border: 1px solid rgba(76, 175, 80, 0.6) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-premium .setup-screen {
            background: transparent !important;
        }

        body.theme-premium .setup-screen::before {
            background: url('assets/premium_bg.png') center/cover !important;
            opacity: 0.85 !important;
            filter: brightness(0.4) saturate(1.0) !important;
        }

        body.theme-premium .side-panel {
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 215, 0, 0.1);
        }

        body.theme-premium .setup-screen {
            background: transparent !important;
        }

        body.theme-premium .setup-screen::before {
            background: url('assets/premium_bg.png') center/cover !important;
            opacity: 0.85 !important;
            filter: brightness(0.4) saturate(1.0) !important;
        }

        /* Cyberpunk Night Theme */
        body.theme-cyber {
            --gold: #00f2ff;
            --bg-dark: #050510;
            --panel-bg: rgba(10, 10, 25, 0.9);
            --board-center-bg: rgba(5, 5, 15, 0.95);
        }

        body.theme-cyber #bg-canvas {
            background-image: url('assets/cyber_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.5) saturate(0.8);
            opacity: 0.4;
        }

        body.theme-cyber .board {
            background: url('assets/cyber_bg.png') center/cover !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
            border: 15px solid #00f2ff !important;
            box-shadow: 0 0 50px rgba(0, 242, 255, 0.4) !important;
        }

        body.theme-cyber .board .square {
            border-color: rgba(0, 242, 255, 0.2);
            background: #0a0a1a;
        }

        body.theme-cyber .square-price {
            color: #00ff88 !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(0, 255, 136, 0.7), rgba(0, 220, 120, 0.65), rgba(0, 180, 100, 0.6)) !important;
            text-shadow: 
                0 1px 4px rgba(0, 0, 0, 1),
                0 0 12px rgba(0, 255, 136, 0.9),
                0 1px 3px rgba(0, 0, 0, 0.7) !important;
            border: 1px solid rgba(0, 255, 136, 0.6) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-cyber .square-name {
            color: #00f2ff;
            text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
        }

        body.theme-cyber .side-panel {
            border-color: #ff00ff;
            box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
        }

        body.theme-cyber .btn-roll {
            background: #00f2ff;
            box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
        }


        /* Royal Gold Theme - Restored & Enhanced */
        body.theme-royal {
            --gold: #ffcc00;
            --bg-dark: #1a0505;
            --panel-bg: rgba(74, 0, 0, 0.98);
        }

        body.theme-royal #bg-canvas {
            background-image: url('assets/royal_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.6) saturate(0.8);
            opacity: 0.5;
        }

        body.theme-royal .board {
            --board-bg: url('assets/royal_bg.png') center/cover;
            border: 12px solid #ffcc00 !important;
            box-shadow: 0 0 100px rgba(255, 204, 0, 0.3) !important;
            background-image: url('assets/royal_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        body.theme-royal .board .square {
            background: rgba(120, 15, 15, 0.85);
            border-color: rgba(255, 204, 0, 0.25);
        }

        body.theme-royal .square-price {
            color: #fff176 !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(255, 235, 59, 0.75), rgba(255, 213, 30, 0.7), rgba(255, 193, 7, 0.65)) !important;
            text-shadow: 
                0 1px 4px rgba(0, 0, 0, 1),
                0 0 10px rgba(255, 235, 59, 0.9),
                0 1px 3px rgba(0, 0, 0, 0.7) !important;
            border: 1px solid rgba(255, 235, 59, 0.7) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-royal .board-center {
            background-color: #4a0000;
            background-image: url('assets/royal_bg.png'),
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 204, 0, 0.04) 2px, rgba(255, 204, 0, 0.04) 4px),
                repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 204, 0, 0.04) 2px, rgba(255, 204, 0, 0.04) 4px);
            background-blend-mode: normal, normal, normal;
            background-size: cover, 100% 100%, 100% 100%;
            background-position: center, center, center;
            filter: sepia(0.3) contrast(1.15) brightness(0.88) saturate(1.2);
            box-shadow: 
                inset 0 0 80px rgba(255, 204, 0, 0.25),
                inset 0 0 30px rgba(255, 204, 0, 0.15),
                0 0 60px rgba(255, 204, 0, 0.3);
        }

        body.theme-royal .square-name {
            color: #ffcc00 !important;
            font-weight: 800;
        }

        body.theme-royal .side-panel {
            background: rgba(74, 0, 0, 0.98);
            border: 2px solid #ffcc00;
            color: #fff;
        }

        body.theme-royal .btn-roll {
            background: linear-gradient(135deg, #ffcc00, #b8860b);
            color: #000;
            font-weight: 800;
            border: none;
        }

        body.theme-royal .setup-screen {
            background: transparent !important;
        }

        body.theme-royal .setup-screen::before {
            background: url('assets/royal_bg.png') center/cover !important;
            opacity: 0.9 !important;
            filter: brightness(0.5) saturate(1.1) !important;
        }

        /* Cyberpunk Night Theme */
        body.theme-cyber {
            --gold: #00f2ff;
            --bg-dark: #050510;
            --panel-bg: rgba(10, 10, 25, 0.9);
            --board-center-bg: rgba(5, 5, 15, 0.95);
        }

        body.theme-cyber #bg-canvas {
            background-image: url('assets/cyber_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.5) saturate(0.8);
            opacity: 0.4;
        }

        body.theme-cyber .board {
            background: url('assets/cyber_bg.png') center/cover !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
            border: 15px solid #00f2ff !important;
            box-shadow: 0 0 50px rgba(0, 242, 255, 0.4) !important;
        }

        body.theme-cyber .board .square {
            border-color: rgba(0, 242, 255, 0.2);
            background: #0a0a1a;
        }

        body.theme-cyber .square-price {
            color: #00ff88 !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(0, 255, 136, 0.7), rgba(0, 220, 120, 0.65), rgba(0, 180, 100, 0.6)) !important;
            text-shadow: 
                0 1px 4px rgba(0, 0, 0, 1),
                0 0 12px rgba(0, 255, 136, 0.9),
                0 1px 3px rgba(0, 0, 0, 0.7) !important;
            border: 1px solid rgba(0, 255, 136, 0.6) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-cyber .board-center {
            background-color: #050510;
            background-image: url('assets/cyber_bg.png'),
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 242, 255, 0.05) 2px, rgba(0, 242, 255, 0.05) 4px),
                repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 0, 255, 0.03) 2px, rgba(255, 0, 255, 0.03) 4px);
            background-blend-mode: normal, normal, normal;
            background-size: cover, 100% 100%, 100% 100%;
            background-position: center, center, center;
            filter: contrast(1.2) brightness(0.9) saturate(1.3);
            box-shadow: 
                inset 0 0 80px rgba(0, 242, 255, 0.15),
                inset 0 0 40px rgba(255, 0, 255, 0.1),
                0 0 50px rgba(0, 242, 255, 0.3);
        }

        body.theme-cyber .square-name {
            color: #00f2ff;
            text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
        }

        body.theme-cyber .side-panel {
            border-color: #ff00ff;
            box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
        }

        body.theme-cyber .btn-roll {
            background: #00f2ff;
            box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
        }

        /* Forest Nature Theme */
        body.theme-nature {
            --gold: #8bc34a;
            --bg-dark: #1b2e1b;
            --panel-bg: rgba(46, 60, 46, 0.9);
            --board-center-bg: rgba(27, 46, 27, 0.85);
        }

        body.theme-nature #bg-canvas {
            background-image: url('assets/nature_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: repeat;
            filter: blur(4px) brightness(0.6) saturate(0.7);
            opacity: 0.5;
        }

        body.theme-nature .board {
            --board-bg: url('assets/nature_bg.png') center/cover;
            border: 12px solid #4e342e !important;
            box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5) !important;
            background-image: url('assets/nature_bg.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        body.theme-nature .board .square {
            border-color: rgba(255, 255, 255, 0.1);
            background: #3e6e3e;
        }

        body.theme-nature .square-price {
            color: #e8f5e9 !important;
            font-weight: 600 !important;
            background: linear-gradient(135deg, rgba(200, 230, 201, 0.75), rgba(165, 214, 167, 0.7), rgba(139, 195, 74, 0.65)) !important;
            text-shadow: 
                0 1px 4px rgba(0, 0, 0, 1),
                0 0 10px rgba(139, 195, 74, 0.8),
                0 1px 3px rgba(0, 0, 0, 0.7) !important;
            border: 1px solid rgba(139, 195, 74, 0.7) !important;
            letter-spacing: 0.4px !important;
        }

        body.theme-nature .setup-screen {
            background: transparent !important;
        }

        body.theme-nature .setup-screen::before {
            background: url('assets/nature_bg.png') center/cover !important;
            opacity: 0.9 !important;
            filter: brightness(0.5) saturate(0.9) !important;
        }

        body.theme-nature .board-center {
            background-color: #2d4c2d;
            background-image: url('assets/nature_bg.png'),
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 195, 74, 0.04) 2px, rgba(139, 195, 74, 0.04) 4px),
                repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(76, 175, 80, 0.03) 2px, rgba(76, 175, 80, 0.03) 4px);
            background-blend-mode: normal, normal, normal;
            background-size: cover, 100% 100%, 100% 100%;
            background-position: center, center, center;
            filter: sepia(0.2) contrast(1.1) brightness(0.92) saturate(1.25);
            box-shadow: 
                inset 0 0 70px rgba(139, 195, 74, 0.2),
                inset 0 0 30px rgba(76, 175, 80, 0.15),
                0 0 45px rgba(139, 195, 74, 0.25);
        }

        body.theme-nature .square-name {
            color: #f1f8e9;
        }

        body.theme-nature .side-panel {
            border-color: #8bc34a;
        }






        .icon-modal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
            gap: 15px;
            margin-top: 20px;
            max-height: 400px;
            overflow-y: auto;
            padding: 10px;
        }

        .icon-category-btn {
            padding: 8px 15px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .icon-category-btn.active {
            background: var(--gold);
            color: #000;
            border-color: var(--gold);
        }

        .token-preview {
            width: 48px !important;
            height: 48px !important;
            font-size: 1.4rem !important;
            cursor: pointer;
            position: relative;
            transition: all 0.3s;
            background: rgba(255, 255, 255, 0.08);
            border: 2px solid rgba(255, 255, 255, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .token-preview:hover {
            transform: scale(1.08) translateY(-2px);
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.15);
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
        }

        .token-preview::after {
            content: attr(data-label);
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, var(--gold), #f4d03f);
            color: #000;
            font-size: 0.5rem;
            font-weight: 900;
            padding: 2px 8px;
            border-radius: 10px;
            opacity: 0;
            transition: 0.3s;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .token-preview:hover::after {
            opacity: 1;
            bottom: -4px;
        }

        .icon-opt-big {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
        }

        .icon-opt-big:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: scale(1.1);
            border-color: var(--gold);
        }

        .theme-preview {
            display: flex;
            gap: 8px;
            margin-bottom: 0;
        }

        .theme-card {
            flex: 1;
            padding: 6px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .theme-card.selected {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.05);
            box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
        }

        .theme-card.selected span {
            color: var(--gold);
            font-weight: 700;
        }

        .theme-card div {
            height: 24px;
            border-radius: 3px;
            margin-bottom: 4px;
        }

        .btn-theme-selector {
            width: 100%;
            padding: 14px 18px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 12px;
            color: var(--gold);
            font-weight: 700;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            text-align: center;
        }

        .btn-theme-selector:hover {
            background: rgba(212, 175, 55, 0.1);
            border-color: var(--gold);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
        }

        .btn-theme-selector:active {
            transform: translateY(0);
        }

        .theme-card-modal {
            padding: 12px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .theme-card-modal:hover {
            transform: translateY(-3px);
            border-color: rgba(212, 175, 55, 0.4);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .theme-card-modal.selected {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.08);
            box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
        }

        .theme-card-modal.selected span {
            color: var(--gold);
            font-weight: 700;
        }

        .btn-close-modal {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .btn-close-modal:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .map-card-modal {
            padding: 16px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100px;
        }

        .map-card-modal:hover {
            transform: translateY(-3px);
            border-color: rgba(212, 175, 55, 0.4);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.05);
        }

        .map-card-modal.selected {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.08);
            box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
        }

        .map-card-modal.selected span {
            color: var(--gold);
            font-weight: 700;
        }

        .lang-card-modal, .speed-card-modal, .difficulty-card-modal {
            padding: 14px 18px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .lang-card-modal:hover, .speed-card-modal:hover, .difficulty-card-modal:hover {
            transform: translateY(-2px);
            border-color: rgba(212, 175, 55, 0.4);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.05);
        }

        .lang-card-modal.selected, .speed-card-modal.selected, .difficulty-card-modal.selected {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.08);
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
        }

        .lang-card-modal.selected span, .speed-card-modal.selected span, .difficulty-card-modal.selected span {
            color: var(--gold);
        }

        .difficulty-card-modal {
            justify-content: space-between;
            text-align: left;
        }

        .player-type-card-modal, .player-pers-card-modal {
            padding: 14px 18px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: pointer;
            text-align: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .player-type-card-modal:hover, .player-pers-card-modal:hover {
            transform: translateY(-2px);
            border-color: rgba(212, 175, 55, 0.4);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.05);
        }

        .player-type-card-modal.selected, .player-pers-card-modal.selected {
            border-color: var(--gold);
            background: rgba(212, 175, 55, 0.08);
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
        }

        .player-type-card-modal.selected span, .player-pers-card-modal.selected span {
            color: var(--gold);
        }

        .btn-start-game {
            background: linear-gradient(135deg, #ffd700 0%, #f4d03f 25%, #f9e79f 50%, #f4d03f 75%, #d4af37 100%);
            color: #000;
            box-shadow: 
                0 8px 32px rgba(212, 175, 55, 0.4),
                0 4px 16px rgba(212, 175, 55, 0.3),
                inset 0 2px 4px rgba(255, 255, 255, 0.4),
                inset 0 -2px 4px rgba(139, 105, 20, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 16px;
            position: relative;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-start-game:hover {
            box-shadow: 
                0 12px 40px rgba(212, 175, 55, 0.6),
                0 6px 20px rgba(212, 175, 55, 0.4),
                inset 0 2px 6px rgba(255, 255, 255, 0.5),
                inset 0 -2px 6px rgba(139, 105, 20, 0.3);
            transform: translateY(-3px) scale(1.02);
            background: linear-gradient(135deg, #ffed4e 0%, #ffd700 25%, #f9e79f 50%, #ffd700 75%, #f4d03f 100%);
        }

        .btn-start-game:active {
            transform: translateY(-1px) scale(0.98);
        }

        .btn-resume-game {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
            color: var(--gold);
            box-shadow: 
                0 6px 24px rgba(212, 175, 55, 0.25),
                0 3px 12px rgba(212, 175, 55, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
            border: 1.5px solid rgba(212, 175, 55, 0.3);
            border-radius: 14px;
            backdrop-filter: blur(12px) saturate(180%);
            -webkit-backdrop-filter: blur(12px) saturate(180%);
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-resume-game:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 100%);
            border-color: var(--gold);
            box-shadow: 
                0 8px 30px rgba(212, 175, 55, 0.35),
                0 4px 15px rgba(212, 175, 55, 0.25),
                inset 0 2px 4px rgba(255, 255, 255, 0.25),
                inset 0 -2px 4px rgba(0, 0, 0, 0.15);
            transform: translateY(-2px) scale(1.01);
        }

        .btn-resume-game:active {
            transform: translateY(0) scale(0.99);
        }



        .theme-marble-card div {
            background: var(--marble-bg);
            border: 1px solid #ccc;
        }

        .theme-parchment-card div {
            background: var(--paper-bg);
            border: 1px solid #8d6e63;
        }

        .player-type-select {
            padding: 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            font-family: 'Montserrat', sans-serif;
            cursor: pointer;
            width: 130px;
            outline: none;
        }

        .player-type-select:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: var(--gold);
        }

        .player-type-select option {
            background: #1a1a2e;
            color: white;
        }

        .player-input input:focus {
            border-color: var(--gold);
            outline: none;
        }

        .player-input input::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        .player-input .token-preview {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: 3px solid white;
        }

        .auction-bid {
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--gold);
            text-align: center;
            margin: 15px 0;
        }

        .auction-info {
            text-align: center;
            margin-bottom: 15px;
            color: rgba(255, 255, 255, 0.8);
        }

        .auction-players {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-bottom: 15px;
        }

        .auction-player {
            padding: 8px 15px;
            border-radius: 8px;
            border: 2px solid;
            background: rgba(255, 255, 255, 0.08);
        }

        .auction-player.current {
            background: rgba(255, 215, 0, 0.15);
            box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
        }

        .auction-player.out {
            opacity: 0.35;
        }

        .bid-btns {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .bid-btn {
            padding: 10px 18px;
            border-radius: 8px;
            border: none;
            background: linear-gradient(135deg, #4caf50, #2e7d32);
            color: white;
            font-weight: 700;
            cursor: pointer;
        }

        .bid-btn:hover {
            transform: scale(1.05);
        }

        .bid-btn.pass {
            background: linear-gradient(135deg, #f44336, #c62828);
        }

        /* Modern Premium Trade UI */
        .trade-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 15px;
        }

        .trade-section {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 20px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            transition: all 0.3s ease;
        }

        .trade-section:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 215, 0, 0.2);
        }

        .trade-section-header {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 800;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .trade-section.giving .trade-section-header {
            color: #f44336;
        }

        .trade-section.receiving .trade-section-header {
            color: #4caf50;
        }

        .trade-props {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            gap: 8px;
            max-height: 250px;
            overflow-y: auto;
            padding-right: 5px;
            min-height: 100px;
        }

        .trade-props::-webkit-scrollbar {
            width: 4px;
        }

        .trade-props::-webkit-scrollbar-thumb {
            background: rgba(255, 215, 0, 0.3);
            border-radius: 10px;
        }

        .trade-prop {
            background: rgba(255, 255, 255, 0.05);
            border: 1.5px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 10px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 8px;
            user-select: none;
        }

        .trade-prop:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.2);
        }

        .trade-prop.selected {
            background: rgba(255, 215, 0, 0.1);
            border-color: var(--gold);
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
        }

        .trade-prop-color {
            width: 8px;
            height: 24px;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .trade-money-input-container {
            position: relative;
            margin-top: auto;
        }

        .trade-input {
            width: 100%;
            background: rgba(0, 0, 0, 0.2);
            border: 1.5px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px 15px 12px 40px;
            color: var(--gold);
            font-weight: 800;
            font-size: 1.1rem;
            outline: none;
            transition: all 0.3s ease;
        }

        .trade-input:focus {
            border-color: var(--gold);
            background: rgba(0, 0, 0, 0.3);
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
        }

        .trade-money-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.2rem;
            opacity: 0.7;
            pointer-events: none;
        }

        .trade-select-container {
            margin-bottom: 20px;
            position: relative;
        }

        .trade-select {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1.5px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 15px;
            color: #fff;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            appearance: none;
            transition: all 0.3s ease;
        }

        .trade-select:hover {
            border-color: var(--gold);
            background: rgba(255, 255, 255, 0.08);
        }

        .trade-select option {
            background: #12141d;
            color: #fff;
            padding: 15px;
        }

        /* Trade Offer (Incoming/Outgoing Request) */
        .trade-offer-summary {
            display: flex;
            align-items: stretch;
            gap: 15px;
            margin: 20px 0;
            position: relative;
        }

        .trade-offer-summary::before {
            content: '⇄';
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            background: var(--gold);
            color: #000;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            z-index: 2;
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
            animation: pulse-gold 2s infinite;
        }

        @keyframes pulse-gold {
            0% {
                box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
            }

            70% {
                box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
            }
        }

        .trade-offer-card {
            flex: 1;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .trade-offer-money {
            font-size: 1.5rem;
            font-weight: 900;
            color: var(--gold);
            text-align: center;
            margin-bottom: 5px;
        }

        .trade-offer-props {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .trade-offer-prop {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 8px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            border-left: 4px solid transparent;
        }

        @media (max-width: 768px) {

            .trade-container,
            .trade-offer-summary {
                grid-template-columns: 1fr;
                flex-direction: column;
            }

            .trade-offer-summary::before {
                display: none;
            }

            .trade-props {
                grid-template-columns: 1fr 1fr;
            }

            .modal {
                max-width: 95vw !important;
                padding: 20px !important;
            }
        }

        .money-float {
            position: fixed;
            pointer-events: none;
            z-index: 9999;
            font-size: 1.3rem;
            font-weight: 800;
            animation: floatUp 0.8s ease-out forwards;
        }

        @keyframes floatUp {
            0% {
                opacity: 1;
                transform: translateY(0);
            }

            100% {
                opacity: 0;
                transform: translateY(-40px);
            }
        }

        .money-float.pos {
            color: #4caf50;
        }

        .money-float.neg {
            color: #f44336;
        }

        /* Property Transfer Animation */
        .property-transfer-ghost {
            position: fixed;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            z-index: 10001;
            pointer-events: none;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
            transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
            opacity: 1;
            transform: scale(1.5);
        }

        .property-transfer-ghost.moving {
            transform: scale(0.5);
            opacity: 0.5;
        }

        /* MOBILE RESPONSIVE - MASTER DESIGN (Optimized) */
        @media (max-width: 900px) {
            /* Mobile touch optimizations */
            * {
                -webkit-tap-highlight-color: transparent;
            }
            
            body {
                touch-action: pan-y;
                -webkit-overflow-scrolling: touch;
            }
            
            .game-wrapper {
                flex-direction: column;
                height: 100vh;
                height: -webkit-fill-available;
                padding: 0;
                gap: 0;
                background: var(--bg-dark);
                overflow: auto;
                -webkit-overflow-scrolling: touch;
                touch-action: pan-y;
            }

            /* Hide Desktop Side Panels */
            .side-panel {
                display: none !important;
            }

            /* Show Mobile Specific Header */
            .mobile-header {
                display: flex !important;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                height: 56px;
                min-height: 56px;
                background: rgba(0, 0, 0, 0.85);
                backdrop-filter: blur(15px) saturate(180%);
                -webkit-backdrop-filter: blur(15px) saturate(180%);
                z-index: 1000;
                padding: 0 12px;
                align-items: center;
                justify-content: space-between;
                border-bottom: 1px solid rgba(255, 215, 0, 0.25);
                box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
                touch-action: manipulation;
            }

            .mobile-header > div:last-child {
                flex: 1;
                display: flex;
                justify-content: flex-end;
            }

            .mobile-player-info {
                display: flex;
                align-items: center;
                gap: 10px;
                flex: 1;
            }

            .mobile-header-center {
                position: absolute;
                left: 50%;
                transform: translateX(-50%);
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 1;
            }

            .mobile-turn-indicator {
                display: flex;
                align-items: center;
                gap: 4px;
                padding: 2px 8px;
                background: rgba(212, 175, 55, 0.15);
                border: 1px solid rgba(212, 175, 55, 0.3);
                border-radius: 8px;
                backdrop-filter: blur(5px);
                -webkit-backdrop-filter: blur(5px);
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
                transition: all 0.3s ease;
            }

            .mobile-turn-indicator:hover {
                background: rgba(212, 175, 55, 0.2);
                border-color: rgba(212, 175, 55, 0.4);
            }

            .mobile-money {
                color: var(--gold);
                font-weight: 800;
                font-size: 0.95rem;
            }

            /* Center Panel Layout */
            .center-panel {
                padding-top: 56px !important;
                padding-bottom: 70px !important;
                height: 100vh;
                height: -webkit-fill-available;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                overflow: auto;
                -webkit-overflow-scrolling: touch;
                /* Ensure proper spacing for iPhone 14 Pro Max and similar devices */
                min-height: 0;
                box-sizing: border-box;
                /* Enable smooth scrolling in all directions */
                scroll-behavior: smooth;
                overscroll-behavior: contain;
            }

            .board-container {
                width: min(100vw, calc(100vh - 126px)) !important;
                height: min(100vw, calc(100vh - 126px)) !important;
                margin: 10px auto;
                /* Ensure board fits on screen - 56px header + 70px bottom bar */
                max-width: 100vw;
                max-height: calc(100vh - 126px);
                flex-shrink: 0;
                box-sizing: border-box;
                /* Ensure board can be scrolled from top */
                position: relative;
            }

            /* Board Refinements */
            .square-name {
                font-size: 0.38rem !important;
                line-height: 1.1;
                font-weight: 700 !important;
            }

            .square-price {
                font-size: clamp(6px, 1.1vw, 9px) !important;
                font-weight: 600 !important;
                padding: 4px 7px !important;
                opacity: 1 !important;
                background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 1) 50%, rgba(45, 80, 22, 1) 100%) !important;
                color: #0d4a0d !important;
                text-shadow: 
                    0 1px 4px rgba(255, 255, 255, 1),
                    0 0 3px rgba(0, 0, 0, 0.5),
                    0 1px 2px rgba(0, 0, 0, 0.3) !important;
                letter-spacing: 0.4px !important;
                filter: none !important;
                -webkit-font-smoothing: antialiased !important;
                -moz-osx-font-smoothing: grayscale !important;
                text-rendering: optimizeLegibility !important;
            }
            
            .square-price::before,
            .square-price::after {
                opacity: 0.25 !important;
            }

            .token {
                width: 14px !important;
                height: 14px !important;
                font-size: 0.55rem !important;
            }

            /* Setup Responsive - Compact */
            .setup-screen {
                padding: 15px;
                padding-bottom: 30px;
                justify-content: flex-start;
                align-items: center;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            .setup-container {
                grid-template-columns: 1fr;
                padding: 18px;
                padding-bottom: 30px;
                gap: 12px;
                width: 100%;
                border-radius: 20px;
                margin: 5px 0;
                max-height: none;
                overflow: visible;
            }

            .setup-right {
                border-left: none !important;
                padding-left: 0 !important;
                border-top: 1px solid rgba(255, 255, 255, 0.08);
                padding-top: 12px;
            }

            h1 {
                font-size: 1.8rem !important;
                letter-spacing: 8px !important;
            }

            .setup-card {
                padding: 14px !important;
                border-radius: 14px !important;
            }

            .setup-left .setup-card {
                padding: 12px !important;
            }

            .player-config-slot {
                padding: 8px 10px !important;
                gap: 8px !important;
                border-radius: 10px;
            }

            .token-preview {
                width: 40px !important;
                height: 40px !important;
                font-size: 1.2rem !important;
            }

            .player-config-slot input[type="text"] {
                font-size: 0.85rem !important;
                padding: 3px 0 !important;
            }

            .player-type-select {
                font-size: 0.75rem !important;
                padding: 6px !important;
                height: 36px !important;
            }

            .setup-title {
                font-size: 0.7rem !important;
                margin-bottom: 10px !important;
            }

            /* Mobile optimizations for better touch targets */
            .player-config-slot {
                min-height: 52px;
                touch-action: manipulation;
            }

            .mobile-bottom-bar .btn {
                min-height: 52px;
                padding: 8px 6px !important;
                font-size: 0.6rem !important;
                touch-action: manipulation;
            }

            .mobile-bottom-bar .mob-btn-icon {
                font-size: 1.15rem;
            }

            .mobile-bottom-bar .mob-btn-text {
                font-size: 0.55rem !important;
            }

            /* Better mobile scrolling */
            .setup-container {
                -webkit-overflow-scrolling: touch;
                scroll-behavior: smooth;
                overscroll-behavior: contain;
            }

            .setup-screen {
                overscroll-behavior: contain;
            }

            /* Optimize mobile header */
            .mobile-header {
                min-height: 56px;
                padding: 0 12px !important;
                touch-action: manipulation;
            }

            .mobile-player-info {
                gap: 8px !important;
                min-width: 0;
                flex: 1;
            }

            .mobile-player-info > div:first-child {
                flex-shrink: 0;
            }

            #mobCurrentName {
                font-size: 0.85rem !important;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 100px;
            }

            .mobile-money {
                font-size: 0.8rem !important;
                white-space: nowrap;
            }

            .mobile-header > div:last-child {
                gap: 6px !important;
            }

            .mobile-header .btn {
                min-width: 40px !important;
                width: 40px !important;
                height: 40px !important;
                padding: 0 !important;
                font-size: 1rem !important;
            }

            /* Mobile board optimizations */
            .board-container {
                touch-action: pan-x pan-y pinch-zoom;
                width: min(100vw, calc(100vh - 126px)) !important;
                height: min(100vw, calc(100vh - 126px)) !important;
                max-width: 100vw;
                max-height: calc(100vh - 126px);
                flex-shrink: 0;
                box-sizing: border-box;
            }

            /* Smaller fonts for board on mobile */
            .square-name {
                font-size: clamp(4px, 0.8vw, 7px) !important;
                line-height: 1.1 !important;
                letter-spacing: 0.2px !important;
            }

            .color-bar .square-name {
                font-size: clamp(4px, 0.8vw, 7px) !important;
                line-height: 1.1 !important;
                letter-spacing: 0.2px !important;
            }

            .square-price {
                font-size: clamp(5px, 0.9vw, 8px) !important;
                font-weight: 500 !important;
                padding: 3px 6px !important;
                /* Remove blur effects for clarity on mobile */
                filter: none !important;
                -webkit-font-smoothing: antialiased !important;
                -moz-osx-font-smoothing: grayscale !important;
                text-rendering: optimizeLegibility !important;
                background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 0.98) 50%, rgba(45, 80, 22, 0.96) 100%) !important;
                color: #0d4a0d !important;
                text-shadow: 
                    0 1px 3px rgba(255, 255, 255, 1),
                    0 0 2px rgba(0, 0, 0, 0.5) !important;
                letter-spacing: 0.3px !important;
            }

            .square-price::before,
            .square-price::after {
                opacity: 0.4 !important;
            }

            .owner-info {
                font-size: clamp(4px, 0.7vw, 6px) !important;
                letter-spacing: 0.2px !important;
            }

            .owner-bar {
                height: 16px !important;
            }

            .board {
                will-change: transform;
                transform: translateZ(0);
                -webkit-transform: translateZ(0);
            }

            /* Optimize token animations for mobile */
            .token {
                will-change: transform, left, top !important;
                transform: translateZ(0) !important;
                -webkit-transform: translateZ(0) !important;
                /* Smoother transitions on mobile */
                transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                           left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                           top 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
            }

            .token.moving {
                transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                           left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                           top 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
            }

            /* Reduce token size slightly on very small screens */
            .token {
                width: clamp(16px, 4vw, 24px) !important;
                height: clamp(16px, 4vw, 24px) !important;
                font-size: clamp(12px, 2.5vw, 16px) !important;
                border-width: 2px !important;
            }

            .active-token {
                width: clamp(20px, 4.5vw, 30px) !important;
                height: clamp(20px, 4.5vw, 30px) !important;
            }

            /* Mobile input optimizations */
            .player-config-slot input[type="text"] {
                font-size: 0.9rem !important;
                padding: 6px 0 !important;
                min-height: 32px;
            }

            .player-type-select {
                min-height: 40px;
                touch-action: manipulation;
            }

            /* Mobile modal optimizations */
            .modal {
                max-height: 90vh !important;
                margin: 10px !important;
                border-radius: 20px !important;
            }

            /* Mobile game log optimizations */
            .game-log {
                font-size: 0.75rem !important;
                line-height: 1.4 !important;
                max-height: 150px !important;
            }

            /* Stats modal log styling */
            #statsLogContent {
                font-size: 0.7rem !important;
                line-height: 1.3 !important;
                padding: 8px !important;
            }

            #statsLogContent .log-entry {
                padding: 4px 0 !important;
                font-size: 0.7rem !important;
            }

            /* Mobile side panel optimizations */
            .side-panel {
                padding: 12px !important;
            }

            /* Prevent text selection on mobile during interactions */
            .btn, .dice, .square, .token-preview {
                -webkit-user-select: none;
                user-select: none;
                -webkit-touch-callout: none;
            }

            .btn-roll {
                height: 56px !important;
                font-size: 0.9rem !important;
                border-radius: 16px !important;
                padding: 14px 20px !important;
                letter-spacing: 2px !important;
                font-weight: 900 !important;
            }
            
            /* Center button on mobile */
            .btn-next-turn-center {
                font-size: 1.2rem !important;
                padding: 10px 18px !important;
                min-height: 42px !important;
                min-width: 42px !important;
                margin-top: 6px !important;
            }
            
            /* Dice container on mobile */
            .dice-container {
                gap: 15px !important;
                margin: 15px 0 8px 0 !important;
            }

            /* Mobile button optimizations */
            .btn {
                padding: 14px 20px !important;
                border-radius: 14px !important;
                font-size: 0.85rem !important;
                letter-spacing: 1.5px !important;
                min-height: 48px;
            }

            .btn-action,
            .btn-secondary,
            .btn-end {
                min-height: 48px;
                font-weight: 800 !important;
            }

            .mobile-bottom-bar .btn {
                padding: 7px 5px !important;
                font-size: 0.6rem !important;
                border-radius: 12px !important;
                min-height: 48px;
                gap: 3px !important;
            }

            .mobile-bottom-bar .mob-btn-icon {
                font-size: 1.1rem;
            }

            .mobile-bottom-bar .mob-btn-text {
                font-size: 0.55rem !important;
            }

            .mobile-bottom-bar .btn-roll-mob .mob-btn-icon {
                font-size: 1.3rem;
            }

            .mobile-bottom-bar .btn-roll-mob .mob-btn-text {
                font-size: 0.6rem !important;
                font-weight: 800 !important;
                letter-spacing: 0.3px !important;
            }

            .center-logo {
                font-size: 1.2rem !important;
                letter-spacing: 8px !important;
                margin-bottom: 2px !important;
            }

            .center-logo::after {
                font-size: 0.45rem !important;
                bottom: -15px !important;
                letter-spacing: 3px !important;
            }

            .dice-container {
                transform: scale(0.75);
                margin-top: 5px !important;
            }

            /* Mobile Bottom Bar */
            .mobile-bottom-bar {
                display: flex !important;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                background: rgba(18, 20, 29, 0.98);
                backdrop-filter: blur(20px) saturate(180%);
                -webkit-backdrop-filter: blur(20px) saturate(180%);
                padding: 10px 8px max(10px, env(safe-area-inset-bottom));
                z-index: 1000;
                border-top: 1px solid rgba(255, 255, 255, 0.15);
                justify-content: space-around;
                align-items: center;
                gap: 5px;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
            }

            .mobile-bottom-bar .btn {
                padding: 8px 6px !important;
                font-size: 0.65rem !important;
                height: 56px;
                flex: 1;
                min-height: 56px;
                touch-action: manipulation;
                font-weight: 700 !important;
                border-radius: 12px !important;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
                flex-direction: column;
                gap: 3px !important;
                letter-spacing: 0.5px !important;
                line-height: 1.2;
            }

            /* Mobile button icon and text styling */
            .mobile-bottom-bar .mob-btn-icon {
                font-size: 1.2rem;
                line-height: 1;
                display: block;
            }

            .mobile-bottom-bar .mob-btn-text {
                font-size: 0.6rem !important;
                font-weight: 600 !important;
                line-height: 1;
                display: block;
                text-transform: uppercase;
                letter-spacing: 0.3px;
                opacity: 0.95;
            }

            /* Compact buttons (trade, build) */
            .mobile-bottom-bar .btn-mob-compact {
                flex: 0.9 !important;
                min-width: 0;
            }

            /* Mobil bottom bar'da "Turu Atla" butonunu daha belirgin yap */
            .mobile-bottom-bar #mobEndBtn {
                background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #c62828 100%) !important;
                box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4) !important;
                flex: 0.9 !important;
            }

            .mobile-bottom-bar #mobEndBtn .mob-btn-text {
                color: white !important;
                font-weight: 700 !important;
            }

            .btn-roll-mob {
                flex: 1.4 !important;
                background: linear-gradient(135deg, var(--gold), #aa8a2e) !important;
                color: #000 !important;
                font-weight: 800 !important;
                box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
                min-width: 0;
            }

            .btn-roll-mob .mob-btn-icon {
                font-size: 1.4rem;
            }

            .btn-roll-mob .mob-btn-text {
                color: #000 !important;
                font-weight: 800 !important;
                font-size: 0.65rem !important;
            }

            /* Secondary buttons (trade, build) styling */
            .mobile-bottom-bar .btn-secondary.btn-mob-compact {
                background: linear-gradient(135deg, rgba(100, 100, 120, 0.4) 0%, rgba(80, 80, 100, 0.5) 100%) !important;
                border: 1px solid rgba(255, 255, 255, 0.1) !important;
                color: rgba(255, 255, 255, 0.9) !important;
            }

            .mobile-bottom-bar .btn-secondary.btn-mob-compact:active {
                background: linear-gradient(135deg, rgba(120, 120, 140, 0.5) 0%, rgba(100, 100, 120, 0.6) 100%) !important;
            }

            /* Action button (buy) styling */
            .mobile-bottom-bar .btn-action.btn-mob-compact {
                background: linear-gradient(135deg, #4caf50 0%, #43a047 50%, #2e7d32 100%) !important;
                color: white !important;
            }

            .mobile-bottom-bar .btn-action.btn-mob-compact .mob-btn-text {
                color: white !important;
            }

            /* Mobile performance optimizations */
            @media (max-width: 900px) {
                /* Reduce animations on mobile for better performance */
                * {
                    animation-duration: 0.3s !important;
                }

                /* Optimize transitions */
                .square, .token, .btn {
                    transition-duration: 0.2s !important;
                }

                /* Reduce backdrop filters on mobile for performance */
                .side-panel, .modal, .mobile-bottom-bar {
                    backdrop-filter: blur(10px) !important;
                    -webkit-backdrop-filter: blur(10px) !important;
                }

                /* Optimize board rendering */
                .board {
                    will-change: transform;
                    transform: translateZ(0);
                }

                /* AI overlay mobilde daha az opak */
                .ai-waiting-overlay {
                    background: rgba(0, 0, 0, 0.3) !important;
                    backdrop-filter: blur(1px) !important;
                }

                /* Mobilde butonlar her zaman görünür */
                .mobile-bottom-bar .btn {
                    opacity: 1 !important;
                    pointer-events: auto !important;
                }

                /* AI sırasında bile mobil butonlar görünür */
                .mobile-bottom-bar #mobEndBtn {
                    opacity: 1 !important;
                    pointer-events: auto !important;
                    z-index: 102 !important;
                }
            }

            .modal h2 {
                font-size: 1.4rem !important;
            }

            .modal p {
                font-size: 0.8rem !important;
            }

            /* Icon Picker Modal Mobil */
            #iconModal .modal {
                max-width: 95vw !important;
                max-height: 80vh !important;
                padding: 15px !important;
            }

            #iconModal .icon-modal-grid {
                grid-template-columns: repeat(6, 1fr) !important;
                gap: 8px !important;
                max-height: 40vh !important;
                overflow-y: auto !important;
            }

            #iconModal .icon-opt-big {
                font-size: 1.5rem !important;
                padding: 8px !important;
            }

            /* Rules-scroll mobil düzeltmesi */
            .rules-scroll {
                max-height: none !important;
                overflow-y: visible !important;
            }

            /* Start button daha belirgin */
            .setup-right .btn-roll {
                min-height: 55px !important;
                font-size: 1rem !important;
                font-weight: 800 !important;
                margin-top: 15px;
            }
        }

        /* PREMIUM LANDSCAPE EXPERIENCE - WORLD CLASS UX (Root Level) */
        @media (max-height: 500px) and (orientation: landscape) {
            .game-wrapper {
                flex-direction: row !important;
                height: 100vh !important;
                overflow: hidden !important;
                display: flex !important;
                background: #020205 !important;
            }

            .mobile-header,
            .mobile-bottom-bar {
                display: none !important;
            }

            .side-panel {
                display: flex !important;
                width: 105px !important;
                min-width: 105px !important;
                padding: 3px !important;
                background: rgba(10, 10, 15, 0.95) !important;
                backdrop-filter: blur(25px);
                border: none !important;
                border-right: 1px solid rgba(212, 175, 55, 0.1) !important;
                z-index: 20;
            }

            /* Remove all bulky waste */
            .side-panel>div:first-child,
            .side-panel h1,
            .side-panel h2 {
                display: none !important;
            }

            .player-card {
                padding: 2px !important;
                margin-bottom: 2px !important;
                border-radius: 4px !important;
            }

            .player-header {
                gap: 3px !important;
            }

            .player-token-icon {
                width: 12px !important;
                height: 12px !important;
                border-width: 1px !important;
            }

            .player-name {
                font-size: 0.38rem !important;
                font-weight: 800 !important;
            }

            .player-money {
                font-size: 0.48rem !important;
                color: var(--gold) !important;
            }

            .player-props {
                gap: 1px !important;
                margin-top: 1px !important;
            }

            .prop-dot {
                width: 3px !important;
                height: 3px !important;
                border-radius: 1px !important;
            }

            .center-panel {
                flex: 1 !important;
                padding: 0 !important;
                height: 100vh !important;
                display: flex !important;
                align-items: center;
                justify-content: center;
                background: #000 !important;
            }

            .board-container {
                width: min(98vh, calc(100vw - 230px)) !important;
                height: min(98vh, calc(100vw - 230px)) !important;
                margin: auto !important;
                box-shadow: 0 0 100px rgba(0, 0, 0, 1);
            }

            /* Board Text Scale */
            .square-name {
                font-size: 0.23rem !important;
                line-height: 1 !important;
            }

            .square-price {
                font-size: clamp(5px, 0.9vw, 7px) !important;
                font-weight: 600 !important;
                padding: 3px 6px !important;
                opacity: 1 !important;
                background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 1) 50%, rgba(45, 80, 22, 1) 100%) !important;
                color: #0d4a0d !important;
                text-shadow: 
                    0 1px 4px rgba(255, 255, 255, 1),
                    0 0 3px rgba(0, 0, 0, 0.5),
                    0 1px 2px rgba(0, 0, 0, 0.3) !important;
                letter-spacing: 0.3px !important;
                filter: none !important;
                -webkit-font-smoothing: antialiased !important;
                -moz-osx-font-smoothing: grayscale !important;
                text-rendering: optimizeLegibility !important;
            }
            
            .square-price::before,
            .square-price::after {
                opacity: 0.25 !important;
            }

            .token {
                width: 8px !important;
                height: 8px !important;
                font-size: 0.28rem !important;
            }

            .dice-container {
                transform: scale(0.42) !important;
            }

            .center-logo {
                font-size: 0.9rem !important;
                letter-spacing: 5px !important;
            }

            .side-panel:last-child {
                width: 115px !important;
                min-width: 115px !important;
                border-left: 1px solid rgba(212, 175, 55, 0.1) !important;
                border-right: none !important;
            }

            .controls-vertical {
                gap: 1px !important;
                padding: 0 !important;
            }

            .controls-vertical .btn {
                height: 18px !important;
                font-size: 0.35rem !important;
                padding: 0 4px !important;
                border-radius: 3px !important;
                min-width: 0 !important;
            }

            #turnIndicator {
                padding: 2px !important;
                margin-bottom: 2px !important;
            }

            #currentPlayerName {
                font-size: 0.48rem !important;
            }

            .ui-settings {
                display: none !important;
            }

            .game-log {
                font-size: 0.32rem !important;
                flex: 1;
                margin-top: 2px !important;
                padding: 2px !important;
                background: rgba(0, 0, 0, 0.6) !important;
                line-height: 1.1 !important;
            }
        }

        .player-type-select {
            padding: 8px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            font-family: 'Montserrat', sans-serif;
            cursor: pointer;
            outline: none;
        }

        .player-type-select option {
            background: #1a1a2e;
            color: white;
        }

        .ai-badge {
            font-size: 0.7em;
            padding: 2px 6px;
            border-radius: 4px;
            background: var(--gold);
            color: #000;
            font-weight: bold;
            margin-left: 5px;
            vertical-align: middle;
        }

        /* Toast Notifications */
        .toast-container {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
        }

        /* Mobile toast positioning - show from bottom */
        @media (max-width: 900px) {
            .toast-container {
                top: auto;
                bottom: 90px;
                transform: translateX(-50%);
            }

            @keyframes toastIn {
                from {
                    opacity: 0;
                    transform: translateY(20px) scale(0.9);
                }

                to {
                    opacity: 1;
                    transform: translateY(0) scale(1);
                }
            }

            .toast {
                animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            }
        }

        .toast {
            background: rgba(18, 20, 29, 0.9);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            color: white;
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            transition: all 0.3s ease;
        }

        @keyframes toastIn {
            from {
                opacity: 0;
                transform: translateY(-20px) scale(0.9);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .toast-success {
            border-left: 4px solid #10b981;
            box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
        }

        .toast-error {
            border-left: 4px solid #ef4444;
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
        }

        .toast-info {
            border-left: 4px solid #3b82f6;
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
        }

        .toast-icon {
            font-size: 1.2rem;
        }

        .toast-message {
            letter-spacing: 0.3px;
        }
