/* Mobile Responsive Styles for MuOnline CMS */

/* Global Mobile Navigation Override */
@media (max-width: 1024px) {
    .mobile-nav {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hamburger-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 1.5rem !important;
        right: 1.5rem !important;
        z-index: 1003 !important;
    }
}

/* Desktop - show only desktop nav, hide mobile elements */
@media (min-width: 1025px) {
    .desktop-nav {
        display: block !important;
    }

    .mobile-nav,
    .hamburger-menu,
    .mobile-menu-overlay {
        display: none !important;
    }

    /* Show desktop header layout */
    .lg\:hidden {
        display: none !important;
    }

    .hidden.lg\:flex {
        display: flex !important;
    }
}

/* Mobile - hide desktop nav, show mobile elements */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav {
        display: block !important;
        visibility: visible !important;
    }

    .hamburger-menu {
        display: block !important;
        visibility: visible !important;
    }

    /* Hide desktop header elements */
    .online-counter-container,
    .opening-timer-container {
        display: none !important;
    }

    /* Hide desktop navigation completely */
    nav.bg-gradient-to-r {
        display: none !important;
    }
}

/* Hamburger Menu Styles */
.hamburger-menu {
    width: 40px;
    height: 32px;
    position: relative;
    cursor: pointer;
    z-index: 1003;
    padding: 8px;
    background: rgba(8, 11, 18, 0.95);
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: block !important;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 24px;
    background: #d4af37;
    border-radius: 2px;
    opacity: 1;
    left: 50%;
    transform: translateX(-50%);
    transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
    top: 6px;
}

.hamburger-menu span:nth-child(2) {
    top: 14px;
}

.hamburger-menu span:nth-child(3) {
    top: 22px;
}

.hamburger-menu.active span:nth-child(1) {
    top: 14px;
    transform: translateX(-50%) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-200%);
}

.hamburger-menu.active span:nth-child(3) {
    top: 14px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Mobile Menu Overlay - Enhanced Design */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 11, 18, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
    pointer-events: auto;
}

/* Force hide mobile menu overlay on desktop */
@media (min-width: 1025px) {
    .mobile-menu-overlay {
        display: none !important;
        visibility: hidden !important;
        left: -100% !important;
    }
}


