/* =========================================================================
   Mobile Responsiveness — Comprehensive Overhaul
   ========================================================================= */

/* =========================================================================
   TABLET BREAKPOINT (≤ 900px)
   ========================================================================= */

@media (max-width: 900px) {

    /* =============================================
       1. GLOBAL LAYOUT
       ============================================= */
    .app-container {
        flex-direction: column;
    }

    .main-content {
        flex-direction: column;
    }

    /* Prevent horizontal overflow everywhere */
    body,
    .content-area,
    .main-content {
        overflow-x: hidden;
    }

    /* =============================================
       2. HEADER
       ============================================= */
    .header {
        padding: var(--spacing-sm);
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: var(--spacing-sm);
        backdrop-filter: blur(10px);
        background: rgba(20, 24, 39, 0.95);
        border-bottom: 1px solid var(--color-border);
    }

    .logo-img {
        height: 45px;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        margin-left: auto;
    }

    /* Notifications visible next to menu */
    .notif-wrapper {
        display: block;
        margin-right: 2px;
    }

    .btn-notif {
        width: 36px;
        height: 36px;
    }

    .notif-dropdown {
        position: fixed;
        top: 70px;
        left: 5%;
        right: 5%;
        width: 90%;
        max-width: none;
        z-index: 2000;
    }

    .balance-display {
        flex-grow: 0;
        width: auto;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .mobile-menu-btn {
        display: block !important;
        background: transparent;
        border: none;
        color: var(--color-text-primary);
        font-size: 2rem;
        cursor: pointer;
        padding: var(--spacing-xs);
    }

    .header-actions {
        display: none;
        position: absolute;
        top: 65px;
        right: 10px;
        background: var(--color-bg-secondary);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        width: 250px;
    }

    .header-actions.show {
        display: flex;
    }

    .auth-controls {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }
    .mobile-only.mobile-bottom-nav {
        display: flex !important;
    }

    /* =============================================
       3. BOTTOM NAVIGATION (Stake.com Style)
       ============================================= */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: var(--color-bg-secondary);
        border-top: 1px solid var(--color-border);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 10000;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    }

    .main-content {
        padding-bottom: 75px !important;
    }

    .mobile-nav-item {
        flex: 1;
        height: 100%;
        position: relative;
    }

    .mobile-nav-btn {
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--color-text-secondary);
        cursor: pointer;
        padding: 8px 4px;
        text-decoration: none;
    }

    .mobile-nav-icon, .mobile-group-icon {
        font-size: 1.4rem;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        object-fit: contain;
    }

    .mobile-nav-label {
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--color-text-secondary);
    }

    /* Group Popups */
    .mobile-group-popup {
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: var(--color-bg-secondary);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        min-width: 180px;
        padding: 8px;
        box-shadow: 0 -8px 25px rgba(0,0,0,0.5);
        display: none;
        opacity: 0;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
        z-index: 1005;
    }

    .mobile-nav-item.active .mobile-group-popup {
        display: block;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .mobile-group-menu {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-group-menu li {
        width: 100%;
    }

    .mobile-group-menu .nav-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        color: var(--color-text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .mobile-group-menu .nav-link:hover {
        background: var(--color-surface-hover);
    }

    .mobile-group-menu .nav-icon-img {
        width: 20px;
        height: 20px;
    }

    /* Chevron style arrow at the bottom of popup */
    .mobile-group-popup::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: var(--color-bg-secondary);
        border-right: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);
    }


    .nav-group-content .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: 0;
    }

    .nav-group-content .nav-link {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        font-size: 0.9rem;
        margin: 0;
        border-radius: 4px;
        justify-content: flex-start;
    }

    .nav-group.active .nav-group-content {
        display: flex;
    }

    .content-area {
        padding: var(--spacing-sm);
    }


    /* =============================================
       4. VIEW HEADERS (global)
       ============================================= */
    .view-header {
        margin-bottom: var(--spacing-md);
    }

    .view-title {
        font-size: 1.5rem;
    }

    .view-subtitle {
        font-size: 0.875rem;
    }

    /* =============================================
       5. HOME — HERO SECTION
       ============================================= */
    .hero-section {
        padding: 3rem 1.5rem;
        min-height: auto;
        margin-left: calc(-1 * var(--spacing-sm));
        margin-right: calc(-1 * var(--spacing-sm));
        margin-top: calc(-1 * var(--spacing-sm));
    }

    .hero-content {
        padding-left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-auth-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .btn-hero-signup,
    .btn-hero-login,
    .btn-hero-explore {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* =============================================
       6. HOME — GAMES GRID
       ============================================= */
    .games-section {
        padding: 0 0.5rem 2rem;
    }

    .section-title {
        font-size: 1.75rem !important;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    .game-column {
        width: 100%;
    }

    .game-card {
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: 9 / 14;
    }

    .game-column-title {
        font-size: 1rem;
    }

    .play-text {
        font-size: 1.5rem;
    }

    /* Hide placeholder "Not yet" cards on mobile */
    .game-card.empty-card {
        display: none;
    }

    .game-column:has(.empty-card) {
        display: none;
    }

    /* =============================================
       7. AUCTIONS BROWSE
       ============================================= */
    .auctions-grid {
        grid-template-columns: 1fr !important;
    }

    .auction-thumbnail {
        height: 180px;
    }

    .auction-name {
        font-size: 1.4rem;
    }

    /* =============================================
       8. AUCTION GAMEPLAY
       ============================================= */
    .gameplay-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
    }

    .game-view {
        min-height: 350px;
        padding: var(--spacing-md);
    }

    .game-menu {
        max-height: none;
    }

    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .item-emoji {
        font-size: 2rem;
    }

    .item-name {
        font-size: 0.75rem;
    }

    .item-value {
        font-size: 0.85rem;
    }

    .auction-timer {
        padding: var(--spacing-sm) var(--spacing-md);
        min-width: auto;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .timer-countdown {
        font-size: 2.5rem;
    }

    .timer-phase {
        font-size: 1rem;
    }

    .bid-display {
        font-size: 1.5rem;
    }

    /* =============================================
       9. CRATE OPENING — BROWSE
       ============================================= */
    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-sm);
    }

    .case-card {
        padding: var(--spacing-sm);
        min-height: auto;
    }

    .case-name {
        font-size: 1.1rem;
    }

    .case-price {
        font-size: 1.5rem;
    }

    /* =============================================
       10. CRATE OPENING — SPINNER
       ============================================= */
    .spinner-container {
        padding: 10px;
    }

    .spinner-controls {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }

    .btn-spin {
        width: auto;
        max-width: 200px;
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }

    .spinner-row {
        height: 130px;
    }

    .spinner-item {
        flex: 0 0 130px;
        height: 120px;
    }

    .spinner-item img {
        max-height: 70px;
    }

    .spinner-overlay-left,
    .spinner-overlay-right {
        width: 80px;
    }

    .items-won-container {
        margin-top: 20px;
    }

    .won-card {
        flex: 0 0 90px;
    }

    .won-card img {
        width: 60px;
        height: 60px;
    }

    /* =============================================
       11. JUNGLO GAME
       ============================================= */
    .junglo-canvas-container {
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .junglo-overlay {
        width: 95%;
        max-width: none;
        padding: 16px 14px;
        gap: 6px;
        bottom: 5px;
    }

    .junglo-play-btn {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }

    .junglo-bet-label {
        font-size: 1.1rem;
    }

    .junglo-bet-input {
        width: 100px;
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    .junglo-sound-icon {
        width: 28px;
        height: 28px;
    }

    .junglo-mode-btn {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .junglo-history-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    /* =============================================
       12. DEPOSIT WIZARD
       ============================================= */
    .deposit-container {
        padding: 0;
    }

    .step-card {
        padding: var(--spacing-lg);
    }

    .step-title {
        font-size: 1.25rem;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .form-input-large {
        font-size: 1.5rem;
        padding: var(--spacing-md);
    }

    .quick-amounts-large {
        grid-template-columns: repeat(3, 1fr);
    }

    .step-actions {
        grid-template-columns: 1fr;
    }

    .deposit-conversion-box {
        padding: var(--spacing-md);
    }

    .chain-btn {
        padding: var(--spacing-md);
        flex-wrap: wrap;
    }

    .chain-name {
        font-size: 1rem;
    }

    .chain-icons {
        gap: 6px;
    }

    .chain-logo,
    .token-logo {
        width: 28px;
        height: 28px;
    }

    .wallet-address-box {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }

    .wallet-address-box code {
        font-size: 0.75rem;
    }

    .btn-large {
        font-size: 1rem;
        padding: var(--spacing-md) var(--spacing-lg);
    }

    /* Card conversion stacking */
    .card-conversion-horizontal {
        flex-direction: column !important;
        gap: var(--spacing-sm) !important;
    }

    /* =============================================
       13. WITHDRAWAL
       ============================================= */
    .withdrawal-container {
        padding: 0;
    }

    .withdrawal-method-selection {
        grid-template-columns: 1fr;
    }

    .withdrawal-method-btn {
        padding: var(--spacing-md);
    }

    .withdrawal-balance-info {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }

    .withdrawal-select {
        font-size: 1rem;
    }

    /* =============================================
       14. ACCOUNT DASHBOARD
       ============================================= */
    .account-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 1.25rem;
    }

    .profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .profile-header-merged {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-title-group h2 {
        font-size: 1.3rem;
    }

    .balance-main-amount {
        font-size: 2rem;
    }

    .balance-actions {
        justify-content: center;
    }

    /* Make tables scrollable horizontally */
    .deposit-history-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .deposit-history-table {
        min-width: 500px;
    }

    .deposit-history-table thead th,
    .deposit-history-table tbody td {
        padding: 10px 12px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .transactions-table th,
    .transactions-table td {
        padding: var(--spacing-sm);
        font-size: 0.8rem;
    }

    .profile-stats {
        gap: 0.5rem;
    }

    .info-item-card .item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* =============================================
       15. LOGIN/REGISTER MODAL
       ============================================= */
    .modal-container {
        padding: var(--spacing-lg);
        width: 95%;
        max-width: 400px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-tabs {
        gap: 0;
    }

    .modal-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }

    /* =============================================
       16. NOTIFICATIONS
       ============================================= */
    .notification {
        right: var(--spacing-sm);
        left: var(--spacing-sm);
        max-width: none;
    }

    /* =============================================
       17. ACCOUNT DROPDOWN
       ============================================= */
    .account-dropdown {
        right: var(--spacing-sm);
        left: var(--spacing-sm);
        min-width: auto;
    }

    /* =============================================
       18. STATISTICS PAGE
       ============================================= */
    .stats-container {
        padding: 1rem;
    }

    .stats-hero-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .stats-hero-header {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .hero-title-group h1 {
        font-size: 2rem;
    }

    .hero-title-group p {
        font-size: 0.9rem;
    }

    .timeline-picker {
        align-self: flex-start;
    }

    .time-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    #statistics-view .hero-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-stat-item h2 {
        font-size: 2rem;
    }

    .hero-stat-item .stat-label {
        font-size: 0.8rem;
    }

    .chart-wrapper {
        height: 250px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* =============================================
       19. PROMOTIONS PAGE
       ============================================= */
    .promotions-section {
        padding: var(--spacing-md);
    }

    .promotions-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .promo-card.featured {
        flex-direction: column;
        min-height: auto;
    }

    .promo-card.featured .promo-image {
        width: 100%;
        height: 200px;
    }

    .promo-content {
        padding: var(--spacing-lg);
    }

    .promo-title {
        font-size: 1.5rem;
    }

    .promo-description {
        font-size: 0.95rem;
    }

    .promo-meta {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }

    .promo-value {
        font-size: 1.2rem;
    }

    .btn-promo-claim {
        width: 100%;
        text-align: center;
    }

    /* =============================================
       20. AFFILIATE PAGE
       ============================================= */
    .affiliate-section {
        padding: 1rem;
    }

    .affiliate-hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .affiliate-hero h1 {
        font-size: 2rem;
    }

    .affiliate-hero p {
        font-size: 1rem;
    }

    .affiliate-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .affiliate-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .affiliate-card {
        padding: 1.25rem;
    }

    .referral-input-group {
        flex-direction: column;
    }

    .referral-input-group input {
        font-size: 0.85rem;
    }

    .referral-input-group button {
        width: 100%;
    }

    /* =============================================
       21. TREZOR GAME
       ============================================= */
    .trezor-wrapper {
        border-radius: var(--radius-md);
    }

    #trezor-canvas-container {
        height: calc(100vh - 180px);
    }

    /* Trezor Bonus Shop - make it fit mobile viewport */
    #trezor-bonusshop-panel {
        width: 90% !important;
        max-width: 360px !important;
        max-height: 80vh;
        overflow-y: auto;
    }

    #trezor-bonusshop-panel .bait-card {
        flex-direction: column !important;
        text-align: center;
    }

    #trezor-bonusshop-panel .bait-card-img {
        width: 50px !important;
        height: 50px !important;
    }

    /* =============================================
       22. DRAGAN GAME
       ============================================= */
    .dragan-wrapper {
        padding: 10px;
        height: auto;
        min-height: auto;
    }

    #dragan-canvas-container {
        aspect-ratio: 4 / 3;
        min-height: 350px;
    }

    .dragan-controls-overlay {
        bottom: 15px;
        gap: 12px;
    }

    .dragan-menu-btn img {
        width: 40px;
        height: 40px;
    }

    .dragan-main-play-btn {
        padding: 8px 30px;
        font-size: 18px;
    }

    .dragan-panel {
        width: 90% !important;
        max-width: 360px;
        padding: 16px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .dragan-panel-header h3 {
        font-size: 1rem;
    }

    .level-card {
        padding: 10px;
    }

    .level-card .level-name {
        font-size: 0.9rem;
    }

    .level-card .level-desc {
        font-size: 0.65rem;
    }

    .quick-bets {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .quick-bet-btn {
        padding: 5px 0;
        font-size: 0.8rem;
    }

    /* Win popup mobile */
    .win-popup-content {
        padding: 24px;
        max-width: 90%;
        border-radius: 20px;
    }

    .congrats-text {
        font-size: 1.5rem;
    }

    .win-fish-display img {
        width: 140px;
    }

    .win-value-display {
        font-size: 2rem;
    }

    .win-rarity {
        font-size: 1rem;
        padding: 5px 20px;
    }

    /* =============================================
       23. GAME DESCRIPTION SECTIONS
       ============================================= */
    .game-desc {
        margin: 16px auto 0;
    }

    /* =============================================
       24. INFO PAGES (Terms, Privacy, Responsible Gambling)
       ============================================= */
    .info-container {
        padding: 1rem;
    }

    .info-header h1 {
        font-size: 2rem;
    }

    .info-header {
        margin-bottom: 2rem;
    }

    .info-section {
        margin-bottom: 2.5rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .support-links {
        flex-direction: column;
    }

    .support-link {
        width: 100%;
        justify-content: center;
    }

    /* =============================================
       25. PROVABLY FAIR
       ============================================= */
    .pf-container {
        padding: 1rem;
    }

    .pf-header h1 {
        font-size: 2rem;
    }

    .pf-tab-content {
        padding: 1.5rem;
    }

    .pf-visual {
        padding: 1.5rem;
    }

    .pf-formula {
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .formula-box {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }

    /* =============================================
       26. WALLET PAGE
       ============================================= */
    .wallet-container {
        grid-template-columns: 1fr;
    }

    /* =============================================
       27. RESET PASSWORD
       ============================================= */
    .reset-password-container {
        margin: 1rem auto !important;
        padding: 1.5rem !important;
    }

    /* =============================================
       28. TREZOR GAMEPLAY (AUCTION-STYLE)
       ============================================= */
    .game-three-column-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .game-sidebar-left,
    .game-sidebar-right {
        width: 100%;
        max-width: none;
        order: 0;
    }

    .game-main-content {
        order: -1;
        width: 100%;
    }

    .vault-container-wrapper {
        width: 100%;
    }

    .vault-door-container {
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .middle-bid-controls {
        flex-direction: column;
        gap: 8px;
    }

    .btn-bid-dynamic {
        width: 100%;
        font-size: 1rem;
    }

    .bid-increment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-input-box {
        flex-direction: column;
    }

    .bid-input-field {
        width: 100%;
    }

    .btn-place-custom {
        width: 100%;
    }

    /* =============================================
       29. CURRENCY / CONVERSION DISPLAY
       ============================================= */
    .conversion-row {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .mini-currency-icon {
        width: 16px;
        height: 16px;
    }
}

/* =========================================================================
   EXTRA-SMALL DEVICES (≤ 480px)
   ========================================================================= */

@media (max-width: 480px) {

    .balance-display {
        padding: 4px;
        font-size: 0.9rem;
    }

    .btn-wallet-header {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .btn-wallet-header .wallet-text {
        display: none;
    }

    /* Home */
    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .game-column-title {
        font-size: 0.85rem;
    }

    .play-text {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.4rem !important;
    }

    /* Crate Spinner */
    .spinner-item {
        flex: 0 0 100px;
        height: 100px;
    }

    .spinner-row {
        height: 110px;
    }

    .spinner-item img {
        max-height: 55px;
    }

    .spinner-item-name {
        font-size: 0.65rem;
    }

    /* Junglo */
    .junglo-overlay {
        padding: 10px 8px;
        gap: 4px;
    }

    .junglo-play-btn {
        font-size: 1.4rem;
    }

    .junglo-bet-label {
        font-size: 0.9rem;
    }

    .junglo-bet-input {
        width: 80px;
        font-size: 0.8rem;
    }

    .junglo-sound-icon {
        width: 24px;
        height: 24px;
    }

    .junglo-mode-btn {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    /* Deposit */
    .form-input-large {
        font-size: 1.25rem;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-header {
        gap: var(--spacing-sm);
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    /* Auction Gameplay */
    .items-grid {
        gap: 6px;
        padding: 6px;
    }

    .item-emoji {
        font-size: 1.5rem;
    }

    .item-name {
        font-size: 0.65rem;
    }

    .item-value {
        font-size: 0.75rem;
    }

    /* Statistics */
    .stats-hero-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .hero-title-group h1 {
        font-size: 1.6rem;
    }

    .hero-stat-item h2 {
        font-size: 1.6rem;
    }

    .chart-wrapper {
        height: 200px;
    }

    /* Promotions */
    .promotions-section {
        padding: var(--spacing-sm);
    }

    .promo-card.featured .promo-image {
        height: 160px;
    }

    .promo-title {
        font-size: 1.3rem;
    }

    .promo-badge {
        font-size: 0.65rem;
        padding: 4px 12px;
    }

    /* Affiliate */
    .affiliate-hero h1 {
        font-size: 1.7rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    /* Dragan */
    #dragan-canvas-container {
        min-height: 280px;
    }

    .dragan-controls-overlay {
        bottom: 10px;
        gap: 8px;
    }

    .dragan-menu-btn img {
        width: 32px;
        height: 32px;
    }

    .dragan-main-play-btn {
        padding: 6px 22px;
        font-size: 15px;
        border-radius: 10px;
    }

    .dragan-panel {
        padding: 12px;
    }

    /* Trezor */
    #trezor-canvas-container {
        height: calc(100vh - 160px);
    }

    #trezor-bonusshop-panel {
        width: 95% !important;
        max-width: none !important;
    }

    /* Info pages */
    .info-header h1 {
        font-size: 1.7rem;
    }

    .section-title h2 {
        font-size: 1.2rem;
    }

    .info-card {
        padding: 1.2rem;
    }

    /* PF */
    .pf-header h1 {
        font-size: 1.7rem;
    }

    .pf-formula {
        flex-direction: column;
        gap: 0.5rem;
    }

    .formula-box {
        width: 100%;
        text-align: center;
    }

    /* Dashboard */
    .dashboard-section {
        padding: 1rem;
    }

    .profile-title-group h2 {
        font-size: 1.1rem;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
    }

    /* Withdrawal */
    .wmethod-title {
        font-size: 0.9rem;
    }

    .wmethod-desc {
        font-size: 0.7rem;
    }

    /* Modal */
    .modal-container {
        padding: var(--spacing-md);
        width: 95%;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}

/* =========================================================================
   VERY SMALL DEVICES (≤ 360px)
   ========================================================================= */

@media (max-width: 360px) {

    .header {
        padding: 6px;
        gap: 4px;
    }

    .logo-img {
        height: 36px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .games-grid {
        gap: 0.5rem;
    }

    .game-column-title {
        font-size: 0.75rem;
    }

    .play-text {
        font-size: 1rem;
    }

    .mobile-bottom-nav {
        height: 58px;
    }

    .mobile-nav-label {
        font-size: 0.6rem;
    }

    .mobile-nav-icon,
    .mobile-group-icon {
        width: 20px;
        height: 20px;
    }

    /* Stats */
    .hero-stat-item h2 {
        font-size: 1.3rem;
    }

    .timeline-picker {
        flex-wrap: wrap;
    }

    .time-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* =========================================================================
   TOUCH-FRIENDLY IMPROVEMENTS (all mobile)
   ========================================================================= */

@media (hover: none) and (pointer: coarse) {
    /* Minimum tap target 44px */
    .btn,
    .nav-link,
    .mobile-nav-btn,
    .quick-amount-btn,
    .quick-bet-btn,
    .goldigo-tile,
    .goldigo-level-btn,
    .chain-btn,
    .withdrawal-method-btn,
    .pf-tab,
    .game-desc-tab,
    .time-btn,
    .promo-dot {
        min-height: 44px;
    }

    /* Disable hover effects that feel sticky on touch */
    .game-card:hover:not(.empty-card) {
        transform: none;
    }

    .game-card:active:not(.empty-card) {
        transform: scale(0.98);
    }

    .stat-card:hover {
        transform: none;
    }

    .info-card:hover {
        transform: none;
    }

    .promo-card:hover {
        transform: none;
    }

    /* Smooth scrolling on touch */
    .content-area {
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================================
   LANDSCAPE MOBILE
   ========================================================================= */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 2rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .mobile-bottom-nav {
        height: 50px;
    }

    .junglo-canvas-container {
        aspect-ratio: 16 / 9;
    }

    #dragan-canvas-container {
        aspect-ratio: 16 / 9;
        min-height: 260px;
    }

    .dragan-wrapper {
        height: auto;
        min-height: auto;
    }
}