/* Villain Animals — Kingdom 3518 | Premium 2026 Gaming Guild Hub */

/* ============================================
   CSS Variables — Premium Palette
   ============================================ */
:root {
    --bg0: #070A10;
    --bg1: #0B1220;
    --panel: rgba(16, 24, 40, 0.72);
    --panel2: rgba(12, 18, 32, 0.78);
    --stroke: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 255, 255, 0.90);
    --muted: rgba(255, 255, 255, 0.70);
    --gold: #D7B35A;
    --gold2: #F6D27A;
    --crimson: #E03A3A;
    --glow: rgba(215, 179, 90, 0.22);
    
    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}
/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg0);
    background-image: 
        linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%),
        radial-gradient(circle at 20% 50%, rgba(215, 179, 90, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(215, 179, 90, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text);
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--gold2);
}
/* ============================================
   Skip to Content (Accessibility)
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--panel);
    color: var(--gold);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    border: 1px solid var(--stroke);
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    flex: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
        width: 100%;
        max-width: 100%;
    }
}

/* Ensure no element exceeds viewport width */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }
    
    /* Allow tables to exceed for horizontal scroll */
    .table-responsive,
    .table-responsive table {
        max-width: none;
    }
}
/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: rgba(16, 24, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--stroke);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
}

.guild-crest {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.navbar-title {
    letter-spacing: -0.01em;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    justify-content: center;
    align-items: center;
    z-index: 10001;
    position: relative;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger to X animation */
.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

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

.navbar-menu-close {
    display: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
}

.navbar-menu a {
    color: var(--muted);
    font-size: 0.9375rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.navbar-menu a:hover {
    color: var(--text);
}

.navbar-menu a.active,
.navbar-menu a[href=""] {
    color: var(--gold);
}

.navbar-menu a.active::after,
.navbar-menu a[href=""]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-sm);
    right: var(--space-sm);
    height: 2px;
    background: var(--gold);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.9375rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: var(--text);
}

.nav-dropdown-toggle[aria-expanded="true"] {
    color: var(--gold);
}

.dropdown-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    min-width: 180px;
    background: var(--panel2);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: var(--space-xs);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
}

/* Ensure dropdown menu is clickable when visible */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
    pointer-events: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure user dropdown menu is properly positioned */
.user-dropdown .nav-dropdown-menu {
    top: calc(100% + var(--space-xs));
}

.nav-dropdown-menu a {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-dropdown-menu a:hover {
    background: rgba(215, 179, 90, 0.1);
    color: var(--text);
}

.nav-dropdown-menu a.active {
    background: rgba(215, 179, 90, 0.15);
    color: var(--gold);
}

/* User Dropdown */
.user-dropdown {
    margin-left: var(--space-sm);
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold);
}

.user-toggle[aria-expanded="true"] {
    background: rgba(215, 179, 90, 0.1);
    color: var(--gold);
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--stroke);
    transition: border-color 0.2s ease;
}

.user-toggle:hover .avatar-small {
    border-color: var(--gold);
}

.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    color: var(--bg0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--stroke);
    transition: border-color 0.2s ease;
}

.user-toggle:hover .avatar-placeholder {
    border-color: var(--gold);
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.user-menu-dropdown {
    right: 0;
    left: auto;
    min-width: 240px;
    max-width: 320px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: var(--space-md);
    background: var(--panel2);
    border: 1px solid var(--stroke);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(215, 179, 90, 0.1);
    pointer-events: auto;
}

.user-dropdown[data-open="true"] .user-menu-dropdown {
    pointer-events: auto;
}

.user-menu-dropdown::-webkit-scrollbar {
    width: 6px;
}

.user-menu-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.user-menu-dropdown::-webkit-scrollbar-thumb {
    background: var(--stroke);
    border-radius: 3px;
}

.user-menu-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* User Dropdown Header with Avatar */
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    margin: calc(var(--space-sm) * -1) calc(var(--space-md) * -1) var(--space-sm);
    background: rgba(215, 179, 90, 0.05);
    border-bottom: 1px solid var(--stroke);
    border-radius: 8px 8px 0 0;
}

.user-dropdown-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 2px var(--panel2), 0 4px 12px rgba(215, 179, 90, 0.3);
    flex-shrink: 0;
}

.user-dropdown-avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    color: var(--bg0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 2px var(--panel2), 0 4px 12px rgba(215, 179, 90, 0.3);
}

.user-dropdown-info {
    flex: 1;
    min-width: 0;
}

.user-dropdown-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-username {
    font-size: 0.8125rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: var(--stroke);
    margin: var(--space-sm) calc(var(--space-md) * -1);
}

/* Dropdown Items with Icons */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.875rem;
    padding: var(--space-sm);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    margin: 2px 0;
    white-space: nowrap;
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(215, 179, 90, 0.1);
    color: var(--text);
}

.dropdown-item:hover svg {
    opacity: 1;
}

.dropdown-item.active {
    background: rgba(215, 179, 90, 0.15);
    color: var(--gold);
    font-weight: 500;
}

.dropdown-item.active svg {
    opacity: 1;
    stroke: var(--gold);
}

.dropdown-logout {
    color: var(--muted);
}

.dropdown-logout:hover {
    background: rgba(224, 58, 58, 0.15);
    color: var(--crimson);
}

.dropdown-logout:hover svg {
    opacity: 1;
    stroke: var(--crimson);
}

/* Profile Page */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--stroke);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    flex-shrink: 0;
}

.profile-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid var(--gold);
}

.profile-info h2 {
    margin-bottom: var(--space-xs);
    font-size: 1.75rem;
}

.profile-username {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.profile-details {
    display: grid;
    gap: var(--space-xl);
}

.profile-section h3 {
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
    color: var(--text);
}

.profile-dl {
    display: grid;
    gap: var(--space-md);
}

.profile-dl dt {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-dl dd {
    color: var(--text);
    margin: 0;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--stroke);
}

.profile-dl dd:last-child {
    border-bottom: none;
}

.profile-dl code {
    background: var(--panel2);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--gold);
}

.profile-actions {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--stroke);
}

.badge-admin {
    background: rgba(224, 58, 58, 0.2);
    color: var(--crimson);
    border: 1px solid rgba(224, 58, 58, 0.3);
}

@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: var(--space-xs) 0 var(--space-xs) var(--space-lg);
        margin-top: var(--space-xs);
        display: none;
    }
    
    .nav-dropdown[data-open="true"] .nav-dropdown-menu {
        display: block;
    }
    
    .user-menu-dropdown {
        right: auto;
        left: 0;
        min-width: calc(100vw - 2rem);
        max-width: 320px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure dropdown items are touch-friendly on mobile */
    .dropdown-item {
        min-height: 44px;
        padding: var(--space-md);
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    }
    
    .user-dropdown-header {
        margin: calc(var(--space-sm) * -1) calc(var(--space-md) * -1) var(--space-sm);
    }
    
    .user-name {
        max-width: none;
    }
}
/* ============================================
   Hero Panel
   ============================================ */
