﻿/* =============================================================================
   HEADER CONTAINER
   ============================================================================= */

header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    min-height: var(--header-height);
}

/* Prevent header height changes on community/idea board page when typing - use max-height instead of overflow:hidden */
body.community-page header {
    min-height: var(--header-height);
}

/* =============================================================================
   HEADER LAYOUT & SECTIONS
   ============================================================================= */

.header-left,
.header-right,
.brand-wrapper,
.flash-bar-content {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 15px;
    justify-content: flex-start;
    min-width: 0;
    flex: 1 1 auto;
}

.header-right {
    justify-content: flex-end;
    gap: 15px;
    padding: 0 10px;
    min-width: 0;
    flex: 1 1 auto;
}

/* =============================================================================
   NAVIGATION ITEMS
   ============================================================================= */

.header-nav {
    display: flex;
    gap: 5px;
    background: #121212;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #333;
    flex-wrap: nowrap;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item {
    color: #888;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.nav-item:hover {
    color: #ddd;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

/* =============================================================================
   NAVIGATION BADGES
   ============================================================================= */

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--urgent-red);
    border-radius: 50%;
    border: 2px solid #121212;
    animation: badgePulse 2s infinite;
}

/* =============================================================================
   NAVIGATION DROPDOWN
   ============================================================================= */

.nav-item-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-item-dropdown>.nav-item {
    cursor: pointer;
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    min-width: 200px;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10001;
    overflow: hidden;
    pointer-events: none;
    padding-top: 8px;
    margin-top: 0;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

/* Show dropdown on hover (but not while closing) */
.nav-item-dropdown:hover:not(.closing) .nav-dropdown-menu,
.nav-item-dropdown:focus-within:not(.closing) .nav-dropdown-menu,
.nav-item-dropdown.open:not(.closing) .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Force hide when closing */
.nav-item-dropdown.closing .nav-dropdown-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-dark);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background: rgba(255, 152, 0, 0.1);
    color: var(--accent);
}

.nav-dropdown-item svg {
    color: #666;
    flex-shrink: 0;
    transition: color 0.2s;
}

.nav-dropdown-item:hover svg {
    color: var(--accent);
}

/* =============================================================================
   MENU BUTTON
   ============================================================================= */

.menu-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 5px;
    border-radius: 4px;
    display: flex;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-btn:hover {
    background: #222;
    color: var(--accent);
}

/* =============================================================================
   MOBILE NAVIGATION
   ============================================================================= */

.mobile-nav-section {
    display: none;
}

.mobile-nav-link {
    text-decoration: none;
}

.mobile-nav-link.kofi-mobile {
    color: #ff5e5b;
}

.mobile-nav-link.kofi-mobile:hover {
    color: #ff7878;
    background: rgba(255, 94, 91, 0.1);
}

.mobile-nav-link.kofi-mobile svg {
    color: #ff5e5b;
}

.mobile-auth-container {
    margin-top: 4px;
}

.mobile-login-btn {
    color: var(--accent) !important;
    font-weight: 600;
}

.mobile-login-btn:hover {
    background: rgba(102, 126, 234, 0.15) !important;
}

.mobile-login-btn svg {
    color: var(--accent);
}

/* Small screens - show mobile nav in hamburger, hide other elements */
@media (max-width: 768px) {
    .mobile-nav-section {
        display: block;
    }

    .header-nav {
        display: none !important;
    }

    .kofi-btn {
        display: none !important;
    }

    .wiki-search-container {
        display: none !important;
    }

    .header-clock-group {
        display: none !important;
    }

    .header-divider {
        display: none !important;
    }

    .user-count-badge {
        display: none !important;
    }

    .flash-header-bar {
        display: none !important;
    }

    .scrolling-title {
        display: none !important;
    }

    header {
        padding: 8px 12px !important;
        gap: 10px !important;
        min-height: auto !important;
        flex-wrap: nowrap !important;
    }

    .header-left {
        flex: 0 0 auto !important;
        gap: 8px !important;
    }

    .header-right {
        flex: 0 0 auto !important;
        gap: 8px !important;
        margin-left: auto !important;
    }

    .brand-wrapper {
        gap: 8px;
    }

    .header-logo {
        height: 32px;
    }
}

/* Very small screens - minimal header */
@media (max-width: 480px) {
    header {
        padding: 6px 10px !important;
    }

    .header-logo {
        height: 28px;
    }

    .menu-btn svg {
        width: 22px;
        height: 22px;
    }

    .notification-btn svg {
        width: 20px;
        height: 20px;
    }

    #auth-container {
        display: none !important;
    }
}

