/**
 * Desktop Optimization CSS for Bet366
 * This file adds desktop-specific enhancements without modifying mobile functionality
 * Breakpoints: >= 1200px (desktop), >= 1400px (large desktop)
 */

/* ==========================================================================
   1. DESKTOP LAYOUT ENHANCEMENTS (>= 1200px)
   ========================================================================== */

@media (min-width: 1200px) {

    /* ---- Container Width ---- */
    .container, .container-lg, .container-xl {
        max-width: 1400px;
    }

    /* ---- Main Content Area ---- */
    .main-wrapper {
        padding: 30px 40px;
    }

    /* ---- Desktop Header Enhancements ---- */
    .header {
        padding: 15px 40px;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }

    .header .logo img {
        max-height: 50px;
    }

    .header .menu li a {
        padding: 12px 20px;
        font-size: 15px;
        transition: all 0.3s ease;
    }

    .header .menu li a:hover {
        background: rgba(255, 215, 0, 0.1);
        border-radius: 8px;
        transform: translateY(-2px);
    }

    /* ---- User Balance in Header ---- */
    .header .user-balance {
        font-size: 18px;
        padding: 10px 25px;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-radius: 25px;
        border: 1px solid rgba(255, 215, 0, 0.3);
    }

    /* ---- Body Padding for Fixed Header ---- */
    body.logged-in {
        padding-top: 80px;
    }
}

/* ==========================================================================
   2. GAME CARD GRID LAYOUT (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    /* ---- Games Grid - 4 columns on desktop ---- */
    .game-grid,
    .games-section .row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .game-card {
        transition: all 0.3s ease;
        border-radius: 16px;
    }

    .game-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
    }

    .game-card .game-thumbnail {
        border-radius: 12px;
    }

    .game-card .btn {
        padding: 12px 24px;
        font-size: 16px;
        font-weight: 600;
    }
}

/* ==========================================================================
   3. LOTTERY/GAME PLAY PAGE - TWO COLUMN DESKTOP LAYOUT
   ========================================================================== */

@media (min-width: 1200px) {

    /* ---- Game Play Container ---- */
    .game-play-wrapper {
        display: grid;
        grid-template-columns: 55% 45%;
        gap: 30px;
        max-width: 1600px;
        margin: 0 auto;
        padding: 30px;
    }

    /* ---- Left Column: Game Area ---- */
    .game-main-section {
        position: sticky;
        top: 100px;
        height: fit-content;
    }

    /* ---- Right Column: History/Tabs ---- */
    .game-side-section {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #ffd700 #1a1a2e;
    }

    .game-side-section::-webkit-scrollbar {
        width: 6px;
    }

    .game-side-section::-webkit-scrollbar-track {
        background: #1a1a2e;
        border-radius: 3px;
    }

    .game-side-section::-webkit-scrollbar-thumb {
        background: #ffd700;
        border-radius: 3px;
    }
}

/* ==========================================================================
   4. GAME TIMER & BETTING UI (Desktop Enhancements)
   ========================================================================== */

