/* Modern Conflict - Modern UI Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
}

/* Ensure all links and buttons are clickable */
a, button, input[type="submit"], input[type="button"] {
    cursor: pointer;
    position: relative;
}

/* Ensure interactive elements are above overlays when active */
a:active, button:active {
    z-index: 100;
}

/* ========================================
   TOOLTIP SYSTEM - REMOVED
   Moved to tooltips-standalone.css to avoid conflicts
   ======================================== */

/* ========================================
   BODY BACKGROUND STYLES
   ======================================== */
body {
    background-image: url('/images/bg-mc2.png');
    background-color: #272823;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1; /* Negative z-index so it never blocks anything */
    pointer-events: none;
}

/* Liquid Glass Effect */
.glass-card {
    background: rgba(39, 40, 35, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.nav-item {
    position: relative;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    height: 60%;
    width: 2px;
    background: rgba(168, 152, 99, 0.6);
    transition: transform 0.2s ease;
    border-radius: 2px;
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.stat-card {
    background: rgba(39, 40, 35, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.badge-notification {
    background: rgba(220, 38, 38, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.badge-logs {
    background: rgba(245, 158, 11, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.section-header {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid rgba(168, 152, 99, 0.5);
}

.content-card {
    background: rgba(39, 40, 35, 0.3);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 152, 99, 0.3);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 152, 99, 0.5);
}

/* Ensure content is above overlay but below mobile menu */
nav, .container-wrapper, footer {
    position: relative;
    z-index: 1;
}

/* Base aside z-index */
aside {
    position: relative;
    z-index: 1;
}

/* Smokey glass for top nav */
nav.glass-card {
    background: rgba(20, 21, 19, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 50;
    overflow: visible; /* Allow tooltips to overflow */
}

nav.glass-card .flex {
    overflow: visible; /* Allow tooltips to overflow */
}

nav.glass-card .max-w-7xl {
    overflow: visible; /* Allow tooltips to overflow */
}

/* Slim sticky bar - Desktop (Ultra Transparent Liquid Glass) */
.slim-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 500 !important; /* Below mobile menu (600) */
    background: rgba(20, 21, 19, 0.25);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible !important; /* Allow dropdowns and tooltips to overflow */
}

.slim-sticky-bar .flex,
.slim-sticky-bar .max-w-7xl {
    overflow: visible !important; /* Allow tooltips to overflow */
}

.slim-sticky-bar.visible {
    transform: translateY(0);
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dropdowns in sticky bar */
.slim-sticky-bar .dropdown {
    position: relative;
}

.slim-sticky-bar .dropdown-menu {
    z-index: 100000; /* Above everything when open */
}

/* Mobile Slim Bar - Ultra Compact Version */
@media (max-width: 1023px) {
    .slim-sticky-bar {
        display: block !important;
        height: auto;
        padding: 0.375rem 0;
        transform: translateY(0) !important; /* Always visible on mobile */
    }
    
    .slim-sticky-bar .max-w-7xl {
        padding: 0 0.75rem;
    }
    
    .slim-sticky-bar .flex {
        height: auto;
        flex-wrap: nowrap;
        gap: 0.375rem;
        font-size: 0.75rem;
    }
    
    .slim-sticky-bar .h-4 {
        height: 0.75rem;
    }
    
    .slim-stat {
        padding: 0.125rem 0.375rem;
        gap: 0.25rem;
    }
    
    .slim-stat svg {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .slim-stat-value {
        font-size: 0.75rem;
    }
    
    .slim-sticky-bar .text-sm {
        font-size: 0.75rem;
    }
    
    /* Hamburger in sticky bar */
    .slim-sticky-bar .hamburger {
        display: flex !important;
        padding: 0.375rem;
        margin-right: 0.25rem;
    }
    
    .slim-sticky-bar .hamburger span {
        width: 18px;
        height: 2px;
    }
    
    /* Compact notification icons */
    .slim-sticky-bar a {
        padding: 0.25rem;
    }
    
    .slim-sticky-bar a svg {
        width: 1rem;
        height: 1rem;
    }
    
    .slim-sticky-bar a .absolute {
        font-size: 0.625rem;
        height: 1rem;
        width: 1rem;
        min-width: 1rem;
    }
    
    /* Hide icons on very small screens to save space */
    @media (max-width: 480px) {
        .slim-stat svg {
            display: none;
        }
        
        .slim-sticky-bar .h-4 {
            display: none;
        }
        
        .slim-stat {
            padding: 0.125rem 0.25rem;
        }
    }
}

.slim-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: visible; /* Allow tooltips to overflow */
}

/* Progress border indicator for stats */
.slim-stat.has-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: var(--progress-width, 0%);
    height: 2px;
    background: linear-gradient(90deg, rgba(168, 152, 99, 0.8), rgba(168, 152, 99, 1));
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(168, 152, 99, 0.4);
}

.slim-stat.has-progress.status-low::after {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.8), rgba(239, 68, 68, 1));
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.slim-stat.has-progress.status-medium::after {
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.8), rgba(250, 204, 21, 1));
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.slim-stat.has-progress.status-xp::after {
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.6), rgba(250, 204, 21, 0.9));
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}
.slim-stat-value {
    font-weight: 600;
    font-size: 0.75rem;
    position: relative;
    z-index: 1; /* Above progress bars */
    transition: all 0.3s ease;
}

/* Premium Gaming UI - Sophisticated Design */
.medal-container {
    display: flex !important;
    align-items: center !important;
    gap: 0.125rem !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: relative !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
}

.medal-element {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.875rem !important;
    border-radius: 0.125rem !important;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.98) 50%, rgba(15, 15, 15, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: relative !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    color: #e5e5e5 !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    height: 1.875rem !important;
    clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px) !important;
}

.medal-element::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: inherit !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    clip-path: inherit !important;
}

.medal-element::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: inherit !important;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%) !important;
    pointer-events: none !important;
    z-index: 2 !important;
    opacity: 0.6 !important;
    clip-path: inherit !important;
}