/* =============================================================================
   SETTINGS DROPDOWN
   ============================================================================= */

.settings-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.2s;
    z-index: 10001;
    margin-top: 5px;
}

.settings-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    padding: 12px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #333;
}

.dropdown-item {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clickable {
    cursor: pointer;
    transition: 0.2s;
}

.clickable:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dropdown-label {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-label .sub-label {
    font-size: 0.75rem;
    color: #777;
    margin-top: 2px;
}

.dropdown-divider {
    height: 1px;
    background: #333;
    margin: 0;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}

.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dropdown-btn svg {
    color: #888;
    flex-shrink: 0;
}

.dropdown-btn:hover svg {
    color: var(--accent);
}

/* =============================================================================
   CHANGELOG MODAL
   ============================================================================= */

.changelog-modal-content {
    max-width: 1200px !important;
    width: 95vw !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 16px;
    overflow: hidden;
    padding: 0 !important;
}

.changelog-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #151515 0%, #0d0d0d 100%);
    border-bottom: 1px solid #222;
}

.changelog-modal-content .modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
}

.changelog-modal-content .modal-header svg {
    color: var(--accent);
}

.changelog-modal-content .modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
}

.changelog-modal-content .modal-close:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: #f66;
    color: #f66;
}

.changelog-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* Container */
.cl-container {
    padding: 24px;
}

/* Stats Bar */
.cl-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.cl-stat {
    flex: 1;
    background: #151515;
    border: 1px solid #252525;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cl-stat:hover {
    border-color: #444;
    transform: translateY(-2px);
}

.cl-stat.active {
    border-color: var(--accent);
    background: rgba(255, 152, 0, 0.08);
}

.cl-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.cl-stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-top: 6px;
}

/* Hero Section - Latest Release */
.cl-hero {
    position: relative;
    background: linear-gradient(145deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 28px;
    overflow: hidden;
}

.cl-hero-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 152, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cl-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cl-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent), #ffb347);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cl-pulse {
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
    animation: clPulse 2s infinite;
}

@keyframes clPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.cl-hero-version {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.cl-version-num {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cl-version-date {
    font-size: 0.8rem;
    color: #666;
}

/* Hero Changes */
.cl-hero-changes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Change Items */
.cl-change {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: all 0.2s;
}

.cl-change:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.cl-change-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    font-weight: 600;
    cursor: help;
    position: relative;
}

.cl-change-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 6px;
    border: 1px solid #333;
    font-weight: 500;
}

.cl-change-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #000;
    margin-bottom: -6px;
    z-index: 100;
}

.cl-change-text {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
    padding-top: 3px;
}

/* Timeline Header */
.cl-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 0 4px;
}

.cl-timeline-header span:first-child {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    font-weight: 600;
}

.cl-timeline-count {
    font-size: 0.75rem;
    color: #555;
    background: #1a1a1a;
    padding: 5px 12px;
    border-radius: 12px;
}

/* Timeline */
.cl-timeline {
    position: relative;
    padding-left: 28px;
}

.cl-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #333 0%, #1a1a1a 100%);
    border-radius: 2px;
}

/* Release Cards */
.cl-release {
    position: relative;
    margin-bottom: 14px;
}

.cl-release:last-child {
    margin-bottom: 0;
}

.cl-timeline-dot {
    position: absolute;
    left: -28px;
    top: 18px;
    width: 18px;
    height: 18px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s;
}

.cl-release:hover .cl-timeline-dot {
    border-color: var(--accent);
    background: rgba(255, 152, 0, 0.2);
}

.cl-release-card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cl-release-card:hover {
    border-color: #333;
}

.cl-release-card.expanded {
    border-color: #444;
}

.cl-release-card.expanded .cl-timeline-dot {
    border-color: var(--accent);
    background: var(--accent);
}

/* Release Header */
.cl-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.cl-release-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cl-release-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cl-release-version {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.cl-release-date {
    font-size: 0.8rem;
    color: #555;
}

/* Preview Dots */
.cl-release-preview {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    margin-right: 14px;
}

.cl-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
    cursor: help;
}

.cl-preview-more {
    font-size: 0.65rem;
    color: #666;
    margin-left: 4px;
}