.hero-panel {
    position: relative;
    padding: var(--space-2xl) 0;
    max-height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-panel {
        padding: var(--space-xl) 0;
        max-height: 70vh;
        min-height: auto;
    }
}

/* Hero Images Background */
.hero-images {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-image.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(7, 10, 16, 0.85) 0%, rgba(11, 18, 32, 0.75) 100%);
    z-index: 1;
}

.hero-panel .container {
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: var(--space-sm);
    line-height: 1.1;
}

.hero-content .hero-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
}

.gold-stars {
    color: #FFD700;
    font-size: 1.2em;
    margin-left: 0.25rem;
}
/* ============================================
   Panels (Base Component)
   ============================================ */
.panel {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.panel--raised {
    background: var(--panel2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.panel__header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--stroke);
}

.panel__header h2,
.panel__header h3 {
    margin-bottom: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gold);
}

.panel__body {
    /* Content area */
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 44px; /* Touch-friendly minimum */
    -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    touch-action: manipulation;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn--primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    color: var(--bg0);
    box-shadow: 0 2px 8px rgba(215, 179, 90, 0.3);
}

.btn--primary:hover {
    box-shadow: 0 4px 12px rgba(215, 179, 90, 0.4);
    transform: translateY(-1px);
}

.btn--secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn--secondary:hover {
    background: rgba(215, 179, 90, 0.1);
    border-color: var(--gold2);
    color: var(--gold2);
}

.btn--danger {
    background: var(--crimson);
    color: white;
}

.btn--danger:hover {
    background: #c92d2d;
}

.btn--small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

.btn-tiny {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-accent {
    background: rgba(215, 179, 90, 0.1);
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-accent:hover {
    background: rgba(215, 179, 90, 0.2);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: var(--space-md);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(215, 179, 90, 0.15);
}

.card__header {
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}

.card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.card__body {
    flex: 1;
    margin-bottom: var(--space-sm);
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--stroke);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card-link:hover {
    text-decoration: none;
}

.card-link .card__title {
    color: var(--gold);
    transition: color 0.2s ease;
}

.card-link:hover .card__title {
    color: var(--gold2);
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--gold);
    background: rgba(215, 179, 90, 0.1);
    color: var(--gold);
    white-space: nowrap;
}

.badge--accent {
    background: rgba(215, 179, 90, 0.2);
    border-color: var(--gold2);
    color: var(--gold2);
}

/* ============================================
   Meta Information
   ============================================ */
.meta {
    font-size: 0.8125rem;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.meta::before {
    content: '•';
    color: var(--stroke);
}

.meta:first-child::before {
    display: none;
}

.divider {
    height: 1px;
    background: var(--stroke);
    border: none;
    margin: var(--space-md) 0;
}
/* ============================================
   Kingdom Status Panel
   ============================================ */
.status-panel {
    background: var(--panel2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.status-panel__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--stroke);
}

.status-item {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--stroke);
}

.status-item:last-child {
    border-bottom: none;
}

.status-item__label {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.status-item__value {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
}

.status-item__link {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--gold);
}

.status-item__link:hover {
    color: var(--gold2);
}

/* ============================================
   Sections
   ============================================ */
.section {
    margin: var(--space-2xl) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    gap: var(--space-md);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0;
}

.section-action {
    font-size: 0.9375rem;
    color: var(--gold);
}

.section-action:hover {
    color: var(--gold2);
}

/* ============================================
   Two Column Layout
   ============================================ */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.two-column-2-1 {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .two-column-2-1 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   About Section
   ============================================ */
.about-panel {
    margin: var(--space-2xl) 0;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.9375rem;
    color: var(--text);
}
/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Mobile form improvements */
@media (max-width: 768px) {
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 48px;
        padding: var(--space-md);
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-group textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D7B35A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right var(--space-md) center;
        background-size: 12px;
        padding-right: calc(var(--space-md) + 20px);
    }
    
    /* Ensure labels are always visible */
    .form-group label {
        display: block;
        margin-bottom: var(--space-sm);
        font-size: 0.9375rem;
    }
    
    /* File inputs */
    input[type="file"] {
        min-height: 48px;
        padding: var(--space-sm);
        font-size: 16px;
    }
    
    /* Checkboxes and radio buttons - larger touch targets */
    input[type="checkbox"],
    input[type="radio"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        margin-right: var(--space-sm);
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    }
    
    /* Form actions stack on mobile */
    .form-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .form-actions .btn {
        width: 100%;
        min-height: 48px;
    }
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--muted);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 0 0 auto;
}
/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: var(--space-md);
    border-radius: 6px;
    margin: var(--space-md) 0;
    border-left: 3px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.alert-error {
    background: rgba(224, 58, 58, 0.1);
    border-color: var(--crimson);
    color: var(--crimson);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}
/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--stroke);
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gold);
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-links a {
    color: var(--muted);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copy {
    color: var(--muted);
    font-size: 0.875rem;
}
/* ============================================
   Mobile Navigation
   ============================================ */
@media (max-width: 768px) {
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .navbar-toggle {
        display: flex !important;
        min-width: 44px;
        min-height: 44px;
        padding: var(--space-sm);
        z-index: 10001;
        position: relative;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    }
    
    /* Hide desktop menu completely on mobile - use dedicated mobile menu instead */
    .navbar-menu {
        display: none !important;
    }
    
    /* Ensure navbar container doesn't constrain anything */
    .navbar .container {
        position: relative;
        z-index: 100;
    }
}

/* ============================================
   Touch-Friendly Buttons (Mobile)
   ============================================ */
@media (max-width: 768px) {
    /* Minimum tap target size: 44x44px (iOS/Android guidelines) */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    }
    
    .btn--small,
    .btn-small {
        min-height: 40px;
        padding: var(--space-sm) var(--space-md);
    }
    
    .btn-tiny {
        min-height: 36px;
        padding: var(--space-xs) var(--space-sm);
    }
    
    /* Better touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Links should also be touch-friendly */
    a:not(.btn) {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: var(--space-xs) var(--space-sm);
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.2);
    }
    
    /* Form buttons */
    button:not(.btn),
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        padding: var(--space-sm) var(--space-md);
        -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    }
}

/* ============================================
   Mobile Forms
   ============================================ */
@media (max-width: 768px) {
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: var(--space-md);
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 120px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* File inputs */
    input[type="file"] {
        min-height: 48px;
        padding: var(--space-sm);
    }
    
    /* Checkboxes and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        margin-right: var(--space-sm);
    }
}

/* ============================================
   Mobile Gallery Optimization
   ============================================ */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-md);
    }
    
    .gallery-item-image {
        height: 180px;
    }
    
    /* Lightbox mobile improvements */
    .gallery-lightbox-content {
        width: 100%;
        height: 100%;
        max-width: 100vw;
        max-height: 100vh;
        padding: var(--space-md);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .gallery-lightbox-image {
        max-width: 100%;
        max-height: calc(100vh - 120px);
        object-fit: contain;
        margin: 0 auto;
    }
    
    .gallery-lightbox-close {
        position: fixed;
        top: var(--space-md);
        right: var(--space-md);
        width: 48px;
        height: 48px;
        font-size: 2rem;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10002;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    }
    
    .gallery-lightbox-open-tab {
        position: fixed;
        bottom: var(--space-xl);
        right: var(--space-md);
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10002;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    }
    
    .gallery-lightbox-info {
        padding: var(--space-md);
        text-align: center;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 8px;
        margin-top: var(--space-md);
    }
}