.mobile-menu-content {
    padding: 100px 0 30px;
    max-width: 380px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Mobile Menu Logo */
.mobile-menu-logo {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.mobile-menu-logo img {
    max-width: 160px;
    height: auto;
}

/* Mobile Menu Items - Modern Card Design */
.mobile-menu-items {
    padding: 0 20px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 8px;
    color: #9dafc4;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    background: rgba(18, 23, 29, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-menu-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #d4af37;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.mobile-menu-item i {
    width: 24px;
    margin-right: 12px;
    color: #d4af37;
    font-size: 18px;
}

.mobile-menu-item span {
    flex: 1;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

.mobile-menu-item:hover:before,
.mobile-menu-item.active:before {
    transform: translateX(0);
}

/* Mobile Menu Divider */
.mobile-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    margin: 20px 20px;
}

/* Mobile Menu Section Title */
.mobile-menu-section-title {
    color: #d4af37;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 20px 10px 20px;
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    text-align: center;
}

/* Mobile User Section */
.mobile-menu-user {
    padding: 20px;
    margin: 20px;
    background: rgba(18, 23, 29, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
}

.mobile-menu-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.mobile-menu-user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    color: #080b12;
}

.mobile-menu-user-details h4 {
    color: #d4af37;
    font-size: 16px;
    margin-bottom: 2px;
}

.mobile-menu-user-details p {
    color: #9dafc4;
    font-size: 12px;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    margin-top: auto;
    flex-shrink: 0;
}

.mobile-menu-footer p {
    color: #6b7280;
    font-size: 12px;
}

/* Hide mobile menu items on desktop */
@media (min-width: 1025px) {
    .mobile-menu-content,
    .mobile-menu-item {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    /* Top banner */
    .top-banner-mobile {
        font-size: 11px;
        padding: 8px 10px;
    }

    /* Stage System mobile responsive design */
    .stage-dropdown {
        display: block !important;
        position: relative;
    }

    /* Mobile Stage System button */
    .stage-dropdown button {
        font-size: 13px !important;
        padding: 6px 10px !important;
        gap: 6px !important;
        flex-wrap: wrap;
    }

    .stage-dropdown button span:first-child {
        font-size: 12px !important;
    }

    #stage-progress-mini {
        padding: 3px 6px !important;
        font-size: 11px !important;
    }

    /* Stage System dropdown content mobile */
    .stage-dropdown-content {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        min-width: 280px !important;
        max-width: 90vw !important;
        z-index: 1000 !important;
        font-size: 11px !important;
    }

    .stage-block-title {
        padding: 10px !important;
    }

    .stage-title {
        font-size: 14px !important;
    }

    .stage-nav {
        width: 30px !important;
        height: 24px !important;
    }

    .stage-system-timer {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    #stage-status-label,
    #stage-countdown {
        font-size: 12px !important;
    }

    /* Stage System lists mobile */
    .stage-dropdown-content ul {
        padding-left: 0 !important;
        margin: 0 !important;
    }

    .stage-dropdown-content li {
        font-size: 10px !important;
        padding: 2px 0 !important;
        line-height: 1.3 !important;
    }

    .stage-dropdown-content li a {
        font-size: 10px !important;
        padding: 1px 0 !important;
    }

    /* Stage titles in dropdown */
    .stage-dropdown-content h4,
    .stage-dropdown-content .events-title,
    .stage-dropdown-content .bosses-title,
    .stage-dropdown-content .boosts-title {
        font-size: 11px !important;
        margin-bottom: 4px !important;
        margin-top: 8px !important;
    }

    /* Server status compact */
    .server-status-mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 11px;
    }

    /* Main header */
    .header-main {
        padding: 15px 10px;
    }

    /* Logo adjustments */
    .logo-mobile {
        max-width: 180px;
        height: auto;
    }

    /* Hide side elements (online counter, opening timer) */
    .online-counter-container,
    .opening-timer-container {
        display: none !important;
    }
}

/* Mobile Content Adjustments - Enhanced */
@media (max-width: 768px) {
    /* Container padding - better spacing */
    .max-w-7xl {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Grid adjustments */
    .grid {
        gap: 15px !important;
    }

    .grid-cols-1 {
        grid-template-columns: 1fr !important;
    }

    /* News boxes - Modern Card Design */
    .news-box {
        margin-bottom: 20px;
        border-radius: 12px !important;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .news-box .flex {
        flex-direction: row;
        align-items: stretch;
    }

    .news-box .w-24 {
        width: 80px;
        min-width: 80px;
        height: auto;
        min-height: 120px;
        border-right: 1px solid rgba(212, 175, 55, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    }

    .news-box .w-24 img {
        width: 48px;
        height: 48px;
    }

    .news-box .p-6 {
        padding: 15px !important;
    }

    .news-box h3 {
        font-size: 16px !important;
        line-height: 1.3;
        margin-bottom: 8px !important;
    }

    .news-box p {
        font-size: 13px !important;
        line-height: 1.5;
    }

    /* Sidebar Cards on Mobile */
    .news-box[style*="background-color: #12171d"] {
        background: linear-gradient(135deg, #12171d, #090C0F) !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
    }

    /* Dashboard adjustments - Enhanced */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Dashboard Cards */
    .dashboard-card {
        background: linear-gradient(135deg, #12171d, #090C0F) !important;
        border-radius: 12px !important;
        padding: 20px !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
    }

    /* Characters table - Responsive Design */
    .characters-table-mobile {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .characters-table-mobile table {
        min-width: 100%;
    }

    .characters-table-mobile th,
    .characters-table-mobile td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    /* Hide less important columns on very small screens */
    @media (max-width: 480px) {
        .characters-table-mobile th:nth-child(4),
        .characters-table-mobile td:nth-child(4),
        .characters-table-mobile th:nth-child(5),
        .characters-table-mobile td:nth-child(5) {
            display: none;
        }
    }

    /* Sidebar menu on mobile - Bottom Navigation */
    .sidebar-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, #080b12, #12171d);
        border-top: 1px solid rgba(212, 175, 55, 0.3);
        padding: 10px;
        z-index: 100;
        display: flex;
        justify-content: space-around;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar-mobile a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px;
        color: #9dafc4;
        text-decoration: none;
        font-size: 11px;
        transition: all 0.3s;
    }

    .sidebar-mobile a i {
        font-size: 20px;
        margin-bottom: 4px;
        color: #d4af37;
    }

    .sidebar-mobile a:hover,
    .sidebar-mobile a.active {
        color: #d4af37;
        transform: translateY(-2px);
    }
}

/* Market Mobile View */
@media (max-width: 768px) {
    /* Market table */
    .market-table-mobile table {
        font-size: 11px;
    }

    /* Hide less important columns on mobile */
    .market-table-mobile th:nth-child(3),
    .market-table-mobile td:nth-child(3),
    .market-table-mobile th:nth-child(5),
    .market-table-mobile td:nth-child(5),
    .market-table-mobile th:nth-child(6),
    .market-table-mobile td:nth-child(6) {
        display: none;
    }

    /* Make item image smaller */
    .market-table-mobile img {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    /* Adjust padding */
    .market-table-mobile td,
    .market-table-mobile th {
        padding: 8px 4px !important;
    }

    /* Item name adjustments */
    .market-table-mobile td:nth-child(2) {
        font-size: 12px;
        max-width: 120px;
        white-space: normal;
        line-height: 1.3;
    }

    /* Price column */
    .market-table-mobile td:nth-child(4) {
        font-size: 13px;
        font-weight: bold;
    }

    /* Action button */
    .market-table-mobile .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }

    /* Filter section adjustments */
    .market-filters-mobile {
        font-size: 12px;
    }

    .market-filters-mobile input,
    .market-filters-mobile select {
        font-size: 14px !important;
        padding: 6px 8px !important;
    }
}

/* Ranking Page Mobile - Enhanced */
@media (max-width: 768px) {
    /* Main ranking page container */
    .max-w-6xl {
        padding: 15px !important;
    }

    .bg-mu-darker {
        padding: 15px !important;
        border-radius: 12px !important;
        margin-bottom: 20px;
    }

    /* Page title mobile */
    .text-2xl {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    .text-3xl {
        font-size: 24px !important;
    }

    /* Ranking subtitle */
    .text-xl {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    /* Title underline */
    .w-28 {
        width: 60px !important;
        margin-bottom: 20px !important;
    }

    /* Main ranking container */
    #rankingContainer {
        border-radius: 12px !important;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        margin-top: 20px;
        position: relative;
    }

    /* Scroll hint indicator */
    #rankingContainer:after {
        content: "← Swipe to scroll →";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(212, 175, 55, 0.9);
        color: #080b12;
        padding: 4px 12px;
        font-size: 10px;
        font-weight: bold;
        border-radius: 8px 8px 0 0;
        opacity: 0.8;
        pointer-events: none;
        animation: fadeInOut 4s infinite;
    }

    @keyframes fadeInOut {
        0%, 20%, 80%, 100% { opacity: 0.8; }
        50% { opacity: 0.4; }
    }

    /* Ranking navigation tabs */
    #rankingTabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 20px;
    }

    #rankingTabs .ranking-tab {
        flex: 1;
        min-width: calc(33.333% - 6px);
        padding: 10px 8px !important;
        font-size: 11px !important;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s;
    }

    /* Events dropdown mobile */
    #rankingTabs .relative {
        flex: 1;
        min-width: calc(33.333% - 6px);
    }

    #eventsSubmenu {
        position: absolute;
        left: 0;
        right: 0;
        width: auto !important;
        max-width: none !important;
    }

    /* Class filter mobile */
    #classFilter .flex {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 6px;
        padding: 0 10px;
    }

    #classFilter .class-filter {
        padding: 8px 6px !important;
        font-size: 11px !important;
        text-align: center;
        border-radius: 6px;
    }

    /* Monster filter mobile */
    #monsterFilter select {
        width: 100%;
        font-size: 14px !important;
        padding: 10px !important;
        border-radius: 8px !important;
    }

    /* Table responsiveness - Enhanced Scrolling */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto !important;
        overflow-y: hidden;
        border-radius: 12px;
        box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.1);
        /* Add scroll indicators */
        background:
            /* Shadow on the right */
            linear-gradient(to right, rgba(18, 23, 29, 0), rgba(18, 23, 29, 1)) right,
            /* Shadow on the left */
            linear-gradient(to left, rgba(18, 23, 29, 0), rgba(18, 23, 29, 1)) left;
        background-size: 20px 100%, 20px 100%;
        background-repeat: no-repeat;
        background-attachment: local, local;
    }

    /* Table styling */
    .min-w-full {
        background: #12171d !important;
        font-size: 12px;
        min-width: 600px !important; /* Force horizontal scroll on mobile */
        width: max-content;
    }

    .min-w-full thead {
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05)) !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .min-w-full th {
        padding: 10px 6px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        white-space: nowrap;
    }

    .min-w-full td {
        padding: 10px 6px !important;
        font-size: 11px !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.05) !important;
        white-space: nowrap;
    }

    .min-w-full tr:last-child td {
        border-bottom: none !important;
    }

    /* Character name emphasis */
    .min-w-full td:nth-child(2) {
        font-weight: 600 !important;
        font-size: 12px !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Show ALL columns on mobile with horizontal scroll */
    .min-w-full th,
    .min-w-full td {
        display: table-cell !important;
        min-width: 80px; /* Minimum column width for scrolling */
    }

    /* Essential columns get more width */
    .min-w-full th:nth-child(1), /* # */
    .min-w-full td:nth-child(1) {
        min-width: 40px !important;
    }

    .min-w-full th:nth-child(2), /* Character */
    .min-w-full td:nth-child(2) {
        min-width: 120px !important;
        max-width: 150px !important;
    }

    .min-w-full th:nth-child(3), /* Level */
    .min-w-full td:nth-child(3) {
        min-width: 80px !important;
    }

    .min-w-full th:nth-child(4), /* Resets */
    .min-w-full td:nth-child(4) {
        min-width: 70px !important;
    }

    .min-w-full th:nth-child(5), /* Quests */
    .min-w-full td:nth-child(5) {
        min-width: 70px !important;
    }

    .min-w-full th:nth-child(6), /* Class */
    .min-w-full td:nth-child(6) {
        min-width: 100px !important;
    }

    .min-w-full th:nth-child(7), /* Guild */
    .min-w-full td:nth-child(7) {
        min-width: 100px !important;
    }

    .min-w-full th:nth-child(8), /* Location */
    .min-w-full td:nth-child(8) {
        min-width: 90px !important;
    }

    /* Load More button mobile */
    #loadMoreBtn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        margin-top: 15px;
    }

    /* Castle Siege mobile layout */
    .castle-siege-mobile {
        padding: 15px !important;
    }

    .castle-siege-mobile h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }

    .castle-siege-mobile .bg-mu-dark\/50 {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    /* Ranking stats mobile */
    .ranking-stats-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }

    .ranking-stats-mobile .stat-card {
        background: rgba(18, 23, 29, 0.8);
        padding: 12px;
        border-radius: 8px;
        border: 1px solid rgba(212, 175, 55, 0.2);
        text-align: center;
    }

    .ranking-stats-mobile .stat-value {
        font-size: 20px;
        font-weight: bold;
        color: #d4af37;
    }

    .ranking-stats-mobile .stat-label {
        font-size: 11px;
        color: #9dafc4;
        text-transform: uppercase;
    }
}