/* Expand Icon */
.cl-expand-icon {
    color: #555;
    transition: transform 0.3s ease, color 0.2s;
    flex-shrink: 0;
}

.cl-release-card.expanded .cl-expand-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Release Changes (collapsed by default) */
.cl-release-changes {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
    background: #0f0f0f;
}

.cl-release-card.expanded .cl-release-changes {
    max-height: 5000px;
    padding: 12px 16px 16px;
    overflow-y: auto;
}

.cl-release-changes .cl-change {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.cl-release-changes .cl-change:last-child {
    margin-bottom: 0;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cl-stats {
        flex-wrap: wrap;
    }

    .cl-stat {
        flex: 1 1 45%;
    }

    .cl-version-num {
        font-size: 1.3rem;
    }

    .cl-hero {
        padding: 16px;
    }

    .cl-change {
        padding: 8px 10px;
    }

    .cl-change-text {
        font-size: 0.8rem;
    }
}

/* =============================================================================
   FLASH HEADER BAR
   ============================================================================= */

.flash-header-bar {
    display: flex;
    align-items: center;
    background: rgba(22, 22, 22, 0.95);
    border: 1px solid #333;
    border-radius: 50px;
    padding: 2px 16px;
    margin: 5px 10px;
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    min-width: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 38px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.flash-special {
    border-color: #f33 !important;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.2) !important;
}

.flash-combat {
    border-color: #ff9800 !important;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.2) !important;
}

.flash-skilling {
    border-color: #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2) !important;
}

.flash-bar-content {
    gap: 10px;
    width: 100%;
    justify-content: center;
    z-index: 2;
    white-space: nowrap;
}

.flash-bar-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.flash-bar-timer {
    font-size: 0.95rem;
    font-weight: 700;
    color: #eee;
    min-width: 55px;
    display: inline-block;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.flash-header-bar #flash-progress-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.15;
    z-index: 1;
    overflow: hidden;
    border-radius: 50px;
}

.flash-header-bar .progress-track,
.flash-header-bar .progress-fill {
    height: 100%;
    margin: 0;
    border-radius: 50px;
}

/* =============================================================================
   BRAND & LOGO
   ============================================================================= */

.brand-wrapper {
    gap: 10px;
    flex-shrink: 0;
    max-width: 100%;
}

.header-logo {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.scrolling-title {
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent) 0%, #ffe0b2 25%, var(--accent) 50%, #ffe0b2 75%, var(--accent) 100%);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineScroll 4s linear infinite;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================================================
   WIKI SEARCH
   ============================================================================= */

.wiki-search-container {
    display: flex;
    align-items: center;
    background: #222;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 2px 10px;
    max-width: 220px;
    width: 100%;
    transition: 0.2s;
}

.wiki-search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
}

#wiki-search-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px;
    font-size: 0.9rem;
    flex: 1;
    outline: none;
    min-width: 0;
}

.search-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-shrink: 0;
}

.search-btn:hover {
    color: var(--accent);
}

/* =============================================================================
   HEADER CLOCK
   ============================================================================= */

.header-clock-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
    width: 120px;
    flex-shrink: 0;
}

.header-time-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
}

.header-time-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: #eee;
    font-variant-numeric: tabular-nums;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: -0.5px;
    text-align: right;
    width: 100%;
}

.header-time-sub {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.header-time-sub.game-date {
    color: #00ffff;
}

.header-divider {
    width: 1px;
    height: 30px;
    background: #333;
}

.header-select {
    background: transparent;
    border: none;
    color: var(--blue);
    font-size: 0.75rem;
    text-align: right;
    padding: 0;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.header-select option {
    background: #222;
    color: #fff;
}

/* =============================================================================
   USER COUNT BADGE
   ============================================================================= */

.user-count-badge {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #aaa;
    font-weight: 600;
    height: 28px;
    transition: 0.2s;
    white-space: nowrap;
}

.user-count-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #666;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
}

/* =============================================================================
   KO-FI DONATION BUTTON
   ============================================================================= */

.kofi-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff5e5b 0%, #ff7878 100%);
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 94, 91, 0.3);
    white-space: nowrap;
}

.kofi-btn:hover {
    background: linear-gradient(135deg, #ff7878 0%, #ff9999 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 94, 91, 0.5);
    color: #fff;
}

.kofi-btn:active {
    transform: translateY(0);
}

.kofi-icon {
    flex-shrink: 0;
}

.kofi-text {
    line-height: 1;
}

.online-text {
    font-feature-settings: "tnum";
}

/* =============================================================================
   CLAN BANNER
   ============================================================================= */

@keyframes banner-wave {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-3px) rotate(1deg);
    }

    75% {
        transform: translateY(3px) rotate(-1deg);
    }
}

