/* ==========================================================================
   HelixWin — Game Theme Components
   Helix Jump–inspired mobile game UI
   ========================================================================== */


/* =========================================================================
   1. ORANGE 3D BUTTON (Helix Jump PLAY style)
   ========================================================================= */

.btn-game {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 40px;
    background: var(--orange-gradient);
    color: white;
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    box-shadow: var(--orange-shadow);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
    white-space: nowrap;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.btn-game:active {
    transform: translateY(4px);
    box-shadow: var(--orange-shadow-pressed);
}

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

.btn-game--small {
    padding: 10px 24px;
    font-size: 14px;
}

.btn-game--full {
    width: 100%;
}

.btn-game--green {
    background: linear-gradient(180deg, #2ECC71, #27AE60);
    box-shadow: 0 6px 0 #1E8449, 0 8px 20px rgba(46, 204, 113, 0.4);
}

.btn-game--green:active {
    box-shadow: 0 2px 0 #1E8449;
}

.btn-game--red {
    background: linear-gradient(180deg, #E74C3C, #C0392B);
    box-shadow: 0 6px 0 #922B21, 0 8px 20px rgba(231, 76, 60, 0.4);
}

.btn-game--red:active {
    box-shadow: 0 2px 0 #922B21;
}

.btn-game--gray {
    background: linear-gradient(180deg, #95A5A6, #7F8C8D);
    box-shadow: 0 6px 0 #616A6B, 0 8px 20px rgba(149, 165, 166, 0.4);
}

.btn-game--gray:active {
    box-shadow: 0 2px 0 #616A6B;
}


/* =========================================================================
   2. GAME CARD (white translucent popup)
   ========================================================================= */

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    color: var(--text-card);
}

.game-card__title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
}


/* =========================================================================
   3. MODAL / OVERLAY
   ========================================================================= */

.game-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: var(--space-lg);
    animation: fadeIn 0.2s;
}

.game-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px var(--space-xl) var(--space-xl);
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
    color: var(--text-card);
    position: relative;
}

.game-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(180deg, #E74C3C, #C0392B);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================================
   4. GAME INPUT
   ========================================================================= */

.game-input-group {
    margin-bottom: var(--space-md);
}

.game-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-card-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-card);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text-card);
    transition: border 0.2s;
}

.game-input:focus {
    outline: none;
    border-color: var(--orange);
}

.game-input--icon {
    padding-left: 44px;
}

.game-input-wrapper {
    position: relative;
}

.game-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.game-input-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 4px;
}


/* =========================================================================
   5. COIN / BALANCE DISPLAY
   ========================================================================= */

.coin-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #FFFFFF, #E8EAED);
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 -2px 0 rgba(0,0,0,0.1);
    padding: 6px 16px 6px 8px;
    border-radius: var(--radius-xl);
    font-weight: 900;
    font-size: 16px;
    color: #27AE60;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
    transition: transform 0.1s;
}
.coin-display:active {
    transform: scale(0.95);
}

.coin-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.coin-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}


/* =========================================================================
   9. ANIMATIONS (keyframes)
   ========================================================================= */

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes balanceUp {
    0%   { transform: scale(1); color: inherit; }
    50%  { transform: scale(1.2); color: var(--green); }
    100% { transform: scale(1); color: inherit; }
}


/* =========================================================================
   10. LOADING SPINNER
   ========================================================================= */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner--dark {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--orange);
}


/* =========================================================================
   11. QUICK AMOUNT SELECTOR (deposit)
   ========================================================================= */

.amount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    row-gap: 18px;
}

.amount-btn {
    position: relative;
    padding: 14px 10px 12px;
    border: 2px solid var(--border-card);
    border-radius: var(--radius-md);
    background: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    color: var(--text-card);
    overflow: visible;
}

.amount-btn .deposit-bonus-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--green), #27ae60);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.35);
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
}

.amount-btn .deposit-bonus-tag svg {
    flex-shrink: 0;
}

.amount-btn .deposit-bonus-total {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    margin-top: 2px;
}

.amount-btn:hover,
.amount-btn--active {
    border-color: var(--orange);
    background: rgba(230, 57, 70, 0.08);
    color: var(--orange);
}

.amount-btn--active .deposit-bonus-total {
    color: var(--orange);
}

.amount-btn--popular {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green), 0 2px 8px rgba(46, 204, 113, 0.15);
}


/* =========================================================================
   12. BET SELECTOR
   ========================================================================= */

.bet-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.bet-selector__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card-dark);
    border: 2px solid var(--border-light);
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-selector__value {
    font-size: 28px;
    font-weight: 800;
    min-width: 120px;
    text-align: center;
}


/* =========================================================================
   13. USER AVATAR
   ========================================================================= */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--orange-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}


/* =========================================================================
   15. MOBILE OPTIMIZATION
   ========================================================================= */

/* Ensure all buttons and inputs are touch-friendly */
button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
    font-size: 16px;
}

/* Buttons never break text */
.btn-game {
    white-space: nowrap;
}

@media (max-width: 420px) {
    .btn-game {
        padding: 14px 24px;
        font-size: 17px;
    }

    .game-card {
        padding: var(--space-lg) var(--space-md);
    }

    .game-modal {
        padding: var(--space-lg) var(--space-md);
        margin: var(--space-sm);
    }

    .bet-selector__value {
        font-size: 24px;
        min-width: 100px;
    }
}