/* Player Name - Subtle Military */
.medal-element.player-name {
    background: linear-gradient(135deg, rgba(45, 45, 40, 0.95) 0%, rgba(55, 55, 50, 0.98) 50%, rgba(45, 45, 40, 0.95) 100%) !important;
    border-color: rgba(180, 170, 140, 0.15) !important;
    color: #d4d0c0 !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.medal-element.player-name::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%) !important;
}

/* Level - Refined Gold */
.medal-element.level {
    background: linear-gradient(135deg, rgba(60, 50, 30, 0.95) 0%, rgba(70, 60, 40, 0.98) 50%, rgba(60, 50, 30, 0.95) 100%) !important;
    border-color: rgba(200, 180, 120, 0.2) !important;
    color: #e8d8a0 !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.medal-element.level::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%) !important;
}

/* Rank - Sophisticated Blue */
.medal-element.rank {
    background: linear-gradient(135deg, rgba(30, 40, 60, 0.95) 0%, rgba(40, 50, 70, 0.98) 50%, rgba(30, 40, 60, 0.95) 100%) !important;
    border-color: rgba(120, 150, 200, 0.2) !important;
    color: #b8c8e0 !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.medal-element.rank::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%) !important;
}

/* Subtle Separators */
.medal-element:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    right: -0.0625rem !important;
    top: 25% !important;
    bottom: 25% !important;
    width: 1px !important;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(255, 255, 255, 0.08), 
        rgba(255, 255, 255, 0.12), 
        rgba(255, 255, 255, 0.08), 
        transparent) !important;
    z-index: 3 !important;
}