@keyframes banner-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes banner-glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.3), 0 0 20px rgba(255, 152, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.6), 0 0 40px rgba(255, 152, 0, 0.3);
    }
}

@keyframes banner-ribbon-wave {

    0%,
    100% {
        transform: translateX(0) scaleY(1);
    }

    50% {
        transform: translateX(-2px) scaleY(1.05);
    }
}

.clan-banner {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.3) 0%, rgba(187, 134, 252, 0.2) 50%, rgba(79, 195, 247, 0.3) 100%);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 8px 16px 8px 12px;
    min-width: 200px;
    max-width: 300px;
    width: auto;
    height: 70px;
    overflow: visible;
    animation: banner-wave 4s ease-in-out infinite, banner-glow-pulse 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.6), 0 0 30px rgba(255, 152, 0, 0.3);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
}

.clan-banner:hover {
    transform: scale(1.05);
}

.clan-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 100%);
    background-size: 200% 100%;
    animation: banner-shimmer 3s linear infinite;
    pointer-events: none;
}

.clan-banner-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    z-index: 1;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.clan-banner-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: float 3s ease-in-out infinite;
    z-index: 1;
    line-height: 1;
    display: none;
}

/* Show icon only if no image is present */
.clan-banner:not(:has(.clan-banner-image)) .clan-banner-icon {
    display: block;
}

.clan-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    z-index: 1;
    min-width: 0;
}

.clan-banner-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 152, 0, 0.5);
    line-height: 1;
}

.clan-banner-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 152, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.clan-banner-ribbon {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 80%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%);
    opacity: 0.6;
    animation: banner-ribbon-wave 2s ease-in-out infinite;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   ONLINE USERS PANEL
   ============================================================================= */

.online-users-panel {
    width: 95%;
    max-width: 600px;
    min-height: 300px;
    max-height: 85vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: modal-slide-in 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.online-users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #222;
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.08) 0%, transparent 100%);
}

.online-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.online-pulse-ring {
    width: 12px;
    height: 12px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green), 0 0 20px rgba(76, 175, 80, 0.4);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.online-header-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.online-count-badge {
    background: linear-gradient(135deg, var(--green), #2e7d32);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.online-users-subtitle {
    padding: 8px 24px 16px;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Online users search input */
.online-search-wrapper {
    padding: 0 16px 12px;
}

.online-search-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.online-search-input::placeholder {
    color: #555;
}

.online-search-input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.1);
}

/* Online list categories */
.online-list-category {
    margin-bottom: 4px;
}

.online-list-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.online-list-category-header .category-icon {
    font-size: 0.85rem;
}

.online-list-category-header .category-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
}

.online-list-category-users {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-users-list {
    padding: 0 16px 16px;
    min-height: 150px;
    max-height: 60vh;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-users-list::-webkit-scrollbar {
    width: 6px;
}

.online-users-list::-webkit-scrollbar-track {
    background: #111;
    border-radius: 3px;
}

.online-users-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.online-users-list::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.online-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1f1f1f 0%, #171717 100%);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.2s ease;
}

.online-user-card:hover {
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
    border-color: #3a3a3a;
    transform: translateX(4px);
}

.online-user-card.is-me {
    border-color: rgba(255, 152, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08) 0%, #171717 100%);
}

.online-user-card.is-me:hover {
    border-color: rgba(255, 152, 0, 0.5);
}

.user-card-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.online-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #333;
    object-fit: cover;
    background: #111;
}

.user-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #171717;
}

.user-status-dot.status-active {
    background: #4caf50 !important;
}

.user-status-dot.status-active.currently-active {
    background: #00ff00 !important;
    box-shadow: 0 0 6px #00ff00 !important;
}

.user-status-dot.status-away {
    background: #ff9800 !important;
}

.user-status-dot.status-idle {
    background: #f44336 !important;
}