@media (min-width: 1200px) {

    /* ---- Timer Section ---- */
    .timer-header-section,
    .game-timer-section {
        padding: 25px 30px;
        border-radius: 20px;
    }

    .timer-digit {
        font-size: 48px !important;
        min-width: 60px;
        padding: 15px 20px;
    }

    .timer-sep {
        font-size: 40px;
    }

    .period-text {
        font-size: 16px;
    }

    /* ---- Betting Buttons Grid ---- */
    .betting-section {
        padding: 25px;
    }

    /* Colors Row */
    .colors-row,
    .color-buttons-row {
        display: flex;
        gap: 15px;
        justify-content: center;
    }

    .color-btn {
        min-width: 120px;
        min-height: 55px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    .color-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    /* Numbers Grid */
    .numbers-row,
    .number-buttons-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }

    .number-btn {
        min-width: 70px;
        min-height: 55px;
        font-size: 20px;
        font-weight: 700;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    .number-btn:hover {
        transform: scale(1.08);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    /* Size Buttons */
    .size-row,
    .size-buttons-row {
        display: flex;
        gap: 20px;
        justify-content: center;
    }

    .size-btn {
        min-width: 150px;
        min-height: 55px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
    }

    .size-btn:hover {
        transform: scale(1.05);
    }

    /* Section Labels */
    .section-label {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

/* ==========================================================================
   5. BET AMOUNT & MULTIPLIER CONTROLS (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .bet-controls-section {
        padding: 20px 25px;
        background: rgba(26, 26, 46, 0.8);
        border-radius: 16px;
        margin-top: 20px;
    }

    /* Amount Input */
    #betAmount,
    .bet-amount-input {
        font-size: 24px;
        min-height: 55px;
        text-align: center;
        border-radius: 12px;
    }

    /* Amount Adjustment Buttons */
    .bet-adjust-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .min-btn, .max-btn, .less-btn, .more-btn {
        min-height: 50px;
        font-size: 15px;
        font-weight: 600;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .min-btn:hover, .max-btn:hover {
        background: #e5a00d;
        transform: scale(1.05);
    }

    .less-btn:hover, .more-btn:hover {
        background: #666;
        transform: scale(1.05);
    }

    /* Multiplier Buttons */
    .multiplier-row {
        display: flex;
        gap: 15px;
        justify-content: center;
    }

    .multiplier-btn {
        min-width: 80px;
        min-height: 50px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .multiplier-btn:hover {
        transform: scale(1.05);
    }

    .multiplier-btn.active {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    /* Place Bet Button */
    #submitBtn,
    .place-bet-btn {
        min-height: 60px;
        font-size: 20px;
        font-weight: 700;
        border-radius: 14px;
        margin-top: 20px;
        transition: all 0.3s ease;
    }

    #submitBtn:hover:not(:disabled),
    .place-bet-btn:hover:not(:disabled) {
        transform: scale(1.02);
        box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
    }
}

/* ==========================================================================
   6. HISTORY & TABS (Desktop Enhancements)
   ========================================================================== */

@media (min-width: 1200px) {

    /* Tab Navigation */
    .nav-tabs,
    .game-tabs {
        border-radius: 12px;
        padding: 8px;
        background: rgba(26, 26, 46, 0.6);
    }

    .nav-tabs .nav-link,
    .game-tabs .tab-btn {
        padding: 14px 30px;
        font-size: 15px;
        font-weight: 600;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .nav-tabs .nav-link:hover {
        background: rgba(255, 215, 0, 0.1);
    }

    .nav-tabs .nav-link.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    /* History Table */
    .table-dark {
        border-radius: 12px;
        overflow: hidden;
    }

    .table-dark th {
        font-size: 14px;
        padding: 15px 12px;
        background: rgba(26, 26, 46, 0.9);
    }

    .table-dark td {
        font-size: 14px;
        padding: 14px 12px;
    }

    .table-dark tr:hover {
        background: rgba(255, 215, 0, 0.05);
    }

    /* Pagination */
    .pagination {
        gap: 8px;
    }

    .pagination .page-link {
        min-width: 45px;
        min-height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        font-size: 15px;
    }

    /* Chart Tab */
    .chart-section {
        padding: 20px;
    }

    .roadmap-container {
        padding: 15px;
    }
}

/* ==========================================================================
   7. SPIN WHEEL DESKTOP LAYOUT
   ========================================================================== */

@media (min-width: 1200px) {

    .spin-wheel-container {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px;
    }

    /* Wheel Section */
    .wheel-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .wheel-container {
        width: 450px;
        height: 450px;
    }

    .wheel {
        width: 400px;
        height: 400px;
    }

    .spin-button {
        width: 100px;
        height: 100px;
        font-size: 20px;
    }

    /* Tier Selection */
    .tier-buttons {
        display: flex;
        gap: 15px;
        justify-content: center;
        margin-top: 30px;
    }

    .tier-btn {
        min-width: 100px;
        min-height: 50px;
        font-size: 18px;
        font-weight: 600;
        border-radius: 12px;
    }

    /* Side Panel */
    .spin-wheel-side {
        background: rgba(26, 26, 46, 0.8);
        border-radius: 20px;
        padding: 25px;
    }

    .recent-winners-list {
        max-height: 400px;
        overflow-y: auto;
    }
}

/* ==========================================================================
   8. WALLET HEADER SECTION (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .wallet-header-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 30px;
        border-radius: 16px;
        margin-bottom: 25px;
    }

    .wallet-amount {
        font-size: 36px;
    }

    .wallet-label {
        font-size: 14px;
    }

    .wallet-buttons {
        display: flex;
        gap: 15px;
    }

    .withdraw-btn, .deposit-btn {
        min-width: 140px;
        min-height: 50px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 25px;
    }

    .withdraw-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.02);
    }

    .deposit-btn:hover {
        background: #27ae60;
        transform: scale(1.02);
    }
}

/* ==========================================================================
   9. BETTING POPUP/MODAL (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .betting-popup,
    .bet-popup-overlay {
        align-items: center;
        justify-content: center;
    }

    .betting-popup-content,
    .bet-popup-content {
        max-width: 500px;
        max-height: 80vh;
        border-radius: 24px;
        margin: auto;
    }

    .popup-header {
        padding: 25px 30px;
        border-radius: 24px 24px 0 0;
    }

    .popup-body {
        padding: 30px;
    }

    .popup-footer {
        padding: 20px 30px 30px;
    }
}

/* ==========================================================================
   10. RESULT MODAL (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .result-modal-content {
        max-width: 450px;
        border-radius: 24px;
        padding: 40px;
    }

    .result-icon {
        font-size: 80px;
    }

    .result-title {
        font-size: 32px;
    }

    .result-amount {
        font-size: 48px;
    }

    .result-details {
        font-size: 16px;
        padding: 20px;
        border-radius: 12px;
    }
}

/* ==========================================================================
   11. PROGRESS BAR OVERLAY (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .progress-overlay {
        max-width: 600px;
        padding: 40px;
        border-radius: 24px;
    }

    .progress-countdown {
        font-size: 72px;
    }

    .progress-bar-container {
        height: 16px;
        border-radius: 8px;
    }

    .progress-info {
        font-size: 18px;
    }
}

/* ==========================================================================
   12. AVIATOR GAME (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .aviator-container {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 30px;
        max-width: 1400px;
        margin: 0 auto;
    }

    .aviator-game-area {
        min-height: 500px;
        border-radius: 20px;
    }

    .aviator-multiplier {
        font-size: 120px;
    }

    .aviator-plane {
        width: 120px;
        height: 60px;
    }

    .aviator-betting-panel {
        padding: 25px;
        border-radius: 20px;
    }

    .bet-panel-card {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   13. CHICKEN ROAD GAME (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .chicken-road-container {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 30px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .chicken-game-area {
        min-height: 600px;
    }

    .road-lane {
        height: 60px;
    }

    .chicken-sprite {
        width: 50px;
        height: 45px;
    }

    .action-section {
        padding: 25px;
    }

    .go-button, .cone-button {
        min-height: 60px;
        font-size: 18px;
        border-radius: 14px;
    }
}

/* ==========================================================================
   14. DASHBOARD (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .dashboard-card {
        padding: 30px;
        border-radius: 20px;
        transition: all 0.3s ease;
    }

    .dashboard-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }

    .dashboard-card-icon {
        font-size: 48px;
    }

    .dashboard-card-value {
        font-size: 36px;
    }

    .dashboard-card-label {
        font-size: 16px;
    }

    /* Quick Actions */
    .quick-actions {
        display: flex;
        gap: 20px;
    }

    .quick-action-btn {
        min-width: 180px;
        min-height: 55px;
        font-size: 16px;
        border-radius: 14px;
    }
}

/* ==========================================================================
   15. DEPOSIT/WITHDRAW PAGES (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .payment-methods-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .payment-method-card {
        padding: 30px;
        border-radius: 20px;
        transition: all 0.3s ease;
    }

    .payment-method-card:hover {
        transform: translateY(-5px);
        border-color: #ffd700;
    }

    .payment-form {
        max-width: 600px;
        margin: 0 auto;
        padding: 40px;
        border-radius: 24px;
    }

    .payment-form input,
    .payment-form select {
        min-height: 55px;
        font-size: 16px;
        border-radius: 12px;
    }

    .payment-form .btn-primary {
        min-height: 60px;
        font-size: 18px;
        border-radius: 14px;
    }
}

/* ==========================================================================
   16. TRANSACTIONS/HISTORY PAGES (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .transactions-table {
        border-radius: 16px;
        overflow: hidden;
    }

    .transactions-table th {
        padding: 18px 20px;
        font-size: 15px;
    }

    .transactions-table td {
        padding: 16px 20px;
        font-size: 15px;
    }

    /* Filters */
    .filters-section {
        display: flex;
        gap: 20px;
        align-items: center;
        padding: 20px;
        background: rgba(26, 26, 46, 0.6);
        border-radius: 16px;
        margin-bottom: 25px;
    }

    .filter-input,
    .filter-select {
        min-height: 50px;
        font-size: 15px;
        border-radius: 10px;
    }
}

/* ==========================================================================
   17. PROFILE PAGE (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .profile-container {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .profile-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }

    .profile-avatar {
        width: 150px;
        height: 150px;
        border-radius: 50%;
    }

    .profile-form {
        padding: 40px;
        border-radius: 24px;
    }

    .profile-form .form-group {
        margin-bottom: 25px;
    }

    .profile-form input {
        min-height: 55px;
        font-size: 16px;
    }
}

/* ==========================================================================
   18. LARGE DESKTOP ENHANCEMENTS (>= 1400px)
   ========================================================================== */

@media (min-width: 1400px) {

    .container, .container-lg, .container-xl, .container-xxl {
        max-width: 1600px;
    }

    /* Game Play - Wider layout */
    .game-play-wrapper {
        grid-template-columns: 60% 40%;
        max-width: 1800px;
    }

    /* Timer even larger */
    .timer-digit {
        font-size: 56px !important;
        min-width: 70px;
    }

    /* Larger betting buttons */
    .color-btn {
        min-width: 140px;
        min-height: 60px;
        font-size: 18px;
    }

    .number-btn {
        min-width: 80px;
        min-height: 60px;
        font-size: 22px;
    }

    /* Spin Wheel larger */
    .wheel-container {
        width: 550px;
        height: 550px;
    }

    .wheel {
        width: 500px;
        height: 500px;
    }
}

/* ==========================================================================
   19. KEYBOARD SHORTCUTS INDICATOR (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    .keyboard-hint {
        display: inline-block;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        padding: 2px 8px;
        font-size: 11px;
        font-family: monospace;
        margin-left: 8px;
        color: rgba(255, 255, 255, 0.6);
    }

    .number-btn .keyboard-hint,
    .color-btn .keyboard-hint {
        position: absolute;
        top: 4px;
        right: 4px;
        margin: 0;
    }

    /* Show keyboard hints on desktop */
    .keyboard-shortcuts-help {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: rgba(26, 26, 46, 0.95);
        border: 1px solid rgba(255, 215, 0, 0.3);
        border-radius: 12px;
        padding: 15px 20px;
        font-size: 13px;
        color: #e0e0e0;
        z-index: 100;
        max-width: 250px;
    }

    .keyboard-shortcuts-help h6 {
        color: #ffd700;
        margin-bottom: 10px;
    }

    .keyboard-shortcuts-help ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .keyboard-shortcuts-help li {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
    }

    .keyboard-shortcuts-help kbd {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        padding: 2px 6px;
        font-family: monospace;
    }
}

/* Hide keyboard hints on mobile */
@media (max-width: 1199px) {
    .keyboard-hint,
    .keyboard-shortcuts-help {
        display: none !important;
    }
}

/* ==========================================================================
   20. SMOOTH SCROLLING & ANIMATIONS (Desktop)
   ========================================================================== */

@media (min-width: 1200px) {

    html {
        scroll-behavior: smooth;
    }

    /* Enhanced hover animations */
    .btn {
        transition: all 0.2s ease;
    }

    .card {
        transition: all 0.3s ease;
    }

    /* Subtle parallax effect on game backgrounds */
    .game-card-body,
    .game-main-section {
        transition: transform 0.1s ease;
    }

    /* Smooth modal transitions */
    .modal.show .modal-dialog,
    .betting-popup-content,
    .result-modal-content {
        animation: modalFadeIn 0.3s ease;
    }

    @keyframes modalFadeIn {
        from {
            opacity: 0;
            transform: scale(0.95) translateY(-20px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }
}

/* ==========================================================================
   21. PRINT STYLES (Desktop)
   ========================================================================== */

@media print {
    .header,
    .mobile-header-section,
    .mobile-bottom-nav,
    .keyboard-shortcuts-help,
    .wallet-buttons,
    .betting-section,
    .action-section {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .table-dark {
        background: white;
        color: black;
    }

    .table-dark th,
    .table-dark td {
        border: 1px solid #ccc;
    }
}
