/* --------------------------------------------------------------------------
   Message System (Alert-based)
   -------------------------------------------------------------------------- */
.message {
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    font-size: var(--bs-font-size-base);
}

.message.success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--bs-success);
    color: var(--bs-success);
}

.message.error {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--bs-danger);
    color: var(--bs-danger);
}

.message.info {
    background-color: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--bs-info);
    color: var(--bs-info);
}

.message.warning {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--bs-warning);
    color: var(--bs-warning);
}

/* --------------------------------------------------------------------------
   Server Statistics Icons
   -------------------------------------------------------------------------- */
.stat-icon {
    min-width: 48px;
    text-align: center;
}

.hof-card {
    background: rgba(var(--theme-warning-rgb), 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--theme-warning-rgb), 0.4) !important;
    border-radius: 20px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(var(--theme-warning-rgb), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(var(--theme-warning-rgb), 0.15) !important;
}


.hof-character-head-container {
    height: 100px !important;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.hof-character-head {
    width: auto;
    height: 100px !important;
    object-fit: contain;
    object-position: top center;
    clip-path: circle(100% at 50% 50%);
    -webkit-clip-path: circle(50% at 50% 50%);
    max-width: 100%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --------------------------------------------------------------------------
   Vault Grid System
   -------------------------------------------------------------------------- */
.vault-card {
    min-width: 256px;
    flex: 0 1 auto;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(32px, 1fr));
    grid-template-rows: repeat(15, 32px);
    gap: 3px;
    width: 100%;
    padding: 6px;
    border-radius: var(--bs-border-radius-sm);
    min-height: calc(15 * 32px + 14 * 3px + 12px);
    /* Remove fixed min-width to allow responsiveness */
    /* Calculate minimum width based on slot size and gaps */
    max-width: 100%;
    box-sizing: border-box;
}

/* Make vault grid responsive on small screens */
@media (max-width: 575.98px) {
    .vault-grid {
        /* Reduce slot size slightly on very small screens */
        grid-template-columns: repeat(8, minmax(28px, 1fr));
        grid-template-rows: repeat(15, 28px);
        gap: 2px;
        padding: 4px;
        min-height: calc(15 * 28px + 14 * 2px + 8px);
        /* Ensure grid maintains its calculated width */
        width: fit-content;
        max-width: 100%;
    }

    .vault-slot {
        min-width: 28px;
        min-height: 28px;
    }

    .item-info {
        width: 56px !important;
        height: 56px !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .vault-grid {
        /* On medium-small screens, keep slots at reasonable size */
        grid-template-columns: repeat(8, minmax(30px, 1fr));
        grid-template-rows: repeat(15, 30px);
        gap: 2px;
        padding: 5px;
        min-height: calc(15 * 30px + 14 * 2px + 10px);
        width: fit-content;
        max-width: 100%;
    }

    .vault-slot {
        min-width: 30px;
        min-height: 30px;
    }

    .item-info {
        width: 60px !important;
        height: 60px !important;
    }
}

/* On larger screens, allow the grid to be flexible but maintain minimum size */
@media (min-width: 768px) {
    .vault-grid {
        /* Ensure grid has enough space but can shrink if needed */
        width: fit-content;
        min-width: calc(8 * 32px + 7 * 3px + 12px);
        max-width: 100%;
    }
}

/* Ensure parent containers allow scrolling for vault */
#vault {
    overflow-x: auto;
    overflow-y: visible;
    min-width: 0;
    /* Allow flex items to shrink below content size */
    width: 100%;
}

/* Make card-body scrollable when it contains vault-grid */
.card-body:has(.vault-grid) {
    overflow-x: auto;
    overflow-y: visible;
    min-width: 0;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
    #vault .vault-grid {
        /* Ensure the vault grid itself can scroll if parent doesn't support :has() */
        overflow-x: auto;
    }
}

/* Style scrollbar for better UX on vault containers */
#vault::-webkit-scrollbar,
.card-body:has(.vault-grid)::-webkit-scrollbar {
    height: 8px;
}