/* ============================================
   Mobile General Improvements
   ============================================ */
@media (max-width: 768px) {
    /* Better spacing on mobile */
    .container {
        padding: var(--space-md);
    }
    
    .card {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    /* Tables - make them scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: var(--space-md) 0;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Better text readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Cards grid - stack on mobile */
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    /* Page header */
    .page-header {
        padding: var(--space-md) 0;
        margin-bottom: var(--space-lg);
    }
    
    /* Alerts */
    .alert {
        padding: var(--space-md);
        font-size: 0.9375rem;
        margin-bottom: var(--space-md);
    }
    
    /* Chat widget mobile adjustments */
    .chat-widget {
        bottom: 20px;
        right: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 100px);
    }
    
    .chat-widget-header {
        padding: var(--space-md);
        min-height: 56px;
    }
    
    .chat-widget-toggle {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }
}

/* ============================================
   Small Mobile (320px - 480px)
   ============================================ */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .gallery-item-image {
        height: 150px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: var(--space-sm);
    }
    
    .card {
        padding: var(--space-sm);
    }
    
    /* Ensure cards always stack on very small screens */
    .cards {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Extra Small Mobile (< 360px)
   ============================================ */
@media (max-width: 360px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .container {
        padding: var(--space-xs);
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9375rem;
        min-height: 44px;
    }
    
    /* Smaller tables on very small screens */
    table {
        min-width: 500px;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: var(--space-xs) var(--space-sm);
    }
}

/* ============================================
   Medium Tablets (768px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: var(--space-md) var(--space-lg);
    }
    
    /* Tables can be slightly wider on tablets */
    .table-responsive {
        overflow-x: auto;
    }
    
    table {
        min-width: 700px;
    }
}

/* ============================================
   Fix Potential Overflow Issues
   ============================================ */
@media (max-width: 768px) {
    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    /* Ensure root elements don't overflow */
    html {
        overflow-x: hidden;
    }
    
    /* Ensure navbar doesn't clip the menu */
    .navbar {
        overflow: visible !important;
    }
    
    .navbar .container {
        overflow: visible !important;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Ensure long text doesn't cause overflow */
    p, li, td {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Code blocks should wrap */
    code, pre {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: pre-wrap;
    }
    
    /* Tables MUST be in a wrapper to scroll */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: var(--space-md) 0;
        position: relative;
    }
    
    /* Add scroll indicator on mobile for tables */
    .table-responsive::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gold);
        font-size: 1.5rem;
        opacity: 0.5;
        pointer-events: none;
        display: none;
    }
    
    /* Show scroll indicator when table can scroll */
    .table-responsive:not(:hover)::after {
        display: block;
    }
    
    table {
        min-width: 600px;
        width: 100%;
    }
    
    /* Ensure table cells don't break layout */
    table td,
    table th {
        white-space: nowrap;
        padding: var(--space-sm) var(--space-md);
    }
    
    /* Allow text wrapping in specific cells if needed */
    table td.wrap,
    table th.wrap {
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Dropdown menus should not overflow viewport */
    .dropdown-menu {
        max-width: calc(100vw - var(--space-lg) * 2);
        right: 0;
        left: auto;
    }
}
/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--muted);
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--muted);
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ============================================
   Text Wrapping & Overflow Prevention
   ============================================ */
.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.text-nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-wrap {
    font-family: monospace;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Prevent horizontal scroll */
.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.overflow-y-auto {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
/* ============================================
   Calendar Layout
   ============================================ */
.calendar-wrapper {
    margin: var(--space-xl) 0;
}

.calendar {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--panel2);
    border-bottom: 2px solid var(--stroke);
}

.calendar-day-header {
    padding: var(--space-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 1px solid var(--stroke);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 120px;
    border-right: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    padding: var(--space-xs);
    background: var(--panel);
    transition: background 0.2s ease;
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: rgba(215, 179, 90, 0.05);
}

.calendar-day-other {
    background: var(--bg1);
    opacity: 0.5;
}

.calendar-day-today {
    background: rgba(215, 179, 90, 0.1);
    border: 2px solid var(--gold);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: var(--space-xs);
    padding: 2px 4px;
    display: inline-block;
}

.calendar-day-today .calendar-day-number {
    background: var(--gold);
    color: var(--bg0);
    border-radius: 4px;
    padding: 2px 6px;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-xs);
}

.calendar-event {
    font-size: 0.75rem;
    padding: 2px 4px;
    background: rgba(215, 179, 90, 0.15);
    border-left: 2px solid var(--gold);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-event:hover {
    background: rgba(215, 179, 90, 0.25);
    transform: translateX(2px);
}

.calendar-event-time {
    font-weight: 600;
    color: var(--gold);
    flex-shrink: 0;
}

.calendar-event-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.calendar-event-badge {
    font-size: 0.65rem;
    padding: 1px 3px;
    background: rgba(215, 179, 90, 0.3);
    color: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
    font-weight: 600;
}

.calendar-event-more {
    font-size: 0.7rem;
    color: var(--muted);
    padding: 2px 4px;
    font-style: italic;
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 0.8125rem;
    }
    
    .calendar-event {
        font-size: 0.65rem;
        padding: 1px 2px;
    }
    
    .calendar-event-title {
        display: none;
    }
    
    .calendar-event-time {
        font-size: 0.6rem;
    }
}
/* ============================================
   Legacy Support (Keep for other pages)
   ============================================ */
.page-header {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--stroke);
    margin-bottom: var(--space-xl);
}

.table-responsive {
    overflow-x: auto;
    margin: var(--space-lg) 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Ensure all tables are responsive on mobile by default */
@media (max-width: 768px) {
    /* Auto-wrap tables that aren't in .table-responsive */
    table:not(.table-responsive table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Force table-responsive behavior on mobile */
    .table-responsive,
    table {
        min-width: 100%;
    }
    
    table {
        min-width: 600px; /* Minimum for readability */
    }
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: var(--panel2);
    border-bottom: 1px solid var(--stroke);
}

.table th {
    padding: var(--space-md);
    text-align: left;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9375rem;
}

.table td {
    padding: var(--space-md);
    border-top: 1px solid var(--stroke);
    font-size: 0.9375rem;
}

.table tr:hover {
    background: rgba(215, 179, 90, 0.05);
}
/* ============================================
   Discord Widget
   ============================================ */
.discord-card {
    max-width: 350px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
}

/* Mobile-friendly */
@media (max-width: 420px) {
    .discord-card {
        max-width: 100%;
    }
    
    .discord-card iframe {
        width: 100%;
    }
}
/* ============================================
   Gallery Grid
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.gallery-item {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-item-link {
    display: block;
    width: 100%;
    overflow: hidden;
}

.gallery-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-actions {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}

.gallery-item-info {
    padding: var(--space-md);
}

.gallery-item-info strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text);
}

/* ============================================
   Gallery Lightbox
   ============================================ */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-lightbox-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--panel2);
    border: 2px solid var(--stroke);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10002;
}