/* Refined Hover Effects */
.medal-element:hover {
    transform: translateY(-1px) !important;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.medal-element.player-name:hover {
    border-color: rgba(180, 170, 140, 0.25) !important;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.medal-element.level:hover {
    border-color: rgba(200, 180, 120, 0.3) !important;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.medal-element.rank:hover {
    border-color: rgba(120, 150, 200, 0.3) !important;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

/* Responsive sophisticated design */
@media (max-width: 1023px) {
    .medal-container {
        gap: 0.09375rem !important;
    }
    
    .medal-element {
        padding: 0.1875rem 0.75rem !important;
        font-size: 0.6875rem !important;
        height: 1.75rem !important;
    }
}

@media (max-width: 768px) {
    .medal-container {
        gap: 0.0625rem !important;
    }
    
    .medal-element {
        padding: 0.125rem 0.625rem !important;
        font-size: 0.625rem !important;
        height: 1.625rem !important;
    }
    
    /* Hide separators on mobile for cleaner look */
    .medal-element:not(:last-child)::after {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .medal-container {
        gap: 0.03125rem !important;
    }
    
    .medal-element {
        padding: 0.09375rem 0.5rem !important;
        font-size: 0.5625rem !important;
        height: 1.5rem !important;
    }
}

/* Inline Stats - Clean Military Style */
.inline-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: fit-content;
    transition: all 0.2s ease;
}

.inline-stat-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.inline-stat-value {
    font-weight: 700;
    font-size: 0.875rem;
}

.inline-stat-label {
    font-weight: 500;
    font-size: 0.75rem;
    color: #a89863;
    margin-right: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inline-stat[data-tooltip] {
    cursor: help;
    position: relative;
}

/* WoW-Style XP/Level Progress Bar - Level Left, XP Below Bar */
.xp-level-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: fit-content;
}

.xp-level-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    height: 100%;
}

.xp-level-text {
    font-weight: 800;
    font-size: 1rem;
    color: #facc15;
    line-height: 1;
    letter-spacing: 0.025em;
}

.xp-progress-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    justify-content: center;
}

.xp-progress-container {
    position: relative;
    width: 8rem;
    height: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.xp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #facc15 0%, #f59e0b 30%, #d97706 70%, #b45309 100%);
    border-radius: 0.375rem;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}

.xp-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 0.375rem;
}

.xp-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: xp-shine 3s ease-in-out infinite;
    border-radius: 0.375rem;
}

@keyframes xp-shine {
    0%, 100% { 
        transform: translateX(-100%); 
        opacity: 0;
    }
    50% { 
        transform: translateX(100%); 
        opacity: 1;
    }
}

.xp-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.625rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(0, 0, 0, 0.7),
        0 1px 2px rgba(0, 0, 0, 1);
    z-index: 2;
    letter-spacing: 0.05em;
}

.xp-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #a89863;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.125rem;
}

.xp-current {
    color: #facc15;
    font-weight: 600;
}

.xp-separator {
    color: #6d6340;
}

.xp-needed {
    color: #8b7e52;
}

/* Sticky Bar XP/Level Bar - Compact Version */
.xp-level-bar-sticky {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.125rem 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    min-width: fit-content;
}

.xp-level-info-sticky {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    height: 100%;
}

.xp-level-text-sticky {
    font-weight: 800;
    font-size: 0.75rem;
    color: #facc15;
    line-height: 1;
    letter-spacing: 0.025em;
}

.xp-progress-wrapper-sticky {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    justify-content: center;
}

