/* Chicken Road CSS - Position Adjusted (10px Up) */

body {
    background-color: #1b1f28;
    color: white;
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0;
    touch-action: pan-y;
}

/* Header & Menu (Same as before) */

.chicken-header {
    width: 100%;
    background-color: #3a3d51;
    height: 40px;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    border-bottom: 1px solid #4e5062;
    margin-top: 60px !important;
    margin-bottom: 0px
}

.ch-left {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.ch-logo {
    height: 30px;
    width: auto;
}

.ch-balance {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ch-right {
    display: flex;
    align-items: center;
}

.ch-menu-icon {
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
}

.menu-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #2b3040;
    width: 280px;
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.5);
    display: none;
    border-left: 1px solid #4e5062;
    border-bottom: 1px solid #4e5062;
    border-bottom-left-radius: 10px;
    z-index: 3000 !important;
}

.menu-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info {
    padding: 20px;
    background: #242934;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #2ecc71;
}

.user-name {
    font-weight: bold;
    font-size: 16px;
    color: white;
    display: block;
}

.change-avatar {
    font-size: 12px;
    color: #888;
    cursor: pointer;
}

.menu-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #ccc;
    transition: 0.2s;
}

.menu-item:hover {
    background: #34495e;
    color: white;
}

.menu-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.menu-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-toggle-row span {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ccc;
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4e5062;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.powered-by {
    text-align: center;
    padding: 15px;
    font-size: 11px;
    color: #666;
    background: #242934;
}

.powered-by img {
    height: 14px;
    vertical-align: middle;
    opacity: 0.7;
    margin-left: 5px;
}

/* Game Container */

.game-container {
    height: 350px;
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    background-color: #2c3e50;
    margin: 0 auto;
    scroll-behavior: smooth;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}

.game-container::-webkit-scrollbar {
    display: none;
}

.image-wrapper {
    display: flex;
    height: 100%;
    width: max-content;
    position: relative;
}

.game-image-wrapper {
    display: inline-block;
    height: 100%;
    position: relative;
    flex-shrink: 0;
    width: calc(100vw / 2.6);
}

@media (min-width: 1200px) {
    .game-image-wrapper {
        width: calc(1200px / 2.6);
    }
}

.game-image {
    height: 100%;
    width: 100%;
    object-fit: fill;
    display: block;
}

/* Coins & Text */

.coin {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: transform 0.3s, filter 0.3s;
}

.coin.flip {
    animation: coinFlip 0.5s ease-out forwards;
}

@keyframes coinFlip {
    0% {
        transform: translate(-50%, -50%) rotateY(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateY(360deg);
    }
}

.coin.invisible-coin {
    opacity: 0 !important;
}

.coin-multiplier {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 900;
    font-size: 22px;
    z-index: 30 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #ffffff !important;
    -webkit-text-stroke: 0.6px black;
    text-shadow: none !important;
}

.coin-multiplier.hidden {
    display: none;
    opacity: 0;
}

.coin-multiplier.active-yellow {
    font-size: 24px;
}

.coin-multiplier.cashed-neon {
    font-size: 26px;
    transform: translate(-50%, -60%);
}

.currency-circle-white {
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    margin-left: 2px;
    vertical-align: middle;
}

/* --- EFFECTS (POSITION ADJUSTED +10px) --- */

.chicken {
    position: absolute;
    width: 110px;
    height: 110px;
    bottom: 22px;
    /* ✅ Raised from 12px */
    left: 23%;
    transform: translateX(-50%);
    z-index: 25;
    pointer-events: none;
    transition: left 0.5s ease;
}

.chicken-jump {
    animation: jump 0.4s ease;
}

/* Jump height relative to new bottom */

@keyframes jump {
    0% {
        bottom: 22px;
    }
    50% {
        bottom: 70px;
    }
    100% {
        bottom: 22px;
    }
}

.chicken-burnt-static {
    position: absolute;
    width: 110px;
    height: 110px;
    bottom: 22px;
    /* ✅ Raised from 12px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 26;
    pointer-events: none;
    display: none;
}

.chicken-burnt-static.active {
    display: block;
}

@keyframes vanishFire {
    0% {
        opacity: 1;
    }
    /* Shuru mein dikhega */
    80% {
        opacity: 1;
    }
    /* 0.8 second tak pura dikhega */
    100% {
        opacity: 0;
    }
    /* 1 second hote hi gayab */
}

.fire-effect {
    position: absolute;
    bottom: 22px;
    left: 0;
    width: 100%;
    height: 60%;
    background: url('../images/fire.gif') center bottom / contain no-repeat;
    opacity: 0;
    z-index: 28;
    pointer-events: none;
    /* Transition hata diya, ab animation use karenge */
}

.fire-effect.active {
    opacity: 1;
}

.fire-effect.full-burn {
    height: 90% !important;
    width: 100% !important;
    /* Image Change */
    background-image: url('../images/fullfire.gif') !important;
    background-size: cover !important;
    z-index: 30;
    /* ✅ Ye code usko 1 second mein gayab kar dega */
    animation: vanishFire 2s forwards !important;
}

.gate-glow {
    position: absolute;
    bottom: 22px;
    /* ✅ Raised from 0 */
    left: 0;
    width: 100%;
    height: 60%;
    opacity: 0;
    z-index: 6;
    transition: opacity 0.5s ease, background 0.5s ease;
    pointer-events: none;
}

.gate-glow.active {
    background: linear-gradient(to top, rgba(255, 235, 59, 0.25) 0%, transparent 100%);
    opacity: 1;
}

.gate-glow.cashout-glow {
    background: linear-gradient(to top, rgba(0, 255, 200, 0.25) 0%, transparent 100%) !important;
    opacity: 1;
}

/* Controls & Popup (Same as before) */

.betx-section {
    background: #161824;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    padding-top: 10px;
    position: relative;
    z-index: 2000;
}

.bet-section {
    background: #3a3d51;
    border: 1px solid #4e5062;
    padding: 10px;
    border-radius: 10px;
    margin: 0 auto;
    width: 95%;
}

.bet-controls {
    display: flex;
    justify-content: space-between;
    background: #4e5062;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.bet-btn {
    background: #4e5062;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.bet-amount-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.quick-bets {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
}

.quick-bet {
    background: #4e5062;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 16px;
    flex: 1;
    min-width: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

#modeSelect {
    width: 100%;
    padding: 12px;
    background: #4e5062;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    cursor: pointer;
}

.play-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 28px;
    font-weight: bold;
    width: 100%;
    box-shadow: 0 5px #27ae60;
    cursor: pointer;
}

.play-btn:active {
    transform: translateY(3px);
}

.game-actions {
    display: none;
    gap: 10px;
    margin-top: 15px;
}

.cashout-btn {
    background: #f1c40f;
    color: #34495e;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    flex: 1;
    text-align: center;
    box-shadow: 0 5px #d4ac0d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.go-btn {
    background: #2ecc71;
    color: white;
    padding: 28px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    flex: 1;
    box-shadow: 0 5px #27ae60;
    border: none;
    cursor: pointer;
}

.cashout-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 2px solid #888;
    border-radius: 10px;
    padding: 15px 30px;
    min-width: 200px;
    text-align: center;
    z-index: 3000;
    display: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@keyframes shakePopup {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        transform: translate(-55%, -50%) rotate(-5deg) scale(1.1);
    }
    40% {
        transform: translate(-45%, -50%) rotate(5deg) scale(1.1);
    }
    60% {
        transform: translate(-52%, -50%) rotate(-3deg) scale(1.1);
    }
    80% {
        transform: translate(-48%, -50%) rotate(3deg) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
}

.cashout-popup.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: shakePopup 0.5s ease-out;
}