#vault::-webkit-scrollbar-track,
.card-body:has(.vault-grid)::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

#vault::-webkit-scrollbar-thumb,
.card-body:has(.vault-grid)::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.6);
    border-radius: 4px;
}

#vault::-webkit-scrollbar-thumb:hover,
.card-body:has(.vault-grid)::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

.vault-slot {
    min-width: 32px;
    min-height: 32px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--bs-border-radius-sm);
    background: rgba(15, 23, 42, 0.8);
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: var(--bs-box-shadow-sm);
}

.vault-slot-empty {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.6);
}

.vault-slot-empty:hover {
    border-color: rgba(59, 130, 246, 0.7);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.vault-slot-empty.drag-over,
.vault-slot-filled.drag-over {
    border-color: var(--bs-primary);
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    z-index: 3;
}

.vault-slot-filled,
.item-container {
    border-color: rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5), inset 0 0 8px rgba(59, 130, 246, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    cursor: move;
    cursor: grab;
}

.item-info {
    width: 64px !important;
    height: 64px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;

}

.vault-slot-filled:active,
.item-container:active {
    cursor: grabbing;
}

.vault-slot-filled:hover,
.item-container:hover {
    border-color: var(--bs-primary);
    background: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.7), inset 0 0 12px rgba(59, 130, 246, 0.3);
    transform: scale(1.02);
    z-index: 2;
}

.vault-slot-filled.dragging,
.item-container.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Vault Item Hover Tooltip */
.vault-slot-filled {
    position: relative;
}

.vault-slot-filled:hover {
    z-index: 999;
}

/* Bootstrap tooltip customization for vault items */
.tooltip.bs-tooltip-right>.tooltip-inner,
.tooltip.bs-tooltip-auto[data-popper-placement^="right"]>.tooltip-inner {
    background-color: rgba(15, 23, 42, 0.98) !important;
    color: #cbd5e1 !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    min-width: 250px !important;
    max-width: 350px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

.tooltip.bs-tooltip-right>.tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="right"]>.tooltip-arrow::before {
    border-right-color: #3b82f6 !important;
}

/* Ensure tooltip content styling is preserved */
.tooltip-inner .item-popup-container {
    background: transparent !important;
    padding: 0 !important;
}

.tooltip-inner .item-popup-content {
    text-align: center !important;
}

/* Make sure tooltip has proper z-index */
.tooltip {
    z-index: 99999 !important;
}

/* Item Popup Container - Dark theme styling */
.item-popup-container {
    background: rgba(15, 23, 42, 0.98);
    padding: 0;
    text-align: center;
}

.item-popup-content {
    text-align: center;
}

/* Item Name - Quality-based colors */
.item-popup-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.item-name-gold {
    color: #fbbf24 !important;
    /* Gold for godlike */
}

.item-name-purple {
    color: #a855f7 !important;
    /* Purple for prestige */
}

.item-name-red {
    color: #ef4444 !important;
    /* Red for high level */
}

.item-name-blue {
    color: #3b82f6 !important;
    /* Blue for ancient */
}

.item-name-green {
    color: #22c55e !important;
    /* Green for excellent */
}

.item-name-gray {
    color: #cbd5e1 !important;
    /* Gray for normal */
}