.gallery-lightbox-close:hover {
    background: var(--crimson);
    border-color: var(--crimson);
    color: white;
    transform: scale(1.1);
}

.gallery-lightbox-open-tab {
    position: absolute;
    top: -50px;
    right: 50px;
    background: var(--panel2);
    border: 2px solid var(--stroke);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10002;
    text-decoration: none;
}

.gallery-lightbox-open-tab:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg0);
    transform: scale(1.1);
}

.gallery-lightbox-open-tab svg {
    width: 18px;
    height: 18px;
}

.gallery-lightbox-info {
    text-align: center;
    max-width: 600px;
    padding: var(--space-md);
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--stroke);
}

.gallery-lightbox-info h3 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text);
    font-size: 1.125rem;
}

.gallery-lightbox-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-md);
    }
    
    .gallery-item-image {
        height: 200px;
    }
    
    .gallery-lightbox-close,
    .gallery-lightbox-open-tab {
        top: 10px;
    }
    
    .gallery-lightbox-close {
        right: 10px;
    }
    
    .gallery-lightbox-open-tab {
        right: 60px;
    }
    
    .gallery-lightbox-image {
        max-height: 70vh;
    }
}
/* ============================================
   Kingdom Feed Styles
   ============================================ */

/* Poll Styles */
.feed-post-type-btn {
    transition: all 0.2s;
}

.feed-post-type-btn:hover {
    color: var(--text) !important;
}

.feed-post-type-content {
    transition: opacity 0.2s;
}

.feed-poll {
    background: var(--panel2);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.poll-question {
    margin: 0 0 var(--space-md) 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.poll-option {
    transition: all 0.2s;
    position: relative;
}

.poll-option:hover:not(.poll-option-disabled) {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.poll-option-disabled {
    cursor: default !important;
    opacity: 0.8;
}

.poll-option-bar {
    height: 8px;
    background: var(--bg1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.poll-option-bar-fill {
    height: 100%;
    background: var(--gold);
    transition: width 0.3s ease;
}

.poll-option-selected {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.feed-filters {
    margin-bottom: var(--space-xl);
}

.feed-filter-btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    text-decoration: none;
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--stroke);
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.feed-filter-btn:hover {
    background: var(--panel);
    border-color: var(--gold);
    color: var(--gold);
}

.feed-filter-btn.active {
    background: var(--gold);
    color: var(--bg0);
    border-color: var(--gold);
}

.feed-composer {
    margin-bottom: var(--space-xl);
}

.feed-post-card {
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.feed-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.feed-post-card[data-pinned="true"] {
    border-left: 4px solid var(--gold);
}

.feed-post-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: var(--space-md);
}

.feed-post-image {
    margin-bottom: var(--space-md);
}

.feed-post-image img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    cursor: pointer;
    transition: transform 0.2s;
}

.feed-post-image img:hover {
    transform: scale(1.02);
}

.feed-post-youtube {
    margin-bottom: var(--space-md);
}

.youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: var(--panel2);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.feed-reactions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    margin-bottom: var(--space-md);
}

.reaction-buttons {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.reaction-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--panel2);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.2s;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.reaction-btn:hover {
    background: var(--panel);
    border-color: var(--gold);
    transform: scale(1.1);
}

.reaction-btn.active {
    background: var(--gold);
    color: var(--bg0);
    border-color: var(--gold);
}

.feed-comments {
    margin-top: var(--space-md);
}

.comment-item {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--stroke);
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-form {
    margin-top: var(--space-md);
}

.feed-pagination {
    margin-top: var(--space-xl);
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.feed-post-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feed-filters {
        gap: var(--space-xs);
    }
    
    .feed-filter-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }
    
    .feed-post-card {
        padding: var(--space-md);
    }
    
    .reaction-buttons {
        gap: 4px;
    }
    
    .reaction-btn {
        padding: 4px 8px;
        font-size: 1rem;
    }
    
    .feed-reactions {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

/* ============================================
   Friends System Styles
   ============================================ */

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.friend-card {
    padding: var(--space-md);
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--stroke);
    transition: transform 0.2s, box-shadow 0.2s;
}

.friend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.friend-request-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--stroke);
    transition: background 0.2s;
}

.friend-request-item:hover {
    background: var(--panel);
}

@media (max-width: 768px) {
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .friend-request-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .friend-request-item > div:last-child {
        width: 100%;
        display: flex;
        gap: var(--space-sm);
    }
    
    .friend-request-item button {
        flex: 1;
    }
}
/* Messaging System Styles */

/* ============================================
   Floating Chat Widget (Facebook-style)
   ============================================ */

.chat-widget-container {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10000;
    font-family: inherit;
}

/* Chat Toggle Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.chat-toggle-btn svg {
    width: 28px;
    height: 28px;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent2);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid var(--bg);
}

/* Chat List Panel */
.chat-list-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 10002;
    overflow: hidden;
}

.chat-list-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel2);
}

.chat-list-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text);
}

.chat-list-content {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.chat-list-item:hover {
    background: var(--panel2);
}

.chat-list-avatar {
    position: relative;
    flex-shrink: 0;
}

.chat-list-avatar img,
.chat-list-avatar .avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-list-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel2);
    border: 1px solid var(--border);
    font-weight: bold;
    color: var(--accent);
    font-size: 1.125rem;
}

.chat-list-info {
    flex: 1;
    min-width: 0;
}

.chat-list-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.chat-list-preview {
    font-size: 0.875rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-empty-state {
    padding: var(--space-xl);
    text-align: center;
    color: var(--muted);
}

/* Chat Windows Container */
.chat-windows-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: var(--space-sm);
    z-index: 10000;
    pointer-events: none;
}

.chat-windows-container > * {
    pointer-events: all;
}

/* Individual Chat Window */
.chat-window {
    width: 350px;
    height: 500px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.chat-window.minimized {
    height: 50px;
}

.chat-window-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    background: var(--panel2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.chat-window-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
}

.chat-window-avatar {
    flex-shrink: 0;
}

.chat-window-avatar img,
.chat-window-avatar .avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-window-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--accent);
}

.chat-window-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-window-actions {
    display: flex;
    gap: var(--space-xs);
}

.chat-minimize-btn,
.chat-close-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-minimize-btn:hover,
.chat-close-btn:hover {
    background: var(--panel);
}

.chat-window-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    background: var(--bg);
}

.chat-window-messages .message {
    margin-bottom: var(--space-xs);
}

.chat-window-messages .message-content {
    max-width: 80%;
}

.chat-window-messages .message-bubble {
    font-size: 0.875rem;
    padding: 8px 12px;
}

.chat-window-messages .message-image img {
    max-width: 200px;
    max-height: 200px;
}

.chat-window-messages .message-video video {
    max-width: 250px;
    max-height: 250px;
}

