/* === CSS Variables & Design Tokens === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222233;

    --accent-gold: #ffd700;
    --accent-gold-dark: #b8860b;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a78bfa;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-green: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --gradient-red: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(180deg, #12121a 0%, #0a0a0f 100%);

    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);
    --shadow-gold: 0 0 30px rgba(255, 215, 0, 0.4);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === App Container === */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.app-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 40%);
    pointer-events: none;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-2%, 2%) rotate(1deg);
    }
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 20px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
    animation: logoSpin 3s ease-in-out infinite;
}

.logo-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }
}

@keyframes logoSpin {

    0%,
    100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(15deg);
    }
}

.logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;

    /* Neon effect */
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #8b5cf6,
        0 0 40px #8b5cf6,
        0 0 60px #8b5cf6,
        0 0 80px #8b5cf6;

    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #8b5cf6,
            0 0 40px #8b5cf6,
            0 0 60px #8b5cf6;
        opacity: 1;
    }

    50% {
        text-shadow:
            0 0 2px #fff,
            0 0 5px #fff,
            0 0 10px #8b5cf6,
            0 0 20px #8b5cf6,
            0 0 30px #8b5cf6;
        opacity: 0.9;
    }
}

.balance-container {
    display: flex;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
    flex-shrink: 1;
}