.xp-progress-container-sticky {
    position: relative;
    width: 6rem;
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.xp-progress-bar-sticky {
    height: 100%;
    background: linear-gradient(90deg, #facc15 0%, #f59e0b 30%, #d97706 70%, #b45309 100%);
    border-radius: 0.25rem;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 4px rgba(250, 204, 21, 0.3);
}

.xp-progress-bar-sticky::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 0.25rem;
}

.xp-progress-bar-sticky::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: xp-shine-sticky 3s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes xp-shine-sticky {
    0%, 100% { 
        transform: translateX(-100%); 
        opacity: 0;
    }
    50% { 
        transform: translateX(100%); 
        opacity: 1;
    }
}

.xp-progress-text-sticky {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 
        0 0 2px rgba(0, 0, 0, 0.9),
        0 0 4px rgba(0, 0, 0, 0.7),
        0 1px 1px rgba(0, 0, 0, 1);
    z-index: 2;
    letter-spacing: 0.05em;
}

.xp-details-sticky {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    color: #a89863;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.0625rem;
}

.xp-current-sticky {
    color: #facc15;
    font-weight: 600;
}

.xp-separator-sticky {
    color: #a89863;
}

.xp-needed-sticky {
    color: #a89863;
}

/* Ensure stat value tooltips work */
.slim-stat-value[data-tooltip] {
    cursor: help;
    position: relative;
    z-index: 10; /* Higher to show tooltips */
}

/* Stat change animations */
@keyframes statFlash {
    0%, 100% { 
        text-shadow: none;
        filter: brightness(1);
    }
    50% { 
        text-shadow: 0 0 10px currentColor;
        filter: brightness(1.3);
    }
}

@keyframes statIncrease {
    0% { 
        color: inherit;
        filter: brightness(1);
    }
    30% { 
        color: #4ade80;
        filter: brightness(1.4);
    }
    60% { 
        color: #4ade80;
        filter: brightness(1.3);
    }
    100% { 
        color: inherit;
        filter: brightness(1);
    }
}

@keyframes statDecrease {
    0% { 
        color: inherit;
        filter: brightness(1);
    }
    30% { 
        color: #ff5555;
        filter: brightness(0.7) saturate(1.5);
    }
    60% { 
        color: #ff5555;
        filter: brightness(0.75) saturate(1.3);
    }
    100% { 
        color: inherit;
        filter: brightness(1);
    }
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px) scale(0.95);
    }
}

.slim-stat-value.stat-increase {
    animation: statIncrease 1s ease;
}

.slim-stat-value.stat-decrease {
    animation: statDecrease 1s ease;
}

.slim-stat-value.stat-flash {
    animation: statFlash 0.8s ease;
}

/* Floating delta indicator - WoW Style */
.stat-delta {
    position: absolute;
    top: -15px;
    left: 50%;
    font-size: 1.1rem;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
    animation: floatUp 2.5s ease-out forwards;
    z-index: 10001;
    text-shadow: 
        2px 2px 0 rgba(0, 0, 0, 0.8),
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        1px -1px 0 rgba(0, 0, 0, 0.8),
        -1px 1px 0 rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
    will-change: transform, opacity;
}

@media (max-width: 768px) {
    .stat-delta {
        font-size: 0.9rem;
        top: -8px;
    }
}

.stat-delta.positive {
    color: #4ade80;
    filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.8));
}

.stat-delta.negative {
    color: #ff6b6b;
    filter: drop-shadow(0 0 6px rgba(255, 107, 107, 0.6));
    animation: floatUpNegative 2.5s ease-out forwards;
}

/* Negative numbers have different animation - slower, more ominous */
@keyframes floatUpNegative {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(-3px) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-45px) scale(0.9);
    }
}

.stat-delta.large {
    font-size: 1.35rem;
    animation: floatUpLarge 2.8s ease-out forwards;
}

/* Ensure stat values don't shift layout */
.slim-stat-value {
    display: inline-block;
    min-width: fit-content;
}

.slim-stat {
    isolation: isolate; /* Create stacking context to prevent layout shift */
}

@keyframes floatUpLarge {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1.25);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-60px) scale(1);
    }
}

/* Level up celebration */
@keyframes levelUp {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3) rotate(-5deg);
    }
    50% {
        transform: scale(1.3) rotate(5deg);
    }
    75% {
        transform: scale(1.3) rotate(-5deg);
    }
    100% {
        transform: scale(1);
    }
}

.level-up-animation {
    animation: levelUp 0.8s ease;
}

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-alert 2s ease-in-out infinite;
}