.chat-window-messages .message-voice audio {
    max-width: 200px;
}

.chat-loading,
.chat-error {
    text-align: center;
    padding: var(--space-lg);
    color: var(--muted);
}

.chat-window-input {
    border-top: 1px solid var(--border);
    padding: var(--space-sm);
    background: var(--panel2);
}

.chat-message-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.chat-input-toolbar {
    display: flex;
    gap: var(--space-xs);
}

.chat-input-text {
    flex: 1;
    min-height: 36px;
    max-height: 100px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    line-height: 1.5;
}

.chat-input-text:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-send-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: var(--accent2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-list-panel {
        width: calc(100vw - 40px);
        max-width: 350px;
        bottom: 80px;
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: calc(100vh - 100px);
        max-height: 500px;
    }
    
    .chat-windows-container {
        right: 10px;
        bottom: 80px;
    }
    
    .chat-toggle-btn {
        bottom: 15px;
        right: 15px;
        width: 56px;
        height: 56px;
    }
}

/* ============================================
   Main Messages Page Styles
   ============================================ */

.messages-layout {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
}

/* Conversations Sidebar */
.conversations-sidebar {
    width: 350px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--panel2);
}

.conversations-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
}

.conversations-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--panel);
}

.conversation-item.active {
    background: var(--panel);
    border-left: 3px solid var(--accent);
}

.conversation-avatar {
    position: relative;
    flex-shrink: 0;
}

.conversation-avatar img,
.conversation-avatar .avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    font-weight: bold;
    color: var(--accent);
}

.unread-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent2);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: 0.875rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.empty-state {
    padding: var(--space-xl);
    text-align: center;
    color: var(--muted);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--panel);
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: var(--muted);
}

.placeholder-content h3 {
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.chat-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    background: var(--panel2);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.chat-avatar {
    flex-shrink: 0;
}

.chat-avatar img,
.chat-avatar .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    font-weight: bold;
    color: var(--accent);
}

.chat-user-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.chat-status {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.message {
    display: flex;
    margin-bottom: var(--space-sm);
}

.message-sent {
    justify-content: flex-end;
}

.message-received {
    justify-content: flex-start;
}

.message-content {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    max-width: 70%;
}

.message-avatar {
    flex-shrink: 0;
}

.message-avatar img,
.message-avatar .avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.message-avatar .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--accent);
}

.message-bubble {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
    position: relative;
}

.message-sent .message-bubble {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.message-text {
    word-wrap: break-word;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.read-indicator,
.sent-indicator {
    font-size: 0.875rem;
}

.read-indicator {
    color: #4fc3f7;
}

/* Message Attachments */
.message-image img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: var(--space-xs);
}

.message-voice {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.message-voice audio {
    max-width: 250px;
}

.voice-duration {
    font-size: 0.875rem;
    color: var(--muted);
}

.message-video video {
    max-width: 400px;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: var(--space-xs);
}

/* Chat Input */
.chat-input-area {
    border-top: 1px solid var(--border);
    padding: var(--space-md);
    background: var(--panel2);
}

.chat-input-toolbar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--panel);
    border-color: var(--accent);
}