.balance-item.rub {
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.balance-item.usd {
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.balance-icon {
    font-size: 14px;
}

.balance-value {
    color: var(--accent-gold);
    font-weight: 700;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-currency {
    color: var(--text-secondary);
    font-size: 10px;
    flex-shrink: 0;
}

/* === Main Content === */
.main-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 80px;
    /* Space for FAB button */
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* === Section Title === */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.title-icon {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Games Grid === */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.game-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: var(--shadow-glow);
}

.game-card:active {
    transform: scale(0.98);
}

.game-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-purple);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover .game-card-glow {
    opacity: 1;
}

.game-card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.game-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: iconFloat 3s ease-in-out infinite;
}

.game-card:hover .game-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.game-desc {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* === Game View === */
.game-view {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.back-btn span {
    font-size: 18px;
}

/* === Game Container === */
.game-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.game-header {
    text-align: center;
    margin-bottom: 24px;
}

.game-big-icon {
    font-size: 64px;
    margin-bottom: 12px;
    animation: iconFloat 3s ease-in-out infinite;
}

.game-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-rules {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Bet Section === */
.bet-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.currency-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.currency-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.currency-btn.active {
    background: var(--gradient-purple);
    border-color: transparent;
    color: white;
}

.currency-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.bet-amount {
    margin-bottom: 12px;
}

.bet-amount label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bet-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bet-adjust {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-adjust:hover {
    background: rgba(255, 255, 255, 0.2);
}

.bet-adjust:active {
    transform: scale(0.95);
}

.bet-input {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    font-family: inherit;
}

.bet-input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.quick-bets {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-bet {
    flex: 1;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-bet:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

/* === Play Button === */
.play-btn {
    position: relative;
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--gradient-gold);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.play-btn-text {
    position: relative;
    z-index: 1;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a25;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: btnGlow 2s infinite;
}

@keyframes btnGlow {
    to {
        left: 100%;
    }
}

/* === Dice Game === */
.dice-result {
    text-align: center;
    margin-bottom: 24px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dice-face {
    font-size: 100px;
    animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {
    0% {
        transform: rotate(0deg) scale(0.5);
        opacity: 0;
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

.result-text {
    font-size: 20px;
    font-weight: 700;
    margin-top: 16px;
}

.result-text.win {
    color: var(--accent-green);
}

.result-text.lose {
    color: var(--accent-red);
}

/* === Slots Game === */
.slots-machine {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 30px 20px;
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a25 100%);
    border-radius: var(--radius-lg);
    border: 3px solid var(--accent-gold);
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.5);
}

.slot-reel {
    width: 80px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    background: linear-gradient(180deg, #12121a 0%, #0a0a0f 100%);
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slot-reel.spinning {
    animation: slotSpin 0.1s linear infinite;
}

@keyframes slotSpin {
    0% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(5px);
    }
}

.slots-result {
    text-align: center;
    margin-bottom: 24px;
}

/* === Blackjack Game === */
.blackjack-table {
    background: linear-gradient(145deg, #1a5d3f 0%, #0d3a27 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    border: 3px solid var(--accent-gold);
}

.cards-row {
    margin-bottom: 16px;
}

.cards-row:last-child {
    margin-bottom: 0;
}

.cards-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.cards-label span {
    font-weight: 700;
    color: var(--accent-gold);
}

.cards-container {
    display: flex;
    gap: 8px;
    min-height: 70px;
    flex-wrap: wrap;
}

.card {
    width: 48px;
    height: 68px;
    background: white;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: cardDeal 0.3s ease;
}

@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-30px) rotateY(90deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

.card.red {
    color: #dc2626;
}

.card.black {
    color: #1a1a25;
}

.card.hidden {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: transparent;
}

.card.hidden::before {
    content: '?';
    color: white;
    font-size: 20px;
}

.blackjack-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.hit-btn {
    background: var(--gradient-green);
    color: white;
}

.stand-btn {
    background: var(--gradient-red);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn:active {
    transform: scale(0.98);
}

.blackjack-result {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

/* === Roulette Game === */
.roulette-wheel {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #2d2d3d 0%, #1a1a25 100%);
    border-radius: 50%;
    border: 4px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
}

.wheel-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--accent-gold);
}

.wheel-number.red {
    color: var(--accent-red);
}

.wheel-number.black {
    color: white;
}

.wheel-number.green {
    color: var(--accent-green);
}

.roulette-wheel.spinning .wheel-number {
    animation: wheelSpin 0.1s linear infinite;
}

@keyframes wheelSpin {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.roulette-bets {
    margin-bottom: 24px;
}

.bet-type-grid {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.bet-type-btn {
    flex: 1;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-type-btn:hover {
    background: var(--bg-card-hover);
}

.bet-type-btn.active {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.bet-type-btn.red.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-red);
}

.bet-type-btn.black.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.bet-type-btn.green.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--accent-green);
}

.roulette-result {
    text-align: center;
    margin-bottom: 24px;
}

/* === Promo FAB === */
.promo-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s;
    animation: fabPulse 2s infinite;
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    }
}

.promo-fab:hover,
.deposit-fab:hover {
    transform: scale(1.1);
}

/* === FAB Container === */
.fab-container {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.deposit-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: all 0.3s;
    animation: depositPulse 2s infinite;
}

@keyframes depositPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    }
}

/* === Deposit Modal Styles === */
.deposit-content {
    max-width: 380px;
}

.deposit-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.deposit-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

.deposit-option-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.deposit-option-info {
    flex: 1;
    min-width: 0;
}

.deposit-option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.deposit-option-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.deposit-option-btn {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: var(--gradient-green);
    border: none;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.deposit-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
}

.deposit-option-btn.stars-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.deposit-option-btn.stars-btn:hover {
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.deposit-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.daily-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-top: 4px;
}

.timer-icon {
    font-size: 18px;
}

.timer-text {
    font-size: 13px;
    color: var(--text-secondary);
}

#timer-countdown {
    font-weight: 700;
    color: var(--accent-red);
    font-family: monospace;
}

/* === Stars Info Block === */
.stars-info {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.stars-info-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars-packages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.stars-pkg {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    text-align: center;
}

.deposit-option-btn.full-width {
    width: 100%;
    margin-top: 4px;
}

/* === Modal === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, #1e1e2e 0%, #12121a 100%);
    border-radius: var(--radius-xl);
    padding: 35px 30px 30px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    border: 2px solid rgba(139, 92, 246, 0.3);
    animation: modalIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.2);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: inline-block;
    animation: iconGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

@keyframes iconGlow {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.8));
    }
}

.modal-content h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.promo-input {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(139, 92, 246, 0.2);
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: inherit;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.promo-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
}

.promo-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.promo-submit {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--gradient-gold);
    border: none;
    color: #1a1a25;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.promo-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: btnGlow 2s infinite;
}

.promo-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold), 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-card);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.success {
    border-color: var(--accent-green);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.2) 0%, var(--bg-card) 100%);
}

.toast.error {
    border-color: var(--accent-red);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, var(--bg-card) 100%);
}

/* === Utility Classes === */
.hidden {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 380px) {
    .games-grid {
        gap: 12px;
    }

    .game-icon {
        font-size: 40px;
    }

    .game-title {
        font-size: 16px;
    }

    .balance-container {
        gap: 8px;
    }

    .balance-item {
        padding: 4px 8px;
        font-size: 12px;
    }

    .slot-reel {
        width: 60px;
        height: 80px;
        font-size: 40px;
    }
}