@keyframes pulse-currently-active {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.user-card-info {
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.user-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    padding-right: 10px;
}

.user-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-session-time {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.user-status-badge.status-active {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.user-status-badge.status-active.currently-active {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    animation: pulse-badge 1s infinite;
}

.user-status-badge.status-away {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.user-status-badge.status-idle {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.user-card-badge {
    flex-shrink: 0;
}

.you-badge {
    background: linear-gradient(135deg, var(--accent), #f57c00);
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

.online-users-footer {
    padding: 14px 24px;
    background: #111;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.online-footer-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
}

.online-view-all-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent, #ff9800);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 152, 0, 0.25);
    margin-left: auto;
    margin-right: 12px;
    transition: all 0.2s ease;
}
.online-view-all-btn:hover {
    background: rgba(255, 152, 0, 0.12);
    border-color: var(--accent, #ff9800);
}

.footer-stat-icon {
    font-size: 1rem;
}

.online-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-text {
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 4px;
}

.empty-subtext {
    font-size: 0.8rem;
    color: #444;
}

/* Legacy support */
.user-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.online-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
    transition: 0.2s;
}

.online-user-row:hover {
    background: #222;
    border-color: #444;
}

.online-user-name {
    font-size: 0.9rem;
    color: #ddd;
    font-weight: 600;
}

.online-user-you {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(255, 152, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.online-dot-small {
    width: 6px;
    height: 6px;
    background-color: var(--green);
    border-radius: 50%;
    opacity: 0.7;
}

/* =============================================================================
   PROFILE STUDIO TABS
   ============================================================================= */

.studio-tabs {
    display: flex;
    background: #0a0a0a;
    border-bottom: 1px solid #333;
    margin-bottom: 10px;
}

.studio-tab-btn {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    color: var(--text-sub);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
}

.studio-tab-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

.studio-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(255, 152, 0, 0.1);
}

.studio-tab-content {
    display: none;
}

.studio-tab-content.active {
    display: block;
}

/* =============================================================================
   DASHBOARD CARDS
   ============================================================================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 380px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: 0.3s;
}

@media (max-width: 1440px) or (max-height: 900px) {
    .card {
        min-height: 340px;
        padding: 15px;
    }

    .card-main-text {
        font-size: 2rem;
        margin: 8px 0;
    }

    .card-sub-text {
        font-size: 1.2rem;
    }

    .dashboard {
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 1100px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 750px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent);
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

.card-title {
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(110deg, #888 15%, #fff 45%, #ffda44 50%, #fff 55%, #888 85%);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineScroll 5s linear infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.1));
    text-align: center;
}

.card-main-text {
    font-size: 2.2rem;
    font-weight: 500;
    color: #fff;
    margin: 10px 0;
    text-align: center;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.card-sub-text {
    color: var(--blue);
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 6px;
    text-align: center;
    width: 100%;
}

.event-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.2s;
}

.event-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.status-active {
    color: var(--green);
    font-weight: bold;
    animation: pulse-green 2s infinite;
}

.upcoming-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #222;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.upcoming-row span {
    color: #ddd;
    font-weight: 600;
    display: block;
    margin-top: 3px;
    font-size: 0.9rem;
}

.flash-upcoming-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.flash-upcoming-pill a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.flash-upcoming-pill a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

#flash-info-pill {
    display: flex;
    justify-content: center;
    width: 100%;
}

.flash-header-bar .pill-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}

.flash-header-bar .flash-upcoming-pill {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.flash-header-bar .pill-label {
    display: none;
}

/* =============================================================================
   PROGRESS BARS
   ============================================================================= */

.progress-track {
    width: 100%;
    height: 4px;
    background: var(--bar-bg);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    transition: width 1s linear, background 0.5s;
    border-radius: 2px;
}

.p-bar-normal {
    background: var(--blue);
    box-shadow: 0 0 5px rgba(79, 195, 247, 0.4);
}

.p-bar-active {
    background: var(--green);
    box-shadow: 0 0 5px var(--green);
}

.p-bar-warning {
    background: var(--urgent-red);
    box-shadow: 0 0 5px var(--urgent-red);
}

.timer-urgent {
    color: var(--urgent-red) !important;
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.6);
}

/* =============================================================================
   SPECIAL BOX & FEATURED CONTENT
   ============================================================================= */

.special-box {
    background: var(--red-box-bg);
    border: 1px solid var(--red-box-border);
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.special-box:hover {
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.1);
}

.special-label {
    color: #ff6b6b;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.special-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.special-name {
    color: #ffe066;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

#flash-featured-content {
    animation: popIn 0.4s;
    padding-top: 10px;
}

.feat-img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
    min-height: 100px;
}

.feat-info {
    text-align: center;
    margin-bottom: 15px;
}

.feat-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f33;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
}

.feat-timer {
    font-size: 2.2rem;
    font-weight: 500;
    color: #fff;
    font-feature-settings: "tnum";
}

.feat-footer {
    width: 100%;
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 10px;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: baseline;
}

/* =============================================================================
   ROTATION DISPLAY
   ============================================================================= */

.rot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid #222;
}

@media (max-width: 1440px) or (max-height: 900px) {
    .rot-row {
        padding: 5px 0;
    }
}

.rot-row:last-child {
    border-bottom: none;
}

.rot-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.rot-val {
    font-size: 0.95rem;
    color: #eee;
    font-weight: 600;
    text-align: right;
}

.rot-val.highlight {
    color: var(--purple);
}

/* =============================================================================
   MERCHANT DISPLAY
   ============================================================================= */

.merchant-display-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.merchant-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.merchant-item-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 105px;
    /* Compact height */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.merchant-item-box:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.merch-img-wrap {
    width: 38px;
    height: 38px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: 50%;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.merchant-item-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.merch-item-link {
    font-size: 0.68rem;
    font-weight: 700;
    color: #eee;
    text-decoration: none;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.merch-item-link.high-value {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.merch-price {
    font-size: 0.62rem;
    color: var(--blue);
    font-weight: 700;
    opacity: 0.8;
}

.merchant-meta {
    font-size: 0.65rem;
    color: #666;
    margin-top: 8px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =============================================================================
   DANGER DROPDOWN & DELETE ACCOUNT MODAL
   ============================================================================= */

.dropdown-item.danger {
    color: #ff6b6b;
}

.dropdown-item.danger:hover {
    background: rgba(255, 100, 100, 0.1);
    color: #ff5555;
}

.dropdown-item.danger svg {
    color: #ff6b6b;
}

.dropdown-item.danger:hover svg {
    color: #ff5555;
}

/* === CLAIMED PROFILE AVATAR BUTTON === */
.claimed-profile-row {
    position: relative;
}

.claimed-avatar-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.claimed-avatar-btn:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    color: #4caf50;
}

.claimed-avatar-btn.active {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.claimed-avatar-btn.active:hover {
    background: rgba(255, 100, 100, 0.15);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* === DELETE ACCOUNT MODAL === */
.delete-account-modal {
    max-width: 450px;
    width: 95%;
}

.delete-account-modal .modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 80, 80, 0.1) 0%, rgba(255, 50, 50, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 80, 80, 0.2);
}

.delete-account-modal .modal-header.danger svg {
    color: #ff6b6b;
}

.delete-account-modal .modal-header h2 {
    margin: 0;
    color: #ff6b6b;
    font-size: 1.3rem;
}

.delete-account-modal .modal-body {
    padding: 24px;
}

.delete-account-modal .warning-text {
    color: #ff6b6b;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.delete-account-modal .delete-consequences {
    margin: 12px 0 24px 0;
    padding-left: 20px;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.8;
}

.delete-account-modal .delete-consequences li {
    margin-bottom: 4px;
}

.delete-account-modal .delete-confirm-section {
    margin-top: 20px;
}

.delete-account-modal .delete-confirm-section label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.delete-account-modal .auth-input {
    width: 100%;
    padding: 12px 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
}

.delete-account-modal .auth-input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.delete-account-modal .auth-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
}

.delete-account-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: #0a0a0a;
    border-top: 1px solid #222;
}

.delete-account-modal .btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-account-modal .btn-secondary:hover {
    background: #2a2a2a;
    color: #fff;
}

.delete-account-modal .btn-danger {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.delete-account-modal .btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
}

.delete-account-modal .btn-danger:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.delete-account-modal .btn-danger .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =============================================================================
   KO-FI BUTTON (RESTORED)
   ============================================================================= */

.kofi-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff5e5b 0%, #ff7878 100%);
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 94, 91, 0.3);
    white-space: nowrap;
    height: auto;
    width: auto;
    justify-content: flex-start;
}

.kofi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 94, 91, 0.5);
}

.kofi-btn .kofi-text {
    display: inline;
}

/* =============================================================================
   HEADER NAVIGATION CENTERING
   ============================================================================= */

.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 100;
    /* Ensure on top */
    width: max-content;
}

@media (max-width: 900px) {
    .header-nav {
        position: static;
        transform: none;
        margin: 0 auto;
    }
}