/* Category Container */
.item-popup-category {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.item-popup-category:first-of-type {
    border-top: none;
    padding-top: 0;
}

/* Category Title - Centered */
.item-popup-category-title {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0 !important;
    /* White/Light Gray */
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.item-popup-category-title.excellent-title {
    color: #3b82f6 !important;
    /* Blue for excellent/ancient titles */
}

/* Category Items - Centered */
.item-popup-category-item {
    color: #cbd5e1 !important;
    /* Light gray */
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.4;
    text-align: center;
}

/* Excellent Options - Blue text, Centered */
.item-popup-excellent-option {
    color: #3b82f6 !important;
    /* Blue */
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.4;
    text-align: center;
}

/* Ensure tooltips work in table cells */
td .item-info {
    position: relative;
}

/* Item Quality Border Colors - Order: Golden, Purple, Red, Blue, Green, Grey */

/* 1. Godlike - Golden (Best) */
.vault-slot-filled.item-quality-godlike {
    border-color: rgba(234, 179, 8, var(--item-opacity)) !important;
    /* Golden */
    box-shadow: 0 0 12px rgba(234, 179, 8, var(--item-shadow-opacity)), inset 0 0 8px rgba(234, 179, 8, 0.3) !important;
}

.vault-slot-filled.item-quality-godlike:hover {
    border-color: rgba(250, 204, 21, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(234, 179, 8, var(--item-shadow-opacity)), inset 0 0 12px rgba(234, 179, 8, 0.4) !important;
}

/* 2. Prestige - Purple */
.vault-slot-filled.item-quality-prestige {
    border-color: rgba(168, 85, 247, var(--item-opacity)) !important;
    /* Purple */
    box-shadow: 0 0 12px rgba(168, 85, 247, var(--item-shadow-opacity)), inset 0 0 8px rgba(168, 85, 247, 0.3) !important;
}

.vault-slot-filled.item-quality-prestige:hover {
    border-color: rgba(192, 132, 252, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(168, 85, 247, var(--item-shadow-opacity)), inset 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

/* 3. High Level - Red */
.vault-slot-filled.item-quality-high-level {
    border-color: rgba(239, 68, 68, var(--item-opacity)) !important;
    /* Red */
    box-shadow: 0 0 12px rgba(239, 68, 68, var(--item-shadow-opacity)), inset 0 0 8px rgba(239, 68, 68, 0.3) !important;
}

.vault-slot-filled.item-quality-high-level:hover {
    border-color: rgba(248, 113, 113, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, var(--item-shadow-opacity)), inset 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

/* 4. Ancient - Blue */
.vault-slot-filled.item-quality-ancient {
    border-color: rgba(59, 130, 246, var(--item-opacity)) !important;
    /* Blue */
    box-shadow: 0 0 12px rgba(59, 130, 246, var(--item-shadow-opacity)), inset 0 0 8px rgba(59, 130, 246, 0.3) !important;
}

.vault-slot-filled.item-quality-ancient:hover {
    border-color: rgba(96, 165, 250, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(59, 130, 246, var(--item-shadow-opacity)), inset 0 0 12px rgba(59, 130, 246, 0.4) !important;
}

/* 5. Excellent - Green */
.vault-slot-filled.item-quality-excellent {
    border-color: rgba(34, 197, 94, var(--item-opacity)) !important;
    /* Green */
    box-shadow: 0 0 12px rgba(34, 197, 94, var(--item-shadow-opacity)), inset 0 0 8px rgba(34, 197, 94, 0.3) !important;
}

.vault-slot-filled.item-quality-excellent:hover {
    border-color: rgba(74, 222, 128, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(34, 197, 94, var(--item-shadow-opacity)), inset 0 0 12px rgba(34, 197, 94, 0.4) !important;
}

/* 6. Normal - Grey (Worst) */
.vault-slot-filled.item-quality-normal {
    border-color: rgba(107, 114, 128, var(--item-opacity)) !important;
    /* Grey */
    box-shadow: 0 0 12px rgba(107, 114, 128, var(--item-shadow-opacity)), inset 0 0 8px rgba(107, 114, 128, 0.2) !important;
    background: rgba(59, 130, 246, 0.15) !important;
    /* Slightly less blue background */
}

.vault-slot-filled.item-quality-normal:hover {
    border-color: rgba(156, 163, 175, var(--item-opacity)) !important;
    box-shadow: 0 0 16px rgba(107, 114, 128, var(--item-shadow-opacity)), inset 0 0 12px rgba(107, 114, 128, 0.3) !important;
}

/* Item Quality Border Colors for "Get Items" Pages (Cards) */
.card.item-quality-godlike-border {
    border-color: rgba(234, 179, 8, var(--item-opacity)) !important;
    /* Golden */
    box-shadow: 0 0 8px rgba(234, 179, 8, var(--item-shadow-opacity)) !important;
}

.card.item-quality-prestige-border {
    border-color: rgba(168, 85, 247, var(--item-opacity)) !important;
    /* Purple */
    box-shadow: 0 0 8px rgba(168, 85, 247, var(--item-shadow-opacity)) !important;
}

.card.item-quality-high-level-border {
    border-color: rgba(239, 68, 68, var(--item-opacity)) !important;
    /* Red */
    box-shadow: 0 0 8px rgba(239, 68, 68, var(--item-shadow-opacity)) !important;
}

.card.item-quality-ancient-border {
    border-color: rgba(59, 130, 246, var(--item-opacity)) !important;
    /* Blue */
    box-shadow: 0 0 8px rgba(59, 130, 246, var(--item-shadow-opacity)) !important;
}

.card.item-quality-excellent-border {
    border-color: rgba(34, 197, 94, var(--item-opacity)) !important;
    /* Green */
    box-shadow: 0 0 8px rgba(34, 197, 94, var(--item-shadow-opacity)) !important;
}

.card.item-quality-normal-border {
    border-color: rgba(107, 114, 128, var(--item-opacity)) !important;
    /* Grey */
    box-shadow: 0 0 8px rgba(107, 114, 128, var(--item-shadow-opacity)) !important;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Vote Button Styling
   -------------------------------------------------------------------------- */
.vote {
    display: inline-block;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #2563eb 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: var(--bs-border-radius);
    color: #ffffff;
    font-weight: var(--bs-font-weight-bold);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0.5rem auto;
    min-width: 300px;
}

.vote:hover {
    background: linear-gradient(135deg, #2563eb 0%, var(--bs-primary) 100%);
    border-color: var(--bs-primary);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.vote:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.vote img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius-sm);
}


/* --------------------------------------------------------------------------
   Webshop Item Configuration - Custom Styles Only
   -------------------------------------------------------------------------- */
/* Item preview container */
.item-preview {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #1e293b;
    border-radius: 8px;
    padding: 0;
}

.item-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Headers */
.item-options-header,
.price-header {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #334155;
}

/* Excellent options title */
.exc-options-title {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Price breakdown rows */
.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.price-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #334155;
    border-bottom: none;
}

.price-label {
    font-size: var(--bs-font-size-base);
    color: #94a3b8;
}

.price-value {
    font-size: var(--bs-font-size-base);
    font-weight: 600;
    color: #3b82f6;
}

.price-row.price-total .price-value {
    font-size: var(--bs-font-size-base);
    color: #fbbf24;
}

.price-unit {
    font-size: var(--bs-font-size-base);
    color: #64748b;
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Homepage Custom Styles (Minimal - Only what Bootstrap can't do)
   -------------------------------------------------------------------------- */
/* Event image container */
.event-image-container {
    height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

/* Event timer styling */
.event-timer {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-teal);
}

.event-timer.event-active {
    color: var(--bs-success);
}

/* Teal background utility */
.bg-teal {
    background-color: var(--theme-teal) !important;
}

/* View More Button - Futuristic Style */
.btn-view-more {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.2) 0%,
            rgba(37, 99, 235, 0.3) 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.6) !important;
    color: rgba(148, 163, 184, 0.95) !important;
    padding: 0.75rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow:
        0 4px 15px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
}

/* Stat Icons with Glow */
.stat-icon {
    position: relative;
}

.stat-icon i {
    filter: drop-shadow(0 0 8px currentColor);
    transition: all 0.3s ease;
}

.stat-icon:hover i {
    filter: drop-shadow(0 0 15px currentColor);
    transform: scale(1.1);
}

/* Diamond and Plus Icons */
.diamond-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(59, 130, 246, 0.6);
    transform: rotate(45deg);
    border-radius: 4px;
    position: relative;
}

.diamond-icon {
    display: block;
    width: 8px;
    height: 8px;
    background: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
    transform: rotate(-45deg);
}

/* Event Cards in Current Events Section */
.event-image-container {
    position: relative;
    overflow: hidden;
}

.event-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(15, 23, 42, 0.3) 100%);
    pointer-events: none;
}

/* Header Logo - Futuristic Glow */
.header-logo {
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: rgba(203, 213, 225, 0.95) !important;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5) !important;
    transition: all 0.3s ease !important;
}

.header-logo:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.8) !important;
}

/* --------------------------------------------------------------------------
   Battle Royale Featured Event Card Styles
   -------------------------------------------------------------------------- */
.event-card-br {
    position: relative;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(30, 41, 59, 0.95) 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.5) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(239, 68, 68, 0.3),
        0 0 30px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    overflow: visible !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card-br::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            rgba(239, 68, 68, 0.8),
            rgba(251, 191, 36, 0.8),
            rgba(239, 68, 68, 0.8));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
    filter: blur(10px);
    animation: br-border-glow 3s ease-in-out infinite;
}

.event-card-br::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            rgba(239, 68, 68, 0.8),
            rgba(251, 191, 36, 0.8),
            rgba(239, 68, 68, 0.8),
            transparent);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    /* animation: br-shimmer 2s ease-in-out infinite; */
}