.chat-input-wrapper {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    line-height: 1.5;
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.file-preview {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.btn-remove {
    background: var(--accent2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #bbb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .messages-layout {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }
    
    .conversations-sidebar {
        width: 100%;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .message-image img {
        max-width: 200px;
        max-height: 200px;
    }
    
    .message-video video {
        max-width: 250px;
        max-height: 250px;
    }
}
/* ============================================
   Avatar Frames - CSS Neon Glow Effects
   ============================================ */

/* Base avatar frame container */
.avatar-with-frame {
    position: relative;
    display: inline-block;
}

.avatar-image {
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* CSS Frame Overlay (for CSS-based frames) */
.avatar-frame-css {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   Electric Neon Glow Frames
   ============================================ */

/* Blue Electric Neon */
.avatar-frame-neon-blue {
    box-shadow: 
        0 0 10px rgba(0, 150, 255, 0.8),
        0 0 20px rgba(0, 150, 255, 0.6),
        0 0 30px rgba(0, 150, 255, 0.4),
        0 0 40px rgba(0, 150, 255, 0.2),
        inset 0 0 20px rgba(0, 150, 255, 0.3);
    border: 2px solid rgba(0, 200, 255, 0.9);
    animation: neonPulseBlue 2s ease-in-out infinite alternate;
}

@keyframes neonPulseBlue {
    0% {
        box-shadow: 
            0 0 10px rgba(0, 150, 255, 0.8),
            0 0 20px rgba(0, 150, 255, 0.6),
            0 0 30px rgba(0, 150, 255, 0.4),
            0 0 40px rgba(0, 150, 255, 0.2),
            inset 0 0 20px rgba(0, 150, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(0, 200, 255, 1),
            0 0 30px rgba(0, 200, 255, 0.8),
            0 0 45px rgba(0, 200, 255, 0.6),
            0 0 60px rgba(0, 200, 255, 0.4),
            inset 0 0 30px rgba(0, 200, 255, 0.5);
    }
}

/* Pink Electric Neon */
.avatar-frame-neon-pink {
    box-shadow: 
        0 0 10px rgba(255, 20, 147, 0.8),
        0 0 20px rgba(255, 20, 147, 0.6),
        0 0 30px rgba(255, 20, 147, 0.4),
        0 0 40px rgba(255, 20, 147, 0.2),
        inset 0 0 20px rgba(255, 105, 180, 0.3);
    border: 2px solid rgba(255, 105, 180, 0.9);
    animation: neonPulsePink 2s ease-in-out infinite alternate;
}

@keyframes neonPulsePink {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 20, 147, 0.8),
            0 0 20px rgba(255, 20, 147, 0.6),
            0 0 30px rgba(255, 20, 147, 0.4),
            0 0 40px rgba(255, 20, 147, 0.2),
            inset 0 0 20px rgba(255, 105, 180, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 105, 180, 1),
            0 0 30px rgba(255, 105, 180, 0.8),
            0 0 45px rgba(255, 105, 180, 0.6),
            0 0 60px rgba(255, 105, 180, 0.4),
            inset 0 0 30px rgba(255, 105, 180, 0.5);
    }
}

/* Green Electric Neon */
.avatar-frame-neon-green {
    box-shadow: 
        0 0 10px rgba(0, 255, 127, 0.8),
        0 0 20px rgba(0, 255, 127, 0.6),
        0 0 30px rgba(0, 255, 127, 0.4),
        0 0 40px rgba(0, 255, 127, 0.2),
        inset 0 0 20px rgba(50, 205, 50, 0.3);
    border: 2px solid rgba(0, 255, 127, 0.9);
    animation: neonPulseGreen 2s ease-in-out infinite alternate;
}

@keyframes neonPulseGreen {
    0% {
        box-shadow: 
            0 0 10px rgba(0, 255, 127, 0.8),
            0 0 20px rgba(0, 255, 127, 0.6),
            0 0 30px rgba(0, 255, 127, 0.4),
            0 0 40px rgba(0, 255, 127, 0.2),
            inset 0 0 20px rgba(50, 205, 50, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(50, 205, 50, 1),
            0 0 30px rgba(50, 205, 50, 0.8),
            0 0 45px rgba(50, 205, 50, 0.6),
            0 0 60px rgba(50, 205, 50, 0.4),
            inset 0 0 30px rgba(50, 205, 50, 0.5);
    }
}

/* Purple Electric Neon */
.avatar-frame-neon-purple {
    box-shadow: 
        0 0 10px rgba(138, 43, 226, 0.8),
        0 0 20px rgba(138, 43, 226, 0.6),
        0 0 30px rgba(138, 43, 226, 0.4),
        0 0 40px rgba(138, 43, 226, 0.2),
        inset 0 0 20px rgba(186, 85, 211, 0.3);
    border: 2px solid rgba(186, 85, 211, 0.9);
    animation: neonPulsePurple 2s ease-in-out infinite alternate;
}

@keyframes neonPulsePurple {
    0% {
        box-shadow: 
            0 0 10px rgba(138, 43, 226, 0.8),
            0 0 20px rgba(138, 43, 226, 0.6),
            0 0 30px rgba(138, 43, 226, 0.4),
            0 0 40px rgba(138, 43, 226, 0.2),
            inset 0 0 20px rgba(186, 85, 211, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(186, 85, 211, 1),
            0 0 30px rgba(186, 85, 211, 0.8),
            0 0 45px rgba(186, 85, 211, 0.6),
            0 0 60px rgba(186, 85, 211, 0.4),
            inset 0 0 30px rgba(186, 85, 211, 0.5);
    }
}

/* Orange Electric Neon */
.avatar-frame-neon-orange {
    box-shadow: 
        0 0 10px rgba(255, 140, 0, 0.8),
        0 0 20px rgba(255, 140, 0, 0.6),
        0 0 30px rgba(255, 140, 0, 0.4),
        0 0 40px rgba(255, 140, 0, 0.2),
        inset 0 0 20px rgba(255, 165, 0, 0.3);
    border: 2px solid rgba(255, 165, 0, 0.9);
    animation: neonPulseOrange 2s ease-in-out infinite alternate;
}

@keyframes neonPulseOrange {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 140, 0, 0.8),
            0 0 20px rgba(255, 140, 0, 0.6),
            0 0 30px rgba(255, 140, 0, 0.4),
            0 0 40px rgba(255, 140, 0, 0.2),
            inset 0 0 20px rgba(255, 165, 0, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 165, 0, 1),
            0 0 30px rgba(255, 165, 0, 0.8),
            0 0 45px rgba(255, 165, 0, 0.6),
            0 0 60px rgba(255, 165, 0, 0.4),
            inset 0 0 30px rgba(255, 165, 0, 0.5);
    }
}

/* Cyan Electric Neon */
.avatar-frame-neon-cyan {
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(64, 224, 208, 0.3);
    border: 2px solid rgba(0, 255, 255, 0.9);
    animation: neonPulseCyan 2s ease-in-out infinite alternate;
}

@keyframes neonPulseCyan {
    0% {
        box-shadow: 
            0 0 10px rgba(0, 255, 255, 0.8),
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 30px rgba(0, 255, 255, 0.4),
            0 0 40px rgba(0, 255, 255, 0.2),
            inset 0 0 20px rgba(64, 224, 208, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(64, 224, 208, 1),
            0 0 30px rgba(64, 224, 208, 0.8),
            0 0 45px rgba(64, 224, 208, 0.6),
            0 0 60px rgba(64, 224, 208, 0.4),
            inset 0 0 30px rgba(64, 224, 208, 0.5);
    }
}

/* Red Electric Neon */
.avatar-frame-neon-red {
    box-shadow: 
        0 0 10px rgba(255, 0, 0, 0.8),
        0 0 20px rgba(255, 0, 0, 0.6),
        0 0 30px rgba(255, 0, 0, 0.4),
        0 0 40px rgba(255, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 69, 0, 0.3);
    border: 2px solid rgba(255, 69, 0, 0.9);
    animation: neonPulseRed 2s ease-in-out infinite alternate;
}

@keyframes neonPulseRed {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 0, 0, 0.8),
            0 0 20px rgba(255, 0, 0, 0.6),
            0 0 30px rgba(255, 0, 0, 0.4),
            0 0 40px rgba(255, 0, 0, 0.2),
            inset 0 0 20px rgba(255, 69, 0, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 69, 0, 1),
            0 0 30px rgba(255, 69, 0, 0.8),
            0 0 45px rgba(255, 69, 0, 0.6),
            0 0 60px rgba(255, 69, 0, 0.4),
            inset 0 0 30px rgba(255, 69, 0, 0.5);
    }
}

/* Gold Electric Neon (Premium) */
.avatar-frame-neon-gold {
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2),
        inset 0 0 20px rgba(255, 223, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.9);
    animation: neonPulseGold 2s ease-in-out infinite alternate;
}

@keyframes neonPulseGold {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 215, 0, 0.8),
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 30px rgba(255, 215, 0, 0.4),
            0 0 40px rgba(255, 215, 0, 0.2),
            inset 0 0 20px rgba(255, 223, 0, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 223, 0, 1),
            0 0 30px rgba(255, 223, 0, 0.8),
            0 0 45px rgba(255, 223, 0, 0.6),
            0 0 60px rgba(255, 223, 0, 0.4),
            inset 0 0 30px rgba(255, 223, 0, 0.5);
    }
}

/* White Electric Neon */
.avatar-frame-neon-white {
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.9);
    animation: neonPulseWhite 2s ease-in-out infinite alternate;
}