@keyframes pulse-alert {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Dropdown menu */
.dropdown {
    position: relative;
    z-index: 9999;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 200px;
    background: rgba(20, 21, 19, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 99999;
}

/* Desktop: hover to open */
@media (min-width: 1024px) and (hover: hover) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Touch devices & mobile: click to open */
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.625rem 1rem;
    color: rgba(212, 207, 179, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.dropdown-item:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.dropdown-item:hover {
    background: rgba(168, 152, 99, 0.15);
    color: rgba(232, 230, 216, 1);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

/* Progress bars */
.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(168, 152, 99, 0.8), rgba(168, 152, 99, 1));
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(168, 152, 99, 0.3);
}

.progress-fill.low {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.8), rgba(220, 38, 38, 1));
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.progress-fill.medium {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.8), rgba(234, 179, 8, 1));
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

/* Mini progress bars for HUD (tactical inline style) */
.progress-bar-mini {
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.5);
    position: relative;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #a89863 0%, #d4cfb3 100%);
    transition: width 0.3s ease;
    box-shadow: 
        0 0 6px rgba(168, 152, 99, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.progress-fill-mini.low {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    box-shadow: 
        0 0 6px rgba(239, 68, 68, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.progress-fill-mini.medium {
    background: linear-gradient(90deg, #facc15 0%, #fde047 100%);
    box-shadow: 
        0 0 6px rgba(250, 204, 21, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* HUD Stat Component (tactical inline stat display) */
.hud-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* HUD Action Button (compact tactical buttons) */
.hud-action-btn {
    padding: 7px;
    color: #a89863;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hud-action-btn:hover {
    background: rgba(168, 152, 99, 0.2);
    border-color: rgba(168, 152, 99, 0.4);
    color: #d4cfb3;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(168, 152, 99, 0.2);
}

/* Secondary info bar */
.secondary-info-bar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-group + .sidebar-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 10; /* Ensure buttons are clickable */
    pointer-events: auto; /* Always allow clicks */
}

.btn-primary {
    background: rgba(168, 152, 99, 0.9);
    color: #1a1f16;
    border-color: rgba(168, 152, 99, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: rgba(168, 152, 99, 1);
    box-shadow: 0 4px 12px rgba(168, 152, 99, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(69, 67, 56, 0.9);
    color: #d4cfb3;
    border: 1px solid rgba(168, 152, 99, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(85, 77, 53, 0.9);
    border-color: rgba(168, 152, 99, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: #6b9255 !important;
    color: #ffffff !important;
    border: 2px solid #7aa364 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.btn-success:hover {
    background: #7aa364 !important;
    box-shadow: 0 6px 20px rgba(107, 146, 85, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background: #a0522d !important;
    color: #ffffff !important;
    border: 2px solid #b86438 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.btn-danger:hover {
    background: #b86438 !important;
    box-shadow: 0 6px 20px rgba(160, 82, 45, 0.6);
    transform: translateY(-2px);
}

.btn-tab {
    padding: 0.75rem 2rem;
    background: rgba(69, 67, 56, 0.9) !important;
    color: #bdb386 !important;
    border: 1px solid rgba(168, 152, 99, 0.3) !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0.5rem 0.5rem 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-tab:hover {
    background: rgba(85, 77, 53, 0.9) !important;
    color: #d4cfb3 !important;
    border-color: rgba(168, 152, 99, 0.5) !important;
}

.btn-tab.active {
    background: rgba(168, 152, 99, 0.4) !important;
    color: #e8e6d8 !important;
    border-color: rgba(168, 152, 99, 0.6) !important;
    border-bottom-color: rgba(168, 152, 99, 1) !important;
    box-shadow: 0 4px 12px rgba(168, 152, 99, 0.3);
}

/* Form Inputs */
.input-modern {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8e6d8;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-modern:focus {
    outline: none;
    border-color: rgba(168, 152, 99, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(168, 152, 99, 0.1);
}

.input-modern::placeholder {
    color: rgba(189, 179, 134, 0.5);
}

/* Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(168, 152, 99, 0.4);
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: rgba(168, 152, 99, 0.8);
    border-color: rgba(168, 152, 99, 1);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #1a1f16;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: rgba(168, 152, 99, 0.6);
}

/* Item Cards */
.item-card {
    background: rgba(39, 40, 35, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.item-card:hover {
    border-color: rgba(168, 152, 99, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.item-card.locked {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.05);
}

.item-card.locked:hover {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Toast Notification - Top-Right Non-Blocking */
.toast-container {
    position: fixed;
    top: 1rem; /* Small margin from top */
    right: 1rem; /* Positioned in top-right corner */
    z-index: 10000;
    pointer-events: none !important; /* Never block clicks */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px; /* Reasonable max width for corner positioning */
}

@media (max-width: 1023px) {
    .toast-container {
        top: 1rem; /* Small margin from top on mobile */
        right: 0.5rem; /* Slightly smaller margin on mobile */
        max-width: 90vw; /* Full width available on mobile */
    }
}

.toast-overlay {
    display: none !important; /* No overlay - don't block interaction */
}

.toast {
    background: rgba(20, 21, 19, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    min-width: 320px;
    max-width: 500px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none !important; /* Toast itself doesn't block */
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: none !important; /* Still don't block even when visible */
}

.toast.error {
    border-color: rgba(160, 82, 45, 0.5);
    background: rgba(25, 20, 18, 0.95);
}

.toast.success {
    border-color: rgba(107, 146, 85, 0.5);
    background: rgba(20, 25, 19, 0.95);
}

.toast.info {
    border-color: rgba(168, 152, 99, 0.5);
    background: rgba(25, 24, 20, 0.95);
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0;
}

.toast-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.error .toast-icon {
    background: rgba(160, 82, 45, 0.2);
    color: #f8b4ab;
}

.toast.success .toast-icon {
    background: rgba(107, 146, 85, 0.2);
    color: #bbf7d0;
}

.toast.info .toast-icon {
    background: rgba(168, 152, 99, 0.2);
    color: #e8e6d8;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #e8e6d8;
    flex: 1;
}

.toast-message {
    color: #bdb386;
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-left: 2.375rem;
    margin-top: 0.25rem;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(189, 179, 134, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    margin-left: auto;
}

.toast-close:hover {
    color: rgba(189, 179, 134, 1);
    background: rgba(255, 255, 255, 0.05);
}

.toast.error .toast-message {
    color: #f8b4ab;
}

.toast.success .toast-message {
    color: #bbf7d0;
}

.toast.info .toast-message {
    color: #d4cfb3;
}

.toast-close {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(189, 179, 134, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto !important; /* Close button can be clicked */
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d4cfb3;
}

/* ===== MOBILE MENU - SIMPLIFIED CLEAN APPROACH ===== */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

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

/* Mobile Sidebar - Clean slide-in with Glass Morphism */
@media (max-width: 1023px) {
    /* Force sidebar off-screen by default */
    aside {
        position: fixed !important;
        top: 0 !important;
        left: -290px !important; /* Start completely off-screen */
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 99999 !important; /* WAY above everything */
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: rgba(15, 16, 14, 0.98) !important; /* Match sticky bar */
        backdrop-filter: blur(30px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
        box-shadow: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        visibility: visible !important; /* Always visible, just positioned off-screen */
    }

    /* When open, slide it into view */
    aside.mobile-open {
        left: 0 !important; /* Slide to 0 from -290px */
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.8) !important;
    }

    /* Sidebar container styling */
    aside .glass-card {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 1rem !important;
        min-height: 100vh !important;
    }

    /* All sidebar content is visible and clickable */
    aside * {
        color: inherit;
    }
    
    /* Mobile close button styling */
    aside .mobile-menu-close {
        background: rgba(168, 152, 99, 0.1);
        border-radius: 0.375rem;
        transition: background 0.2s ease;
    }
    
    aside .mobile-menu-close:hover {
        background: rgba(168, 152, 99, 0.2);
    }

    /* Clean scrollbar */
    aside::-webkit-scrollbar {
        width: 6px;
    }
    
    aside::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.3);
    }
    
    aside::-webkit-scrollbar-thumb {
        background: rgba(168, 152, 99, 0.6);
        border-radius: 3px;
    }
    
    aside::-webkit-scrollbar-thumb:hover {
        background: rgba(168, 152, 99, 0.8);
    }
}

/* Hide main header on mobile, use slim bar instead */
@media (max-width: 1023px) {
    nav.glass-card {
        display: none !important; /* Hide main header on mobile, slim bar replaces it */
    }
    
    /* Add padding to body to account for sticky bar on mobile */
    body {
        padding-top: 3rem; /* Space for slim sticky bar */
    }
    
    .container-wrapper {
        padding-top: 0.5rem !important;
    }
}

/* Show main header on desktop */
@media (min-width: 1024px) {
    nav.glass-card {
        display: block !important;
    }
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background: rgba(168, 152, 99, 0.1);
    border: 1px solid rgba(168, 152, 99, 0.2);
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #bdb386;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 1023px) {
    .hamburger {
        display: flex;
    }
}

/* Utility Classes */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    max-height: none !important;
    height: auto !important;
}

/* Ensure players table has no height restrictions - Override Tailwind */
.play\/players\.php .table-responsive,
.play\/players\.php table,
body[data-page="players"] .table-responsive,
body[data-page="players"] table,
main .table-responsive,
main .content-card .table-responsive {
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
    display: table !important;
}

/* Override any Tailwind table height restrictions */
.table-responsive table {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
}

.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Content stays at base level */
    main, .content-card, .container-wrapper {
        position: relative;
        z-index: 1;
    }

    /* Make stat cards stack */
    .slim-sticky-bar .flex {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Full width buttons on mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-tab {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    /* Smaller text on mobile */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Make tables scrollable */
    .table-responsive {
        overflow-x: auto;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        max-height: none !important;
        height: auto !important;
    }

    /* Stack grid columns on mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Adjust padding on mobile */
    .content-card {
        padding: 1rem;
    }

    /* Smaller progress bars */
    .progress-bar {
        height: 4px;
    }

    /* Adjust toast for mobile */
    .toast {
        min-width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        padding: 0.875rem 1.25rem;
    }
    
    .toast-container {
        top: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    /* Make item cards stack better */
    .item-card {
        padding: 1rem;
    }

    .item-card .flex {
        flex-direction: column;
        text-align: center;
    }

    .item-card .flex-shrink-0 {
        margin: 0 auto;
    }

    /* Hide extra icons on mobile for cleaner look */
    .lg\:flex:not(.flex) svg:first-child {
        display: none;
    }

    /* Mobile navigation adjustments */
    .container-wrapper {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Reduce gaps on mobile */
    .gap-4 {
        gap: 0.75rem;
    }

    .gap-6 {
        gap: 1rem;
    }

    /* Smaller stat values on mobile */
    .text-2xl {
        font-size: 1.25rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    /* Make dropdown menus full width on mobile */
    .dropdown-menu {
        left: 0;
        right: 0;
        min-width: 100%;
    }

    /* Stack action buttons vertically */
    .flex.items-center.gap-2 {
        flex-wrap: wrap;
    }
}

/* Tablet Responsive (768px - 1023px) - Also use mobile sidebar */
@media (min-width: 768px) and (max-width: 1023px) {
    /* 2 column grids instead of 3 or 4 */
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Smaller padding on tablets */
    .content-card {
        padding: 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1280px) {
    /* Wider max-width for larger screens */
    .max-w-7xl {
        max-width: 1400px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    /* Increase touch targets */
    .btn {
        padding: 0.875rem 1.75rem;
        min-height: 44px;
    }

    .nav-item {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    /* Remove hover states on touch devices */
    .nav-item:hover::before {
        transform: none;
    }

}

/* Print styles */
@media print {
    /* Hide navigation elements when printing */
    nav, aside, footer, .slim-sticky-bar, .toast-overlay, .toast-container {
        display: none !important;
    }

    /* Full width content when printing */
    main {
        width: 100%;
    }

    /* Remove glass effects for printing */
    .glass-card, .content-card, .item-card {
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
}