@keyframes br-border-glow {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes br-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.event-card-br:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(239, 68, 68, 0.6),
        0 0 50px rgba(239, 68, 68, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Badge - NEW */
.badge-br-featured {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 4px 15px rgba(239, 68, 68, 0.6),
        0 0 20px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 10;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 4px 15px rgba(239, 68, 68, 0.6),
            0 0 20px rgba(239, 68, 68, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 6px 20px rgba(239, 68, 68, 0.8),
            0 0 30px rgba(239, 68, 68, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* BR Content Layout - Image Left, Text Right */
.event-br-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100%;
    min-height: 280px;
}

.event-br-image {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.event-br-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(239, 68, 68, 0.1) 50%,
            transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.event-br-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.3s ease;
}

.event-card-br:hover .event-br-image img {
    transform: scale(1.05);
}

.event-br-text {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.event-br-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-br-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow:
        0 0 10px rgba(239, 68, 68, 0.6),
        0 0 20px rgba(239, 68, 68, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Badge - HOT */
.badge-br-hot {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000000;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 10px rgba(251, 191, 36, 0.6),
        0 0 15px rgba(251, 191, 36, 0.4);
    white-space: nowrap;
    animation: hot-glow 2s ease-in-out infinite;
}

@keyframes hot-glow {

    0%,
    100% {
        box-shadow:
            0 2px 10px rgba(251, 191, 36, 0.6),
            0 0 15px rgba(251, 191, 36, 0.4);
    }

    50% {
        box-shadow:
            0 4px 15px rgba(251, 191, 36, 0.8),
            0 0 25px rgba(251, 191, 36, 0.6);
    }
}

.event-br-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.event-br-timer {
    margin-bottom: 1.5rem;
}

.event-timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.event-br-timer .event-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow:
        0 0 10px rgba(251, 191, 36, 0.8),
        0 0 20px rgba(251, 191, 36, 0.6);
}

.event-br-action {
    margin-top: auto;
}

.btn-br-join {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.9) 0%,
            #dc2626 100%) !important;
    border: 2px solid rgba(239, 68, 68, 0.8) !important;
    color: #ffffff !important;
    padding: 0.75rem 2rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    border-radius: 6px !important;
    box-shadow:
        0 4px 15px rgba(239, 68, 68, 0.5),
        0 0 20px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-br-join::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s;
}

.btn-br-join:hover {
    background: linear-gradient(135deg,
            #ef4444 0%,
            #dc2626 100%) !important;
    border-color: #f87171 !important;
    box-shadow:
        0 6px 25px rgba(239, 68, 68, 0.7),
        0 0 30px rgba(239, 68, 68, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.btn-br-join:hover::before {
    left: 100%;
}

.btn-br-join:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(239, 68, 68, 0.5),
        0 0 15px rgba(239, 68, 68, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Responsive adjustments for BR card */
@media (max-width: 991px) {
    .event-br-content {
        flex-direction: column;
        min-height: auto;
    }

    .event-br-image {
        flex: 0 0 auto;
        height: 200px;
    }

    .event-br-title {
        font-size: 1.5rem;
    }
}


/* ==========================================================================
   Three-Column Layout (Left Sidebar, Main Content, Right Sidebar)
   ========================================================================== */
.hero-container {
    height: 200px;
    overflow: hidden;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.hero-spacer {
    height: 200px;
    width: 100%;
    flex-shrink: 0;
}

.hero-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center 40%;

    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 0) 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.5) 70%,
            rgba(0, 0, 0, 0) 100%) !important;
    
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
                0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
    height: 300px;
    width: auto;
    object-fit: contain;
    object-position: left middle;
}

.three-column-layout {
    display: flex;
    min-height: calc(100vh - 230px);
    background: var(--bs-body-bg);
}

/* Define missing variables for backward compatibility */
:root {
    --bg-primary: var(--bs-body-bg);
    --bg-secondary: var(--bs-secondary-bg);
}

/* Define missing variables for backward compatibility */
:root {
    --bg-primary: var(--bs-body-bg);
    --bg-secondary: var(--bs-secondary-bg);
}

/* Left Sidebar - Desktop only (hidden on mobile, shown via offcanvas) */
.left-sidebar {
    width: 280px;
    min-width: 280px;
    top: 200px;
    height: calc(100vh - 230px) !important;
    align-self: flex-start;
    background: var(--bs-secondary-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mobile sidebar content wrapper */
.left-sidebar-content,
.right-sidebar-content {
    background: var(--bs-secondary-bg);
}

/* Ensure offcanvas has solid background on mobile */
.offcanvas {
    background-color: var(--bs-secondary-bg) !important;
}

/* Force solid background for mobile sidebars - override Bootstrap defaults */
#mobileSidebar,
#mobileRightSidebar {
    background-color: var(--bs-secondary-bg) !important;
    background: var(--bs-secondary-bg) !important;
    opacity: 1 !important;
}

#mobileSidebar .left-sidebar-content,
#mobileRightSidebar .right-sidebar-content {
    background-color: var(--bs-secondary-bg) !important;
    background: var(--bs-secondary-bg) !important;
}

.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Make mobile offcanvas full screen */
@media (max-width: 1199.98px) {

    #mobileSidebar.offcanvas-start,
    #mobileRightSidebar.offcanvas-end {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        background-color: var(--bs-secondary-bg) !important;
        background: var(--bs-secondary-bg) !important;
    }

    #mobileSidebar .offcanvas-body,
    #mobileRightSidebar .offcanvas-body {
        height: calc(100vh - 57px) !important;
        overflow-y: auto;
        overflow-x: hidden;
        background-color: var(--bs-secondary-bg) !important;
        background: var(--bs-secondary-bg) !important;
    }

    #mobileSidebar .offcanvas-header,
    #mobileRightSidebar .offcanvas-header {
        background-color: var(--bs-secondary-bg) !important;
        background: var(--bs-secondary-bg) !important;
    }
}

/* Shared Sidebar Scrollbar Styles */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar,
.left-sidebar-content::-webkit-scrollbar,
.offcanvas-body::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track,
.left-sidebar-content::-webkit-scrollbar-track,
.offcanvas-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb,
.left-sidebar-content::-webkit-scrollbar-thumb,
.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.left-sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover,
.left-sidebar-content::-webkit-scrollbar-thumb:hover,
.offcanvas-body::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Firefox scrollbar for Sidebars */
.left-sidebar,
.right-sidebar,
.left-sidebar-content,
.offcanvas-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(0, 0, 0, 0.2);
}

.sidebar-section {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.menu-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

/* Tree Menu Styles */
.tree-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link,
.menu-parent-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 13px;
    cursor: pointer;
}

.menu-link:hover,
.menu-parent-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--theme-primary);
}