/* Warehouse Mobile */
@media (max-width: 768px) {
    /* Warehouse grid scaling */
    .warehouse-grid {
        transform: scale(0.7);
        transform-origin: top left;
        margin-bottom: -30%;
    }

    /* Warehouse slots */
    .warehouse-slot {
        width: 28px !important;
        height: 28px !important;
    }

    .warehouse-item img {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Modal Mobile Adjustments */
@media (max-width: 768px) {
    /* Modal sizing */
    .swal2-popup {
        width: 90% !important;
        max-width: none !important;
        padding: 15px !important;
    }

    .swal2-title {
        font-size: 18px !important;
    }

    .swal2-html-container {
        font-size: 14px !important;
    }

    /* Modal forms */
    .modal-form-mobile input,
    .modal-form-mobile select {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 10px;
    }
}

/* Tooltips Mobile */
@media (max-width: 768px) {
    /* Disable hover tooltips on mobile */
    .item-tooltip {
        display: none !important;
    }

    /* Add click-to-view tooltip */
    .item-mobile-tooltip {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, #080b12, #12171d);
        border-top: 2px solid #d4af37;
        padding: 15px;
        z-index: 9999;
        transform: translateY(100%);
        transition: transform 0.3s;
    }

    .item-mobile-tooltip.active {
        transform: translateY(0);
    }
}

/* Form Elements Mobile - Enhanced */
@media (max-width: 768px) {
    /* Prevent zoom on input focus (iOS) */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
        padding: 14px 16px !important;
        border-radius: 10px !important;
        background: rgba(18, 23, 29, 0.8) !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
        color: #9dafc4 !important;
        transition: all 0.3s !important;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: none !important;
        border-color: #d4af37 !important;
        background: rgba(18, 23, 29, 0.95) !important;
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    }

    /* Select dropdown styling */
    select {
        appearance: none !important;
        -webkit-appearance: none !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        background-size: 20px !important;
        padding-right: 40px !important;
    }

    /* Button styling - Modern Design */
    .btn,
    button,
    .btn-mobile {
        padding: 14px 24px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
        overflow: hidden;
        touch-action: manipulation;
    }

    /* Primary button */
    .btn-primary,
    button[type="submit"] {
        background: linear-gradient(135deg, #d4af37, #b8941f) !important;
        color: #080b12 !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3) !important;
    }

    .btn-primary:active,
    button[type="submit"]:active {
        transform: scale(0.98) !important;
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2) !important;
    }

    /* Secondary button */
    .btn-secondary {
        background: rgba(18, 23, 29, 0.8) !important;
        color: #d4af37 !important;
        border: 1px solid #d4af37 !important;
    }

    .btn-secondary:active {
        background: rgba(212, 175, 55, 0.1) !important;
        transform: scale(0.98) !important;
    }

    /* Full width button on mobile */
    .btn-mobile-full {
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    /* Form labels */
    label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #d4af37 !important;
        margin-bottom: 6px !important;
        display: block !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Form groups */
    .form-group {
        margin-bottom: 20px !important;
    }

    /* Checkbox and Radio */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px !important;
        height: 20px !important;
        margin-right: 10px !important;
        vertical-align: middle !important;
    }
}

/* Login/Register Mobile */
@media (max-width: 768px) {
    .auth-container {
        width: 100%;
        max-width: none;
        padding: 20px 15px;
        margin: 20px 10px;
    }

    .auth-form input {
        padding: 12px;
        font-size: 16px;
    }

    .auth-form button {
        padding: 12px;
        font-size: 16px;
    }
}

/* Downloads Page Mobile */
@media (max-width: 768px) {
    .download-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .download-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .download-button {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}

/* Guides Mobile */
@media (max-width: 768px) {
    .guide-content {
        padding: 15px;
        font-size: 14px;
    }

    .guide-table {
        font-size: 12px;
    }

    .guide-table td {
        padding: 5px;
    }

    .guide-image {
        max-width: 100%;
        height: auto;
    }
}

/* Desktop Utility Classes */
@media (min-width: 769px) {
    .show-on-mobile {
        display: none !important;
    }
}

/* Utility Classes for Mobile */
@media (max-width: 768px) {
    .show-on-mobile {
        display: block !important;
    }

    .text-mobile-sm {
        font-size: 12px !important;
    }

    .text-mobile-xs {
        font-size: 11px !important;
    }

    /* Hide desktop navigation completely on mobile */
    .desktop-nav,
    nav.bg-gradient-to-r,
    header nav {
        display: none !important;
    }

    /* Ensure mobile nav is visible */
    .mobile-nav {
        display: block !important;
        visibility: visible !important;
    }

    /* Main header adjustments */
    header .container {
        padding: 10px !important;
    }

    header .flex.items-center.justify-between {
        justify-content: center !important;
    }

    /* Logo centered on mobile */
    header img[alt*="Dragon"],
    header img[src*="logo"] {
        max-width: 160px !important;
        margin: 0 auto;
    }

    /* Hide complex header elements */
    .absolute.left-0,
    .absolute.right-0,
    .online-counter-container,
    .opening-timer-container {
        display: none !important;
    }

    /* Streamer Box Mobile */
    .streamer-box {
        bottom: 60px !important; /* Above bottom navigation if exists */
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: 100% !important;
    }

    .streamer-box .streamer-content {
        max-height: 250px !important;
    }

    .streamer-box iframe {
        height: 120px !important;
    }

    /* Events Timer Mobile */
    #events-content,
    #invasion-content {
        max-height: 400px;
        overflow-y: auto;
    }

    /* Footer Mobile */
    footer {
        padding-bottom: 80px !important; /* Space for bottom navigation */
        font-size: 11px !important;
    }

    .p-mobile-2 {
        padding: 8px !important;
    }

    .m-mobile-2 {
        margin: 8px !important;
    }
}

/* Very Small Screens (< 480px) */
@media (max-width: 480px) {
    /* Even smaller containers */
    .max-w-7xl {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Smaller logo */
    header img[src*="logo"] {
        max-width: 140px !important;
    }

    /* Mobile menu adjustments */
    .mobile-menu-content {
        max-width: 100%;
        padding: 80px 15px 20px;
    }

    .mobile-menu-item {
        font-size: 14px;
        padding: 14px 16px;
    }

    /* News boxes - stacked layout */
    .news-box .flex {
        flex-direction: column !important;
    }

    .news-box .w-24 {
        width: 100% !important;
        min-width: 100% !important;
        height: 60px !important;
        min-height: 60px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    }

    /* Smaller fonts */
    .news-box h3 {
        font-size: 14px !important;
    }

    .news-box p {
        font-size: 12px !important;
    }

    /* Keep ALL columns visible on very small screens too */
    .min-w-full th,
    .min-w-full td {
        display: table-cell !important;
    }

    /* Just make table even more compact on very small screens */
    .min-w-full th {
        padding: 8px 4px !important;
        font-size: 9px !important;
    }

    .min-w-full td {
        padding: 8px 4px !important;
        font-size: 10px !important;
    }

    /* Ranking navigation - stack on very small screens */
    #rankingTabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #rankingTabs .ranking-tab {
        min-width: auto !important;
        padding: 8px 4px !important;
        font-size: 10px !important;
    }

    /* Buttons full width */
    .btn,
    button {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Market filters - single column */
    .market-filters-mobile .grid {
        grid-template-columns: 1fr !important;
    }

    /* Smaller modals */
    .swal2-popup {
        width: 95% !important;
        margin: 10px !important;
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 812px) and (orientation: landscape) {
    .header-main {
        padding: 10px;
    }

    .logo-mobile {
        max-width: 150px;
    }

    .mobile-menu-content {
        padding-top: 60px;
    }

    .mobile-menu-item {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Fix for sticky elements on mobile */
@media (max-width: 768px) {
    .sticky {
        position: relative !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce animation duration on mobile for better performance */
    .animate-spin,
    .animate-pulse {
        animation-duration: 1s !important;
    }

    /* Reduce shadows */
    .shadow-lg {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
}