.win-text {
    font-size: 20px;
    font-weight: 900;
    color: white;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.multiplier-text {
    font-size: 26px;
    font-weight: bold;
    color: #f1c40f;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.popup-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
}

.amount-text {
    font-size: 18px;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.currency-circle {
    width: 18px;
    height: 18px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 5px #2ecc71;
}

/* Loaders/Modals from previous steps remain same */

#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f131a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loader-logo {
    width: 150px;
    margin-bottom: 20px;
}

.loader-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #f1c40f;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: #888;
    font-size: 14px;
    letter-spacing: 1px;
}

.info-modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.info-modal-content {
    background-color: #2b3040;
    color: #ecf0f1;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s;
    display: flex;
    flex-direction: column;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #3a3d51;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin: 0;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: #888;
}

.modal-body {
    padding: 20px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
}

.seed-group {
    margin-bottom: 15px;
}

.seed-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.seed-input-box {
    background: #1f232b;
    border: 1px solid #3a3d51;
    border-radius: 5px;
    padding: 10px;
    font-family: monospace;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-icon {
    cursor: pointer;
    color: #f1c40f;
    font-size: 16px;
}

.rules-list {
    padding-left: 20px;
}

.rules-list li {
    margin-bottom: 8px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    color: #888;
    padding: 10px;
    font-size: 12px;
    border-bottom: 1px solid #3a3d51;
}

.history-table td {
    padding: 10px;
    border-bottom: 1px solid #3a3d51;
    font-size: 13px;
}

.win-amount {
    color: #2ecc71;
    font-weight: bold;
}