.menu-item.active>.menu-link,
.menu-item.active>.menu-parent-toggle {
    background: rgba(59, 130, 246, 0.2);
    color: var(--theme-primary);
    font-weight: bold;
}

.menu-icon,
.submenu-icon {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.menu-label,
.submenu-label {
    flex: 1;
}

.menu-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.menu-item.open>.menu-parent-toggle .menu-arrow {
    transform: rotate(180deg);
}

/* Submenu Styles */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.show {
    max-height: 500px;
}

.submenu-item {
    margin-bottom: 0.125rem;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem 0.375rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
}

.submenu-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--theme-primary);
}

.submenu-item.active>.submenu-link {
    background: rgba(59, 130, 246, 0.15);
    color: var(--theme-primary);
    font-weight: bold;
}

/* Rankings in Sidebar */
.rankings-content {
    font-size: 12px;
}

.ranking-group {
    margin-bottom: 1rem;
}

.ranking-group:last-child {
    margin-bottom: 0;
}

.ranking-subtitle {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.rankings-content .table {
    font-size: 11px;
}

.rankings-content .table th {
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rankings-content .table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rankings-content .table td a {
    color: var(--theme-primary);
    text-decoration: none;
}

.rankings-content .table td a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
    /* Prevents overflow */
    background: var(--bs-body-bg);
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 230px);
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.4) rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
    /* scroll-margin-top: 200px; Prevent content from scrolling under fixed hero */
}