@keyframes neonPulseWhite {
    0% {
        box-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 45px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(255, 255, 255, 0.4),
            inset 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

/* Rainbow Electric Neon (Special) */
.avatar-frame-neon-rainbow {
    border: 2px solid transparent;
    background: linear-gradient(45deg, 
        rgba(255, 0, 0, 0.8),
        rgba(255, 127, 0, 0.8),
        rgba(255, 255, 0, 0.8),
        rgba(0, 255, 0, 0.8),
        rgba(0, 0, 255, 0.8),
        rgba(75, 0, 130, 0.8),
        rgba(148, 0, 211, 0.8)
    );
    background-size: 400% 400%;
    animation: neonPulseRainbow 3s ease-in-out infinite, rainbowShift 4s linear infinite;
    box-shadow: 
        0 0 15px rgba(255, 0, 0, 0.6),
        0 0 30px rgba(0, 255, 0, 0.6),
        0 0 45px rgba(0, 0, 255, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

@keyframes neonPulseRainbow {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(255, 0, 0, 0.6),
            0 0 30px rgba(0, 255, 0, 0.6),
            0 0 45px rgba(0, 0, 255, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(255, 0, 0, 0.9),
            0 0 50px rgba(0, 255, 0, 0.9),
            0 0 75px rgba(0, 0, 255, 0.9),
            inset 0 0 50px rgba(255, 255, 255, 0.4);
    }
}

@keyframes rainbowShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
/* Commander Showcase Feature - Styling */

/* Tab Navigation */
.commander-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--panel);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--stroke);
}

.commander-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg1);
    border: 1px solid var(--stroke);
    color: var(--muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.commander-tab:hover {
    background: var(--panel2);
    color: var(--text);
    border-color: var(--gold);
}

.commander-tab[data-active="true"] {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.commander-tab .tab-indicator {
    color: var(--gold);
    margin-left: 0.5rem;
}

.commander-tab[data-active="true"] .tab-indicator {
    color: #000;
}

/* Commander Panel */
.commander-panel {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Main Grid Layout */
.commander-grid {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    justify-items: center;
}

/* Left and Right Selectors */
.commander-selectors-left,
.commander-selectors-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.selector-box {
    text-align: center;
}

.selector-box h3 {
    font-size: 0.875rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Icon Selector */
.icon-selector {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border: 2px solid var(--stroke);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg1);
    position: relative;
    overflow: hidden;
}

.icon-selector:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--glow);
    transform: scale(1.05);
}

.icon-selector .selected-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.icon-selector .empty-icon {
    font-size: 3rem;
    color: var(--muted);
}

/* Gear Grid (Center) - 3x4 Cross Pattern */
.gear-diamond {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 2rem 0;
}

.gear-diamond-inner {
    display: grid;
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(4, auto);
    gap: 0.75rem;
    width: auto;
    height: auto;
    background: var(--panel2);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gear-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-start;
    width: 90px;
}

/* Grid Positions - Cross Pattern (Matching Original Design) */
/* Row 1 - Helmet (center) */
.gear-slot[data-position="top"] {
    grid-column: 2;
    grid-row: 1;
}

/* Row 2 - Weapon (left), Body/Chest (center), Gloves (right) */
.gear-slot[data-position="upper-right"] {
    grid-column: 1;
    grid-row: 2;
}

.gear-slot[data-position="upper-left"] {
    grid-column: 2;
    grid-row: 2;
}

.gear-slot[data-position="middle-left"] {
    grid-column: 3;
    grid-row: 2;
}

/* Row 3 - Accessory2 (left), Pants (center), Accessory1 (right) */
.gear-slot[data-position="lower-right"] {
    grid-column: 1;
    grid-row: 3;
}

.gear-slot[data-position="lower-left"] {
    grid-column: 2;
    grid-row: 3;
}

.gear-slot[data-position="bottom"] {
    grid-column: 3;
    grid-row: 3;
}

/* Row 4 - Boots (center) */
.gear-slot[data-position="middle-right"] {
    grid-column: 2;
    grid-row: 4;
}

/* Gear Icon */
.gear-icon {
    width: 70px;
    height: 70px;
    background: var(--bg1);
    border: 2px solid var(--stroke);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.gear-icon:hover {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--glow);
}

.gear-icon.refined {
    border-color: var(--gold);
    background: rgba(215, 179, 90, 0.15);
    box-shadow: 0 0 20px var(--glow), inset 0 0 10px rgba(215, 179, 90, 0.2);
}

.gear-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Refined Note */
.refined-note {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-style: italic;
}

.refined-note .highlight {
    color: var(--gold);
    font-weight: 600;
}

/* Formation Screenshot Section */
.formation-screenshot-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--stroke);
}

.formation-screenshot-section h3 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.screenshot-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.screenshot-preview {
    position: relative;
    margin-bottom: 1rem;
}

.screenshot-preview img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--stroke);
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-remove-screenshot {
    display: block;
    margin: 1rem auto 0;
    padding: 0.5rem 1rem;
    background: var(--crimson);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-remove-screenshot:hover {
    background: #c41e1e;
    transform: translateY(-2px);
}

.screenshot-upload {
    text-align: center;
}

.upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: #000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.upload-label:hover {
    background: var(--gold2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glow);
}

.screenshot-input {
    display: none;
}

.screenshot-temp-preview {
    margin-top: 1rem;
}

.screenshot-preview-temp {
    text-align: center;
}

.screenshot-preview-temp img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--gold);
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 12px var(--glow);
}

.preview-label {
    margin-top: 0.5rem;
    color: var(--gold);
    font-size: 0.875rem;
    font-style: italic;
}

/* Gear Level Selector */
.gear-level-selector {
    display: flex;
    gap: 2px;
    background: var(--panel);
    padding: 2px;
    border-radius: 4px;
    border: 1px solid var(--stroke);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90px;
}

.level-btn {
    width: 22px;
    height: 22px;
    background: var(--bg1);
    border: 1px solid var(--stroke);
    color: var(--muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    flex-shrink: 0;
}

.level-btn:hover {
    background: var(--panel2);
    border-color: var(--gold);
}

.level-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: bold;
}

/* Commander Details */
.commander-details {
    background: var(--panel2);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

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

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

.form-group label {
    display: block;
    color: var(--gold);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    background: var(--bg1);
    border: 1px solid var(--stroke);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--glow);
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Commander Actions */
.commander-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    background: var(--gold2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--glow);
}

.btn-secondary {
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--stroke);
}

.btn-secondary:hover {
    background: var(--crimson);
    color: white;
    border-color: var(--crimson);
}

/* Icon Picker Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.icon-picker-modal {
    background: var(--panel);
    border: 2px solid var(--gold);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--stroke);
}

.modal-header h2 {
    margin: 0;
    color: var(--gold);
}

.close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--crimson);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg1);
    border: 1px solid var(--stroke);
    color: var(--text);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.icon-grid-item {
    aspect-ratio: 1;
    border: 2px solid var(--stroke);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg1);
}

.icon-grid-item:hover {
    border-color: var(--gold);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow);
}

.icon-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .commander-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gear-diamond {
        min-height: 450px;
    }
    
    .gear-diamond-inner {
        grid-template-columns: repeat(3, 75px);
        gap: 0.6rem;
        padding: 1rem;
    }
    
    .gear-slot {
        width: 75px;
    }
    
    .gear-icon {
        width: 55px;
        height: 55px;
        padding: 4px;
    }
    
    .level-btn {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
    
    .gear-level-selector {
        max-width: 75px;
    }
}

@media (max-width: 768px) {
    .commander-tabs {
        justify-content: center;
    }
    
    .commander-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .commander-panel {
        padding: 1rem;
    }
    
    .icon-selector {
        width: 100px;
        height: 100px;
    }
    
    .gear-diamond {
        min-height: 380px;
    }
    
    .gear-diamond-inner {
        grid-template-columns: repeat(3, 65px);
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .gear-slot {
        width: 65px;
    }
    
    .gear-icon {
        width: 50px;
        height: 50px;
        padding: 4px;
    }
    
    .level-btn {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .gear-level-selector {
        max-width: 65px;
        gap: 1px;
        padding: 1px;
    }
    
    .commander-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Extra small screens - further optimize */
