        /* Disable text selection, long press, image drag, double tap zoom */

        * {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        img {
            pointer-events: none;
            -webkit-user-drag: none;
            user-drag: none;
        }

        input,
        textarea {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        html {
            touch-action: manipulation;
        }

        html,
        body {
            height: 100%;
            margin: 0;
            padding: 0;
            background-color: #000;
            color: #fff;
            font-family: 'Roboto', sans-serif;
            overflow: hidden;
        }

        /* LOADING SCREEN */

        #loadingScreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #000;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .loading-logo {
            width: 150px;
            height: auto;
            margin-bottom: 30px;
        }

        .loading-bar-container {
            width: 80%;
            max-width: 300px;
            height: 6px;
            background: #333;
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 15px;
        }

        .loading-bar {
            height: 100%;
            background: #fff;
            border-radius: 3px;
            width: 0%;
        }

        .loading-text {
            color: #fff;
            font-size: 14px;
            margin-bottom: 5px;
        }

        .loading-time {
            color: #888;
            font-size: 12px;
        }

        .main-wrapper {
            display: flex;
            flex-direction: column;
            height: 100%;
            padding-top: 60px;
        }

        /* HEADER */

        .site-header-fixed {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 60px;
            z-index: 100;
            background: #000;
        }

        .game-header {
            flex-shrink: 0;
            height: 50px;
            background-color: #0d0d0d;
            background-image: url('../images/tower/headerBg.webp');
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px;
            border-bottom: 1px solid #222;
            z-index: 120;
            position: relative;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .icon-btn {
            width: 30px;
            height: 30px;
            cursor: pointer;
        }

        .menu-icon {
            font-size: 20px;
            cursor: pointer;
            padding: 5px;
        }

        .header-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            line-height: 1.1;
        }

        .round-info {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            color: #aaa;
        }

        .signal-icon {
            color: #00ff00;
            font-size: 11px;
        }

        .balance-info {
            font-size: 13px;
            font-weight: bold;
            color: #fff;
        }

        /* SIDEBAR */

        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9998;
            display: none;
        }

        .sidebar-overlay.show {
            display: block;
        }

        .sidebar {
            position: fixed;
            top: 0;
            left: -300px;
            width: 280px;
            height: 100%;
            background: #111;
            z-index: 9999;
            transition: left 0.3s ease;
            overflow-y: auto;
        }

        .sidebar.show {
            left: 0;
        }

        .sidebar-header {
            padding: 20px 15px;
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            border-bottom: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sidebar-header h3 {
            margin: 0;
            font-size: 18px;
            color: #f1c40f;
        }

        .sidebar-close {
            font-size: 24px;
            cursor: pointer;
            color: #fff;
        }

        .sidebar-menu {
            padding: 10px 0;
        }

        .sidebar-item {
            padding: 15px 20px;
            border-bottom: 1px solid #222;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: 0.2s;
        }

        .sidebar-item:hover,
        .sidebar-item.active {
            background: #1a1a2e;
        }

        .sidebar-item i {
            font-size: 18px;
            color: #f1c40f;
            width: 25px;
        }

        .sidebar-item span {
            font-size: 14px;
        }

        /* Sound Toggle */

        .sound-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .toggle-switch {
            width: 50px;
            height: 26px;
            background: #333;
            border-radius: 13px;
            position: relative;
            cursor: pointer;
        }

        .toggle-switch.on {
            background: #2ecc71;
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            width: 22px;
            height: 22px;
            background: #fff;
            border-radius: 50%;
            top: 2px;
            left: 2px;
            transition: 0.2s;
        }

        .toggle-switch.on::after {
            left: 26px;
        }

        .sidebar-content {
            display: none;
            padding: 15px;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }

        .sidebar-content.active {
            display: block;
        }

        .sidebar-content h4 {
            color: #f1c40f;
            margin-bottom: 15px;
            font-size: 16px;
        }

        /* Bet History Table */

        .bet-history-table {
            width: 100%;
            font-size: 11px;
        }

        .bet-history-table th {
            background: #222;
            padding: 8px 5px;
            text-align: left;
            color: #aaa;
        }

        .bet-history-table td {
            padding: 8px 5px;
            border-bottom: 1px solid #222;
        }

        .bet-history-table .win {
            color: #2ecc71;
        }

        .bet-history-table .lost {
            color: #e74c3c;
        }

        /* Game Rules */

        .rules-content {
            font-size: 12px;
            line-height: 1.6;
            color: #ccc;
        }

        .rules-content h5 {
            color: #f1c40f;
            margin: 15px 0 10px;
            font-size: 14px;
        }

        .rules-content p {
            margin-bottom: 10px;
        }

        .rules-content ul {
            padding-left: 20px;
            margin-bottom: 15px;
        }

        .rules-content li {
            margin-bottom: 6px;
        }

        .rules-highlight {
            background: #1a1a2e;
            padding: 10px;
            border-radius: 8px;
            margin: 10px 0;
            border-left: 3px solid #f1c40f;
        }

        /* Provably Fair */

        .fair-box {
            background: #1a1a2e;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .fair-label {
            font-size: 11px;
            color: #888;
            margin-bottom: 5px;
        }

        .fair-value {
            font-size: 12px;
            color: #fff;
            word-break: break-all;
            background: #000;
            padding: 8px;
            border-radius: 5px;
            font-family: monospace;
        }

        .copy-btn {
            background: #f1c40f;
            color: #000;
            border: none;
            padding: 5px 15px;
            border-radius: 5px;
            font-size: 11px;
            cursor: pointer;
            margin-top: 10px;
        }

        /* GAME AREA */

        .game-scroll-area {
            flex-grow: 1;
            overflow: hidden;
            position: relative;
            background: #000;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .bg-sky {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 0;
        }

        .move-layer {
            position: absolute;
            transition: bottom 0.5s ease-in-out;
        }

        .bg-sun {
            bottom: 15%;
            left: 50%;
            width: 180px;
            margin-left: -90px;
            z-index: 1;
            animation: sunSpin 20s linear infinite;
        }

        @keyframes sunSpin {
            100% {
                transform: rotate(360deg);
            }
        }

        .bg-cloud {
            width: 180px;
            height: auto;
            z-index: 1;
            opacity: 0.8;
        }

        .c1 {
            top: 10%;
            right: -30%;
            animation: cloudMove 45s linear infinite;
        }

        @keyframes cloudMove {
            0% {
                right: -50%;
            }

            100% {
                right: 120%;
            }
        }

        .bg-house {
            height: 60%;
            bottom: 0%;
            left: 0;
            width: 100%;
            object-fit: fill;
            z-index: 2;
        }

        .bg-floor {
            bottom: 12%;
            left: 50%;
            transform: translateX(-50%);
            width: 110px;
            height: auto;
            z-index: 5;
        }

        #pixiContainer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 20;
        }

        /* FOOTER UI */

        .bottom-section {
            flex-shrink: 0;
            width: 100%;
            z-index: 100;
            background: #000;
        }

        .end-line {
            width: 100%;
            height: 2px;
            background-image: url('../images/tower/end.webp');
            background-size: 100% 100%;
            margin-bottom: -1px;
        }

        .game-footer {
            position: relative;
            padding: 10px 15px 15px 15px;
            background-color: #000;
            overflow: hidden;
        }

        .game-footer::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('../images/tower/betx.webp');
            background-size: 100% 100%;
            opacity: 0.3;
            z-index: 0;
        }

        .control-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            gap: 8px;
            position: relative;
            z-index: 1;
        }

        .blue-btn {
            width: 28%;
            height: 40px;
            background-image: url('../images/tower/blue.webp');
            background-size: 100% 100%;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 12px;
            color: #fff;
            cursor: pointer;
        }

        .blue-btn.disabled {
            opacity: 0.5;
            pointer-events: none;
        }

        .input-group-custom {
            width: 40%;
            height: 42px;
            background-image: url('../images/tower/bet.webp');
            background-size: 100% 100%;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 5px;
        }

        .input-group-custom.disabled {
            opacity: 0.5;
            pointer-events: none;
        }

        .action-icon {
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.6);
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .bet-display {
            background: transparent;
            border: none;
            color: #fff;
            text-align: center;
            width: 100%;
            font-weight: bold;
            font-size: 15px;
            cursor: pointer;
        }

        .build-btn-wrapper {
            position: relative;
            width: 100%;
            height: 55px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            z-index: 1;
        }

        .build-btn,
        .cashout-btn {
            height: 100%;
            border-radius: 12px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            transition: all 0.3s;
            cursor: pointer;
        }

        .build-btn {
            width: 100%;
            background-image: url('../images/tower/buildBtn.webp');
            background-size: 100% 100%;
            font-size: 22px;
            font-weight: 900;
            color: #3e2723;
            text-transform: uppercase;
        }

        .cashout-btn {
            width: 0;
            background-image: url('../images/tower/blue.webp');
            background-size: 100% 100%;
            font-size: 16px;
            font-weight: bold;
            color: #fff;
            opacity: 0;
            white-space: nowrap;
            display: flex;
            flex-direction: column;
        }

        .build-btn.active-play {
            width: 48% !important;
        }

        .cashout-btn.active-play {
            width: 48% !important;
            opacity: 1;
            margin-right: 5px;
        }

        .bolt-icon {
            position: absolute;
            width: 18px;
            height: auto;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
            pointer-events: none;
        }

        .bolt-left {
            left: 8px;
        }

        .bolt-right {
            right: 8px;
        }

        .liner-anim {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('../images/tower/liner.webp');
            background-repeat: repeat-x;
            background-size: auto 100%;
            opacity: 0.6;
            animation: moveBg 10s linear infinite;
            pointer-events: none;
        }

        @keyframes moveBg {
            from {
                background-position: 0 0;
            }

            to {
                background-position: 500px 0;
            }
        }

        /* Bet Popup */

        .bet-popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .bet-popup-overlay.show {
            display: flex;
        }

        .bet-popup-content {
            background: #1a1a1a;
            width: 90%;
            max-width: 320px;
            border-radius: 15px;
            padding: 20px;
            border: 1px solid #333;
            text-align: center;
        }

        .popup-title {
            color: #f1c40f;
            font-size: 16px;
            margin-bottom: 15px;
            text-transform: uppercase;
            font-weight: bold;
        }

        .popup-input-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            gap: 10px;
        }

        .popup-limit-btn {
            background: #333;
            color: #fff;
            border: none;
            padding: 10px 15px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            font-size: 12px;
        }

        .popup-main-input {
            background: transparent;
            border: none;
            border-bottom: 2px solid #f1c40f;
            color: #fff;
            text-align: center;
            font-size: 28px;
            width: 60%;
            outline: none;
            font-weight: bold;
        }

        .quick-btns-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }

        .q-btn {
            background: #262626;
            border: 1px solid #444;
            color: #fff;
            padding: 12px;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            font-weight: bold;
        }

        .popup-ok-btn {
            background: #f1c40f;
            color: #000;
            border: none;
            width: 100%;
            padding: 14px;
            border-radius: 10px;
            font-weight: 900;
            font-size: 18px;
            cursor: pointer;
        }

        /* WIN/LOSE POPUPS - Full Width */

        .result-popup,
        .insufficient-popup {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 200;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeInPopup 0.3s ease;
        }

        @keyframes fadeInPopup {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .result-content,
        .insufficient-content {
            position: relative;
            width: 100%;
            border-radius: 0;
            overflow: hidden;
        }

        .popup-bg-img {
            width: 100%;
            height: auto;
            display: block;
        }

        .popup-text {
            position: absolute;
            top: 55%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            width: 100%;
        }

        .lose-popup .oops-text {
            font-size: 32px;
            font-weight: 900;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .win-popup .win-title {
            font-size: 28px;
            font-weight: 900;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            margin-bottom: 5px;
        }

        .win-popup .win-amount {
            font-size: 24px;
            font-weight: bold;
            color: #f1c40f;
            text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        }

        .insufficient-popup .oops-text {
            font-size: 20px;
            font-weight: 900;
            color: #fff;
            margin-bottom: 10px;
        }

        .insufficient-popup .deposit-btn {
            display: inline-block;
            background: linear-gradient(135deg, #f1c40f, #f39c12);
            color: #000;
            padding: 10px 30px;
            border-radius: 25px;
            font-weight: 900;
            font-size: 14px;
            text-decoration: none;
        }

        /* BIG WIN POPUP */

        .bigwin-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeInBigWin 0.5s ease;
        }

        @keyframes fadeInBigWin {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .bigwin-content {
            position: relative;
            width: 90%;
            max-width: 400px;
            border-radius: 20px;
            overflow: hidden;
            animation: scaleInBigWin 0.5s ease;
        }

        @keyframes scaleInBigWin {
            from {
                transform: scale(0.5);
            }

            to {
                transform: scale(1);
            }
        }

        .bigwin-bg-img {
            width: 100%;
            height: auto;
            display: block;
        }

        .bigwin-text {
            position: absolute;
            top: 65%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            width: 100%;
        }

        .bigwin-text .congrats-text {
            font-size: 16px;
            color: #fff;
            margin-bottom: 5px;
        }

        .bigwin-text .bigwin-title {
            font-size: 32px;
            font-weight: 900;
            color: #fff;
            margin-bottom: 10px;
        }

        .bigwin-text .bigwin-amount {
            font-size: 28px;
            font-weight: bold;
            color: #f1c40f;
            text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        }