body {
    background: #393939;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 1200px;
    margin: 30px auto;
    background: #2c3240;
    border-radius: 16px;
    box-shadow: 0 4px 24px #0002;
    padding: 24px 32px 32px 32px;
    margin-top: 64px;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.game-title {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.balance-box {
    background: #383f4e;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn {
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 2px;
    transition: background 0.2s;
    background: #444a5a;
    color: #fff;
}
.btn.help { background: #444a5a; color: #fff; }
.road {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    border-radius: 16px;
    padding: 32px 16px 24px 16px;
    margin-bottom: 32px;
    min-height: 220px;
    box-shadow: 0 2px 8px #0001;
    background: linear-gradient(90deg, #b0b0b0 0 10%, #444a5a 10% 90%, #b0b0b0 90% 100%);
    overflow: hidden;
}
.road .lane {
    width: 100px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    margin: 0 0px;
    z-index: 1;
}
.road .lane:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    border-right: 4px dashed #fff;
    opacity: 0.7;
    z-index: 2;
}
.lane .item {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 8px;
}
.lane .chicken {
    width: 80px;
    height: 80px;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    margin-bottom: 0;
    z-index: 2;
}
.lane .multiplier {
    background: #444a5a;
    color: #ffe066;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 3px solid #232834;
}
.lane .obstacle {
    font-size: 2.5rem;
    margin-bottom: 8px;
}
.lane .coin {
    font-size: 2.5rem;
    margin-bottom: 8px;
}
.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    justify-content: center;
}
.wager-label, .difficulty-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 8px;
}
.bet-btn {
    background: #383f4e;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.bet-btn:active { background: #1e293b; }
.wager-box {
    background: #232834;
    border-radius: 6px;
    padding: 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 50px;
    display: inline-block;
    text-align: center;
}
.diff-btn {
    background: #383f4e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.2s;
}
.diff-btn.active, .diff-btn:active {
    background: #ffe066;
    color: #232834;
}
.action-bar {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}
.play-btn {
    border: none;
    border-radius: 8px;
    padding: 0 32px;
    height: 48px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.go-btn {
    background: #22c55e;
    color: #fff;
}
.go-btn:active { background: #16a34a; }
.cashout-btn {
    background: #ffe066;
    color: #232834;
}
.cashout-btn:active { background: #fbbf24; }
.play-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.info-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 10px;
    font-size: 1.1rem;
}
.highlight {
    color: #ffe066;
    font-weight: 700;
}
.game-message {
    text-align: center;
    margin-top: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e11d48;
    min-height: 28px;
}
@media (max-width: 1000px) {
    .container { padding: 12px 2vw; }
    .road { padding: 12px 2px; }
    .lane { width: 50px; height: 90px; }
    .lane .item, .lane .chicken { width: 40px; height: 40px; font-size: 1.5rem; }
}
.animate-chicken {
    animation: chicken-move 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes chicken-move {
    0% { transform: translateY(-30px) scale(0.7); opacity: 0; }
    60% { transform: translateY(10px) scale(1.1); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.animate-multiplier {
    animation: multiplier-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes multiplier-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.topbar {
    width: 100%;
    background: #393939;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}
.logo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 2rem;
    font-weight: bold;
}
.logo {
    font-size: 2.2rem;
}
.title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.live-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1rem;
    color: #d1d5db;
}
.live-wins {
    color: #ffe066;
    font-weight: 600;
}
.online-dot {
    color: #22c55e;
    font-size: 1.2rem;
}
.online-count {
    color: #fff;
    font-weight: 500;
}
.recent-win {
    color: #22c55e;
    font-weight: 600;
}
.recent-user {
    color: #e11d48;
    font-weight: 600;
}
.recent-amount {
    color: #22c55e;
    font-weight: 600;
    margin-left: 4px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn.howtoplay {
    background: #444a5a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn.withdrawal-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn.withdrawal-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
.balance-box {
    background: #383f4e;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
.btn.menu-btn {
    background: #444a5a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    height: 100vh;
    background: #2c3240;
    box-shadow: -4px 0 24px #0005;
    z-index: 100;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    padding: 0 0 16px 0;
}
.sidebar.open {
    right: 0;
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 12px 24px;
    border-bottom: 1px solid #444a5a;
}
.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #444a5a url('https://api.dicebear.com/7.x/bottts/svg?seed=User') center/cover no-repeat;
    border: 2px solid #ffe066;
}
.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.username {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}
.change-avatar {
    background: none;
    border: none;
    color: #ffe066;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    padding: 0;
}
.sidebar-options {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 24px 0 24px;
}
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    color: #fff;
    gap: 12px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444a5a;
    border-radius: 22px;
    transition: .3s;
}
.switch input:checked + .slider {
    background-color: #ffe066;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: .3s;
}
.switch input:checked + .slider:before {
    transform: translateX(16px);
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #ffe066;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
}
.sidebar-link:hover {
    color: #fff;
}
.sidebar-footer {
    margin-top: auto;
    padding: 18px 24px 0 24px;
    color: #fff;
    font-size: 1rem;
    text-align: left;
}
.powered-by b {
    color: #ffe066;
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0008;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.sidebar-overlay.show {
    opacity: 1;
    pointer-events: all;
}
@media (max-width: 1000px) {
    .topbar { padding: 0 6px; }
    .sidebar { width: 90vw; min-width: 0; }
}

/* --- TOP BAR --- */
.new-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #23243a;
    padding: 10px 16px;
    border-bottom: 1.5px solid #35365a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo-circle {
    background: none;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-right: 8px;
    box-shadow: none;
}
.logo-title-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 1px;
    margin-right: 10px;
}
.topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    color: #ffe066;
    white-space: nowrap;
}
.win-amount {
    color: #22c55e;
    font-weight: 700;
    margin-left: 2px;
}
.recent-user {
    color: #fff;
    font-weight: 600;
}
.new-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    margin-left: auto;
}
.new-menu-btn:active, .new-menu-btn:hover {
    background: #35365a;
}

/* --- GAME AREA --- */
.game-area {
    background: #23243a;
    min-height: 320px;
    padding: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}
.new-road {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    position: relative;
    min-height: 180px;
    padding: 24px 8px 16px 8px;
    background: #23243a;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    overflow-x: auto;
    gap: 0;
}
.new-road .lane {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 70px;
    height: 140px;
    margin: 0 2px;
    position: relative;
}
.new-road .lane:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -2px;
    width: 0;
    height: 120px;
    border-right: 2px dashed #fff;
    opacity: 0.3;
    z-index: 2;
}
.lane .chicken {
    width: 64px;
    height: 64px;
    font-size: 3rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: none;
    z-index: 3;
    margin-left: -10px;
}
.lane .multiplier {
    width: 56px;
    height: 56px;
    background: #35365a;
    color: #ffe066;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    border: 3px solid #23243a;
    box-shadow: 0 2px 8px rgba(255,224,102,0.08);
}

/* --- CONTROLS CARD --- */
.controls-card {
    background: #2d2e4a;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
    padding: 22px 14px 28px 14px;
    margin: 0 auto;
    max-width: 420px;
    width: 100%;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}
.bet-btn {
    background: #35365a;
    color: #ffe066;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 8px 18px;
    min-width: 56px;
    transition: background 0.2s;
}
.bet-btn:active, .bet-btn:hover {
    background: #444a5a;
}
.bet-amount-label {
    background: #23243a;
    color: #fff;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 8px 24px;
    min-width: 80px;
    text-align: center;
}
.quick-bets-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.quick-bet-btn {
    background: #35365a;
    color: #ffe066;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    padding: 7px 0;
    min-width: 48px;
    transition: background 0.2s;
}
.quick-bet-btn:active, .quick-bet-btn:hover {
    background: #444a5a;
}
.difficulty-row {
    margin: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.difficulty-select {
    width: 100%;
    background: #35365a;
    color: #ffe066;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 12px;
    margin-top: 2px;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.difficulty-select option {
    color: #23243a;
    background: #ffe066;
    font-weight: 700;
}
.new-play-btn {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 16px 0;
    margin-top: 14px;
    width: 100%;
    box-shadow: 0 2px 12px rgba(34,197,94,0.12);
    letter-spacing: 1px;
    transition: background 0.2s, transform 0.1s;
}
.new-play-btn:active, .new-play-btn:hover {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    transform: scale(0.98);
}

/* --- GENERAL MOBILE OPTIMIZATION --- */
@media (max-width: 600px) {
    .controls-card {
        max-width: 100vw;
        border-radius: 18px 18px 0 0;
        padding: 14px 4vw 18px 4vw;
    }
    .new-road {
        min-height: 140px;
        padding: 16px 2vw 10px 2vw;
    }
    .new-road .lane {
        width: 48px;
        height: 90px;
    }
    .lane .chicken {
        width: 44px;
        height: 44px;
        font-size: 2rem;
        margin-left: -6px;
    }
    .lane .multiplier {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .bet-btn, .quick-bet-btn {
        min-width: 38px;
        font-size: 0.95rem;
        padding: 7px 0;
    }
    .bet-amount-label {
        font-size: 1rem;
        padding: 7px 10px;
        min-width: 60px;
    }
    .difficulty-select {
        font-size: 1rem;
        padding: 7px 8px;
    }
    .new-play-btn {
        font-size: 1.1rem;
        padding: 12px 0;
        margin-top: 10px;
    }
}

/* Remove floating/ghost menu button styles */
.ghost, .floating-menu, .ghost-menu, .ghost-btn {
    display: none !important;
}

.new-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    background: #23243a;
    padding: 0 0 0 0;
    min-height: 110px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
}
.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 18px;
    padding-bottom: 8px;
}
.header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.big-logo {
    font-size: 1.4rem;
    margin: 0;
    line-height: 1;
}
.logo-title-main {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1;
}
@media (min-width: 601px) {
    .big-logo {
        font-size: 2rem;
    }
    .logo-title-main {
        font-size: 1.2rem;
    }
}
.logo-title-sub, .logo-text-stack { display: none !important; }
.new-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.1rem;
    padding: 0 18px 0 0;
    border-radius: 8px;
    transition: background 0.2s;
    align-self: flex-start;
    margin-top: 18px;
    margin-left: auto;
    height: 40px;
    line-height: 1;
}
.new-menu-btn:active, .new-menu-btn:hover {
    background: #35365a;
}
.info-bar-new {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.02rem;
    color: #ffe066;
    background: #23243a;
    padding: 0 0 8px 0;
    border-bottom: 1.5px solid #35365a;
    margin-bottom: 0;
    min-height: 32px;
}
@media (max-width: 600px) {
    .new-header {
        min-height: 60px;
        padding-top: 0;
    }
    .header-center {
        padding-top: 4px;
        padding-bottom: 2px;
    }
    .big-logo {
        font-size: 1.4rem;
        margin-bottom: 0;
    }
    .logo-title-main {
        font-size: 0.95rem;
        margin-bottom: 0;
    }
    .logo-title-sub {
        font-size: 0.85rem;
    }
    .new-menu-btn {
        font-size: 1.1rem;
        padding-right: 6px;
        margin-top: 4px;
        height: 24px;
    }
    .info-bar-new {
        font-size: 0.85rem;
        min-height: 20px;
        padding-bottom: 2px;
    }
}
.header-flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.header-balance {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #ffe066;
    background: #23243a;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 1.05rem;
    margin: 0 6px;
    flex: 1;
    justify-content: flex-end;
}
.recharge-btn-header {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.98rem;
    padding: 6px 16px;
    margin: 0 6px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(34,197,94,0.10);
    display: inline-block;
    flex: 1;
    text-align: right;
}
.new-menu-btn {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
}
@media (max-width: 600px) {
    .header-balance {
        font-size: 0.85rem;
        padding: 3px 8px;
        margin: 0 2px;
    }
    .recharge-btn-header {
        font-size: 0.85rem;
        padding: 3px 8px;
        margin: 0 2px;
    }
    .header-flex-row {
        gap: 2px;
    }
    .header-left {
        gap: 3px;
    }
    .new-menu-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 1.2rem;
    }
}
.balance-bar { display: none !important; } 