/* Custom Scrollbar for Main Content */
.main-content::-webkit-scrollbar {
    width: 10px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 5px;
    border: 2px solid var(--bs-body-bg);
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
}

/* Right Sidebar */
.right-sidebar {
    width: 250px;
    min-width: 250px;
    background: var(--bs-secondary-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 230px);
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(0, 0, 0, 0.2);
    top: 200px;
    align-self: flex-start;
}


/* Server Statistics in Right Sidebar */
.stats-section {
    margin-bottom: 1.5rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
    font-size: 12px;
}

.stat-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.stat-label {
    flex: 1;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: bold;
    color: var(--theme-primary);
}

/* Events in Right Sidebar */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    cursor: help;
    transition: all 0.2s ease;
}

.event-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.event-name {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.event-timer {
    font-size: 11px;
    color: var(--theme-primary);
    font-family: monospace;
}

/* Login Section in Sidebar */
.login-section {
    padding-bottom: 1rem;
}

.login-section .form-control {
    font-size: 13px;
    padding: 0.5rem;
}

.login-section .btn {
    font-size: 13px;
    padding: 0.5rem;
}

.language-section {
    padding-bottom: 1rem;
}

/* Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

.alert-item {
    background: var(--theme-bg-panel);
    border: 1px solid var(--theme-border);
    border-radius: var(--bs-border-radius);
    padding: 0.75rem 1rem;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.alert-item.show {
    transform: translateX(0);
    opacity: 1;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.alert-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    border-left: 4px solid #10b981;
}

.alert-success .alert-icon {
    color: #10b981;
}

.alert-info {
    border-left: 4px solid #3b82f6;
}

.alert-info .alert-icon {
    color: #3b82f6;
}

.alert-warning {
    border-left: 4px solid #f59e0b;
}

.alert-warning .alert-icon {
    color: #f59e0b;
}

.alert-danger {
    border-left: 4px solid #ef4444;
}

.alert-danger .alert-icon {
    color: #ef4444;
}


.user-avatar {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    object-fit: cover;
}

.user-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.user-resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    padding: 0.25rem 0;
}

.resource-item i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.resource-label {
    flex: 1;
    color: var(--text-secondary);
}

.resource-value {
    font-weight: bold;
    color: var(--theme-primary);
}

/* Admin Code Section */
.admin-code-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-code-section .form-control {
    font-size: 13px;
    padding: 0.5rem;
}

.admin-code-section .btn {
    font-size: 13px;
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .left-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: auto;
        z-index: 1;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
        position: relative;
    }

    .three-column-layout {
        flex-direction: column;
        min-height: auto;
        height: auto !important;
        overflow: visible !important;
    }

    .alert-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}