@media (max-width: 480px) {
    .commander-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    .commander-tab {
        flex-shrink: 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.8125rem;
    }
    
    .gear-diamond-inner {
        grid-template-columns: repeat(3, 55px);
        gap: 0.4rem;
        padding: 0.5rem;
    }
    
    .gear-slot {
        width: 55px;
    }
    
    .gear-icon {
        width: 42px;
        height: 42px;
        padding: 3px;
    }
    
    .icon-selector {
        width: 85px;
        height: 85px;
    }
    
    .gear-level-selector {
        max-width: 55px;
    }
    
    .level-btn {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}
/**
 * Timeline Module
 * Alternating card layout with central vertical line
 */

.timeline-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

/* Central vertical line */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(147, 51, 234, 0.5), 
        rgba(147, 51, 234, 0.8), 
        rgba(147, 51, 234, 0.5));
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline entry container */
.timeline-entry {
    position: relative;
    display: flex;
    margin-bottom: var(--space-2xl);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation delays */
.timeline-entry:nth-child(odd) { animation-delay: 0.1s; }
.timeline-entry:nth-child(even) { animation-delay: 0.2s; }
.timeline-entry:nth-child(3n) { animation-delay: 0.3s; }
.timeline-entry:nth-child(4n) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alternating layout: odd items on right, even on left */
.timeline-entry:nth-child(odd) {
    justify-content: flex-end;
}

.timeline-entry:nth-child(even) {
    justify-content: flex-start;
}

/* Timeline card */
.timeline-card {
    position: relative;
    width: calc(50% - 60px);
    background: var(--panel2);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.3);
}

/* Connecting line from central axis to card */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 60px;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, 
        rgba(147, 51, 234, 0.8), 
        rgba(147, 51, 234, 0.3));
    z-index: 2;
    transform: translateX(-50%);
}

/* Flip connecting line for left-side cards */
.timeline-entry:nth-child(even)::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
    background: linear-gradient(to left, 
        rgba(147, 51, 234, 0.8), 
        rgba(147, 51, 234, 0.3));
}

/* Marker on central line */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--panel2);
    border: 3px solid rgba(147, 51, 234, 0.8);
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(147, 51, 234, 0.4);
}

/* Marker icon (can be customized per entry) */
.timeline-marker-icon {
    width: 20px;
    height: 20px;
    fill: rgba(147, 51, 234, 1);
}

/* Marker colors - alternating */
.timeline-entry:nth-child(odd) .timeline-marker {
    border-color: rgba(34, 197, 94, 0.8);
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.4);
}

.timeline-entry:nth-child(odd) .timeline-marker-icon {
    fill: rgba(34, 197, 94, 1);
}

/* Card image */
.timeline-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.timeline-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg1);
}

/* Badge overlay on image */
.timeline-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Card content */
.timeline-card-content {
    padding: var(--space-lg);
}

/* Date */
.timeline-card-date {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

/* Title */
.timeline-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

/* Description */
.timeline-card-description {
    color: var(--text2);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

/* Footer (author info) */
.timeline-card-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--stroke);
    font-size: 0.875rem;
    color: var(--muted);
}

/* Day number badge (optional, for timeline markers) */
.timeline-day-badge {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--bg0);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 4px 12px;
    border-radius: 6px;
    z-index: 4;
    white-space: nowrap;
}

/* Empty state */
.timeline-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--muted);
}

/* Loading indicator */
.timeline-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--muted);
}

/* End message */
.timeline-end {
    text-align: center;
    padding: var(--space-xl);
    color: var(--muted);
    font-style: italic;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .timeline-wrapper::before {
        left: 30px;
    }
    
    .timeline-entry {
        justify-content: flex-start !important;
        padding-left: 60px;
    }
    
    .timeline-entry::before {
        left: 30px !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 30px !important;
    }
    
    .timeline-marker {
        left: 30px !important;
    }
    
    .timeline-day-badge {
        left: 30px !important;
    }
    
    .timeline-card {
        width: 100%;
    }
}

/* Responsive: adjust card width on tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .timeline-card {
        width: calc(50% - 40px);
    }
}
/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-list li {
    list-style: none;
}

/* Pagination buttons (Previous/Next) */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.pagination-btn:active:not(.disabled) {
    transform: translateY(0);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Page numbers */
.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-number:hover:not(.pagination-current) {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.pagination-number:active:not(.pagination-current) {
    transform: translateY(0);
}

.pagination-current {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 600;
    cursor: default;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Ellipsis */
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Pagination info */
.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .pagination {
        margin: 1.5rem 0;
        padding: 1rem 0;
    }
    
    .pagination-list {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .pagination-number {
        min-width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8125rem;
    }
    
    /* Hide page numbers on very small screens, keep first/last/current */
    .pagination-list li:not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) .pagination-number:not(.pagination-current) {
        display: none;
    }
}

/* Compact pagination variant */
.pagination.pagination-compact {
    margin: 1rem 0;
    padding: 0.5rem 0;
}

.pagination-compact .pagination-list {
    gap: 0.25rem;
}

.pagination-compact .pagination-btn,
.pagination-compact .pagination-number {
    padding: 0.375rem 0.625rem;
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8125rem;
}
/* ============================================
   Mobile Menu - Dedicated Mobile Navigation
   ============================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #070A10;
    z-index: 999999;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    visibility: hidden;
    opacity: 0;
}

.mobile-menu.active {
    display: block !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    opacity: 1 !important;
    z-index: 999999 !important;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--stroke);
    background: var(--panel);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gold);
}

.mobile-menu-brand .guild-crest {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.mobile-menu-title {
    letter-spacing: -0.01em;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
}

.mobile-menu-close:active {
    background: rgba(215, 179, 90, 0.15);
}

.mobile-menu-nav {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    min-height: 56px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.0625rem;
    font-weight: 500;
    -webkit-tap-highlight-color: rgba(215, 179, 90, 0.3);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.mobile-menu-item:active {
    background: rgba(215, 179, 90, 0.15);
    transform: scale(0.98);
}

.mobile-menu-item.active {
    background: rgba(215, 179, 90, 0.2);
    color: var(--gold);
    font-weight: 600;
}

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

.mobile-menu-section {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
}

.mobile-menu-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
}

.mobile-menu-button {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    color: var(--bg0);
    font-weight: 600;
    margin-top: var(--space-md);
    justify-content: center;
}

.mobile-menu-button:active {
    background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 100%);
    transform: scale(0.98);
}

.mobile-menu-join {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    color: white;
}

.mobile-menu-user-section {
    margin-top: auto;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--stroke);
    margin-top: var(--space-xl);
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    background: var(--panel);
    border-radius: 8px;
}

.mobile-menu-avatar,
.mobile-menu-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.mobile-menu-avatar-placeholder {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    color: var(--bg0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.mobile-menu-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-menu-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-user-role {
    font-size: 0.8125rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-menu-logout-form {
    margin: 0;
    padding: 0;
}

.mobile-menu-logout {
    color: var(--crimson);
}

.mobile-menu-logout:active {
    background: rgba(224, 58, 58, 0.15);
    color: var(--crimson);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hide desktop menu on mobile */
@media (max-width: 768px) {
    .navbar-menu {
        display: none !important;
    }
    
    .navbar-toggle {
        display: flex !important;
    }
}

/* Mobile menu should be available on mobile but hidden by default */
@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}
