@font-face {
    font-family: 'Minecraft';
    src: url('minecraft.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #09060c;
    --bg-panel: rgba(22, 14, 28, 0.88);
    --bg-panel-hover: rgba(32, 20, 42, 0.94);
    --border-color: rgba(255, 119, 0, 0.28);
    --border-glow: rgba(255, 119, 0, 0.55);
    --orange: #ff7700;
    --orange-bright: #ff9500;
    --orange-glow: rgba(255, 119, 0, 0.4);
    --pumpkin-flame: #ff5500;
    --cyan: #ff9500; /* Map legacy cyan to glowing pumpkin */
    --cyan-glow: rgba(255, 149, 0, 0.35);
    --purple: #b545ff; /* Spooky witch purple */
    --purple-glow: rgba(181, 69, 255, 0.3);
    --text-main: #fcf4ec;
    --text-muted: #b49b88;
    --text-dim: #735948;
    --danger: #ff4757;
    --success: #ff9500;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
    --font-mc: 'Press Start 2P', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Seasonal Animated Canvas (Halloween Falling Embers & Soul Sparks) */
.season-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Ambient Halloween glow background */
.cyber-glow-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(420px circle at calc(50% - 350px) 25%, rgba(255, 119, 0, 0.14) 0%, transparent 100%),
        radial-gradient(420px circle at calc(50% + 350px) 75%, rgba(181, 69, 255, 0.12) 0%, transparent 100%),
        radial-gradient(550px circle at 50% 50%, rgba(255, 85, 0, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Ambient Decorative Minecraft Jack-o'-Lanterns in Viewport Corners */
.ambient-mc-decorations {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ambient-lantern {
    position: absolute;
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 6px 20px rgba(234, 88, 12, 0.4));
    animation: lanternBob 4.8s ease-in-out infinite;
    pointer-events: auto;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ambient-lantern:hover {
    transform: scale(1.12) rotate(-3deg);
}

.ambient-lantern-bl {
    bottom: 28px;
    left: max(28px, calc(50% - 680px));
    animation-delay: 0s;
}

.ambient-lantern-br {
    bottom: 28px;
    right: max(28px, calc(50% - 680px));
    animation-delay: -2.4s;
}

.lantern-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.4));
}

.lantern-glow {
    position: absolute;
    inset: -25px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 170, 0, 0.32) 0%, rgba(234, 88, 12, 0.14) 45%, transparent 70%);
    z-index: -1;
    animation: candleFlickerPulse 2.4s ease-in-out infinite;
}

@keyframes lanternBob {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-9px) rotate(1.5deg);
    }
}

@keyframes candleFlickerPulse {
    0%, 100% {
        opacity: 0.75;
        transform: scale(0.96);
    }
    25% {
        opacity: 1;
        transform: scale(1.04);
    }
    50% {
        opacity: 0.85;
        transform: scale(0.98);
    }
    75% {
        opacity: 0.98;
        transform: scale(1.02);
    }
}

@media (max-width: 900px) {
    .ambient-lantern {
        width: 48px;
        height: 48px;
        opacity: 0.8;
    }
    .ambient-lantern-bl {
        bottom: 16px;
        left: 16px;
    }
    .ambient-lantern-br {
        bottom: 16px;
        right: 16px;
    }
}

/* Typography Helpers */
.mc-font {
    font-family: var(--font-mc);
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.text-cyan { color: var(--orange-bright) !important; }
.text-orange { color: var(--orange-bright) !important; }
.text-purple { color: var(--purple); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.gradient-text {
    background: linear-gradient(135deg, #ffaa00, #ff5500 50%, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: border-color 0.25s, box-shadow 0.25s;
    background-clip: padding-box;
    isolation: isolate;
}

.glass-panel:hover {
    border-color: var(--border-glow);
}

/* Navigation Header */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 8, 16, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.45rem 1.15rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-cube {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 10px rgba(255, 119, 0, 0.8));
    animation: pumpkinBrandPulse 3s infinite alternate ease-in-out;
}

@keyframes pumpkinBrandPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 119, 0, 0.7)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(255, 149, 0, 0.95)); }
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.neon-text {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.version-badge {
    background: rgba(255, 119, 0, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(255, 119, 0, 0.35);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-mc);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

/* Unified Brand & Server Capsule ("Одно целое") */
.brand-capsule {
    display: inline-flex;
    align-items: center;
    background: rgba(22, 14, 28, 0.8);
    border: 1px solid rgba(255, 119, 0, 0.28);
    border-radius: 28px;
    padding: 0.2rem 0.45rem 0.2rem 0.55rem;
    gap: 0.45rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s ease;
    user-select: none;
    flex-shrink: 0;
}

.brand-capsule:hover {
    border-color: rgba(255, 119, 0, 0.55);
    box-shadow: 0 6px 24px rgba(255, 119, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-logo-area {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.brand-logo-area:hover {
    opacity: 0.92;
}

.brand-ver-badge {
    background: rgba(255, 119, 0, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(255, 119, 0, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-family: var(--font-mc);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.brand-capsule-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.brand-server-area {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    padding: 0.2rem 0.55rem;
    border-radius: 16px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.brand-server-area:hover {
    background: rgba(0, 242, 254, 0.08);
}

.brand-server-area:hover .brand-ip-val {
    color: #fed7aa;
    text-shadow: 0 0 10px var(--orange-glow);
}

.brand-server-area:active {
    transform: scale(0.98);
}


.brand-online-num, .brand-slash {
    display: none;
}
@media (min-width: 1700px) {
    .brand-online-num, .brand-slash {
        display: inline;
    }
}

.brand-online-num {
    display: none;
}

.brand-slash {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.brand-ip-val {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.8px;
    white-space: nowrap;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    user-select: none;
}

.brand-ip-val.copied {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.8) !important;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
    white-space: nowrap;
    z-index: 5;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.81rem;
    font-weight: 500;
    padding: 0.32rem 0.48rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.24rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s;
    vertical-align: middle;
}

.nav-btn:hover .nav-svg,
.nav-btn.active .nav-svg {
    transform: scale(1.15);
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: var(--cyan);
    background: rgba(255, 119, 0, 0.12);
    border: 1px solid rgba(255, 119, 0, 0.3);
    box-shadow: 0 0 15px var(--cyan-glow);
}

/* Server IP Pill */
.server-ip-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.server-ip-pill:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
    transform: translateY(-1px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 213, 115, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0); }
}

.online-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.ip-code {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 1px;
}

.copy-badge {
    background: var(--cyan);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    min-width: 0;
    z-index: 2;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-shrink: 0;
    min-width: 0;
    position: relative;
    z-index: 10;
    margin-left: auto;
}

/* User Auth in Navbar */
.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 1px solid rgba(255, 149, 0, 0.4);
    color: #fff;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
    transition: all 0.2s;
}

.nav-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.nav-btn-svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    vertical-align: middle;
}

.nav-user-widget {
    position: relative;
}

.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.nav-user-pill:hover,
.nav-user-pill.active {
    background: rgba(255, 119, 0, 0.12);
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    image-rendering: pixelated;
    object-fit: cover;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.nav-user-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-main);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-caret-svg {
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-user-widget.open .nav-caret-svg {
    transform: rotate(180deg);
}

/* User Dropdown */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: rgba(13, 16, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    z-index: 250;
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s;
}

.nav-dropdown-header:hover {
    background: rgba(255, 255, 255, 0.07);
}

.nav-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    image-rendering: pixelated;
    object-fit: cover;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.nav-dropdown-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-dropdown-name {
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.4rem 0;
}

.nav-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--cyan);
}

.nav-dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.dropdown-item-svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Main Wrapper & Tabs */
.main-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-card {
    padding: 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-tag {
    color: var(--orange-bright);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 650px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-label {
    font-family: var(--font-mc);
    font-size: 0.6rem;
    color: var(--text-dim);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7700, #ff4500);
    color: #120800;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(255, 119, 0, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 26px rgba(255, 119, 0, 0.65);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ff8800, #ff5500);
}

.btn-secondary {
    background: linear-gradient(135deg, #9d4edd, #581c87);
    color: #fff;
    box-shadow: 0 4px 18px rgba(157, 78, 221, 0.35);
}

.btn-secondary:hover {
    box-shadow: 0 6px 24px rgba(157, 78, 221, 0.55);
    transform: translateY(-2px);
}

/* Floating Jack-o'-Lanterns (High-Res Vector Art) */
.jack-lantern-float {
    position: absolute;
    width: 64px;
    height: 64px;
    pointer-events: none;
    user-select: none;
    animation: pumpkinFloat 4s infinite ease-in-out;
    z-index: 2;
}

.jack-lantern-float.left-side {
    top: -12px;
    left: 20px;
}

.jack-lantern-float.right-side {
    bottom: -12px;
    right: 25px;
    animation-delay: -2s;
}

.hero-pumpkin-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 16px rgba(255, 119, 0, 0.85));
}

.pumpkin-eye-glow,
.pumpkin-mouth-glow {
    filter: drop-shadow(0 0 4px #ffaa00);
    animation: candleGlow 2.5s infinite alternate ease-in-out;
}

@keyframes pumpkinFloat {
    0%, 100% {
        transform: translateY(0px) rotate(-4deg);
    }
    50% {
        transform: translateY(-12px) rotate(4deg);
    }
}

@keyframes candleGlow {
    0% { fill: #fef08a; opacity: 0.85; }
    50% { fill: #ffea79; opacity: 1; }
    100% { fill: #fed7aa; opacity: 0.75; }
}

/* Common Vector SVG Icons */
.svg-icon {
    width: 22px;
    height: 22px;
    vertical-align: -3px;
    stroke: currentColor;
    display: inline-block;
}

.soc-svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: inline-block;
}

.btn-sm-svg {
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    margin-right: 4px;
    stroke: currentColor;
    display: inline-block;
}

.btn-tab-svg {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    margin-right: 6px;
    stroke: currentColor;
    display: inline-block;
}

.drop-svg-icon {
    width: 44px;
    height: 44px;
    stroke: var(--orange-bright);
    margin-bottom: 0.5rem;
    transition: transform 0.25s;
    display: inline-block;
}

.dropzone:hover .drop-svg-icon {
    transform: translateY(-4px);
}

.map-error-svg {
    width: 64px;
    height: 64px;
    stroke: var(--orange);
    display: inline-block;
}

.guide-nav-svg {
    width: 24px;
    height: 24px;
    stroke: var(--orange-bright);
    transition: transform 0.2s;
    display: inline-block;
}

.guide-nav-item:hover .guide-nav-svg,
.guide-nav-item.active .guide-nav-svg {
    transform: scale(1.18);
}

.guide-alert-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.alert-svg {
    width: 20px;
    height: 20px;
    stroke: var(--orange-bright);
    flex-shrink: 0;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cyan);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Grid Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card {
    padding: 1.75rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 9999px;
    background: rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(234, 88, 12, 0.4);
    color: var(--orange-bright);
}

/* Social Buttons */
.social-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s;
}

.social-btn:hover {
    transform: translateX(4px);
}

.social-btn.tg:hover {
    border-color: #229ED9;
    box-shadow: 0 0 15px rgba(34, 158, 217, 0.3);
}

.social-btn.ds:hover {
    border-color: #5865F2;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.3);
}

.soc-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.soc-name {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
}

.soc-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Online Players Grid */
.players-heads-grid {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.65rem;
    max-height: 240px;
    overflow-y: auto;
    padding: 14px 10px 10px 10px;
    margin-top: 0.5rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.players-heads-grid::-webkit-scrollbar {
    width: 6px;
}
.players-heads-grid::-webkit-scrollbar-track {
    background: transparent;
}
.players-heads-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.player-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 12px var(--cyan-glow);
    transform: translateY(-2px);
}

.player-chip:active {
    transform: translateY(0);
    box-shadow: 0 0 6px var(--cyan-glow);
}

.player-chip img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    image-rendering: pixelated;
    transition: transform 0.2s ease;
}

.player-chip:hover img {
    transform: scale(1.15);
}

/* Cabinet Auth View */
.auth-card {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 0.5rem 0 0.3rem 0;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 12px var(--cyan-glow);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.code-input {
    font-family: var(--font-mc) !important;
    font-size: 1.4rem !important;
    letter-spacing: 4px;
}

.hint {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.glow-code {
    color: var(--cyan);
    background: rgba(0, 242, 254, 0.1);
    padding: 1px 4px;
    border-radius: 4px;
}

/* Profile Banner */
.profile-banner {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    image-rendering: pixelated;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.profile-badge {
    font-family: var(--font-mc);
    font-size: 0.55rem;
    color: var(--cyan);
    margin-bottom: 2px;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.profile-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.bullet { color: var(--text-dim); }

/* 3D Skin Studio */
.skin-canvas-wrapper {
    width: 100%;
    height: 420px;
    background: radial-gradient(circle at center, rgba(0, 242, 254, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    contain: paint;
    transform: translateZ(0);
}

.skin-canvas-wrapper canvas {
    cursor: grab;
    touch-action: none;
    transform: translateZ(0);
    will-change: transform;
}

.skin-canvas-wrapper canvas:active {
    cursor: grabbing;
}

.skin-viewer-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.6rem;
}

.viewer-header-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-viewer-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-viewer-ctrl:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}

.viewer-floating-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.zoom-fab {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    user-select: none;
}

.zoom-fab:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--cyan);
    color: var(--cyan);
    transform: scale(1.08);
}

.btn-tool {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tool:hover {
    color: var(--text-main);
    border-color: var(--cyan);
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.25s;
    margin-bottom: 1rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--cyan);
    background: rgba(0, 242, 254, 0.05);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.drop-icon {
    font-size: 2rem;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.drop-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.drop-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Model Radio & Auto-detect */
.model-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.model-autodetect-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.25s ease;
}

.model-autodetect-badge.detected {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.35);
    color: #00ff88;
}

.model-autodetect-badge.manual {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.model-select-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.model-radio {
    flex: 1;
    cursor: pointer;
}

.model-radio input { display: none; }

.radio-card {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.model-radio input:checked + .radio-card {
    border-color: var(--cyan);
    background: rgba(0, 242, 254, 0.08);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.radio-card strong { font-size: 0.9rem; }
.radio-card small { color: var(--text-muted); font-size: 0.75rem; }

/* Catalog Row */
.subhead {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.catalog-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.catalog-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.catalog-item:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.catalog-item img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    image-rendering: pixelated;
}

/* Map View */
.map-container {
    padding: 1rem;
    height: 750px;
    display: flex;
    flex-direction: column;
}

.map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.map-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.map-actions {
    display: flex;
    gap: 0.5rem;
}

.iframe-wrapper {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
}

.map-error-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(16, 22, 34, 0.95) 0%, rgba(8, 10, 15, 0.98) 100%);
    padding: 2rem;
    text-align: center;
    z-index: 10;
}

.map-error-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(255, 71, 87, 0.5));
}

.map-error-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b81;
    margin-bottom: 0.5rem;
}

.map-error-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.map-error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pulse-dot.dot-error {
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: none;
}

/* Leaderboards */
.leaderboard-tabs-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-top-tab {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-top-tab.active {
    background: var(--cyan);
    color: #000;
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.table-responsive {
    overflow-x: auto;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.lb-table th {
    font-family: var(--font-mc);
    font-size: 0.65rem;
    color: var(--text-dim);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.lb-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.lb-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rank-badge {
    font-family: var(--font-mc);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 58px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

.rank-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rank-num {
    line-height: 1;
}

/* 1. TOP 1 — Radiant Gold Trophy / Crest */
.rank-1 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(180, 83, 9, 0.38));
    border: 1px solid rgba(251, 191, 36, 0.85);
    color: #fffbeb;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.45), inset 0 0 4px rgba(254, 240, 138, 0.2);
    text-shadow: 0 0 5px rgba(254, 240, 138, 0.6);
    animation: goldPulse 3s infinite alternate ease-in-out;
}

@keyframes goldPulse {
    0% { box-shadow: 0 0 6px rgba(251, 191, 36, 0.35), inset 0 0 3px rgba(254, 240, 138, 0.15); }
    100% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.55), inset 0 0 5px rgba(254, 240, 138, 0.25); }
}

/* 2. TOP 2 — Moonlight Silver Knight Shield */
.rank-2 {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.2), rgba(71, 85, 105, 0.38));
    border: 1px solid rgba(226, 232, 240, 0.85);
    color: #f8fafc;
    box-shadow: 0 0 8px rgba(226, 232, 240, 0.4), inset 0 0 4px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
    animation: silverPulse 3s infinite alternate ease-in-out;
}

@keyframes silverPulse {
    0% { box-shadow: 0 0 6px rgba(226, 232, 240, 0.3), inset 0 0 3px rgba(255, 255, 255, 0.15); }
    100% { box-shadow: 0 0 10px rgba(226, 232, 240, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.25); }
}

/* 3. TOP 3 — Smoldering Bronze War Emblem */
.rank-3 {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(154, 52, 18, 0.38));
    border: 1px solid rgba(249, 115, 22, 0.85);
    color: #ffedd5;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4), inset 0 0 4px rgba(253, 186, 116, 0.2);
    text-shadow: 0 0 5px rgba(253, 186, 116, 0.6);
    animation: bronzePulse 3s infinite alternate ease-in-out;
}

@keyframes bronzePulse {
    0% { box-shadow: 0 0 6px rgba(249, 115, 22, 0.3), inset 0 0 3px rgba(253, 186, 116, 0.15); }
    100% { box-shadow: 0 0 10px rgba(249, 115, 22, 0.5), inset 0 0 5px rgba(253, 186, 116, 0.25); }
}

/* 4–10. TOP 4-10 — Sleek Uniform Obsidian Badges */
.rank-normal {
    background: rgba(18, 14, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lb-more-wrap {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.lb-more-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.btn-lb-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lb-more:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 12px var(--cyan-glow);
    transform: translateY(-1px);
}

/* Guides Portal Layout */
.guides-wrapper {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 1.5rem;
}

.guides-sidebar {
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0.2rem 0;
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.guide-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guide-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    transition: all 0.2s;
}

.guide-nav-item:hover {
    background: rgba(255, 119, 0, 0.08);
    border-color: rgba(255, 119, 0, 0.3);
    transform: translateX(3px);
}

.guide-nav-item.active {
    background: rgba(255, 119, 0, 0.15);
    border-color: var(--orange);
    box-shadow: 0 0 15px rgba(255, 119, 0, 0.25);
}

.guide-icon {
    font-size: 1.4rem;
}

.guide-nav-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-main);
}

.guide-nav-text small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.guide-content-panel {
    padding: 2.2rem 2.5rem;
}

.article-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.article-tag {
    font-family: var(--font-mc);
    font-size: 0.65rem;
    color: var(--orange-bright);
    letter-spacing: 1px;
}

.article-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin: 0.3rem 0;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin: 1.5rem 0 0.6rem 0;
    color: var(--orange-bright);
}

.article-body p {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.code-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    margin: 0.75rem 0 1.25rem 0;
}

.code-box code {
    font-family: var(--font-mc);
    font-size: 0.85rem;
    color: var(--orange-bright);
}

.btn-copy-code {
    background: rgba(255, 119, 0, 0.15);
    border: 1px solid rgba(255, 119, 0, 0.3);
    color: var(--orange-bright);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-code:hover {
    background: var(--orange);
    color: #000;
}

.guide-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin: 1.25rem 0;
    line-height: 1.5;
}

.guide-alert.info {
    background: rgba(181, 69, 255, 0.12);
    border: 1px solid rgba(181, 69, 255, 0.35);
    color: #e9d5ff;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rule-item {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: 10px;
}

.rule-num {
    font-family: var(--font-mc);
    color: var(--orange-bright);
    font-size: 0.85rem;
    font-weight: 700;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.guide-table th {
    font-family: var(--font-mc);
    font-size: 0.65rem;
    color: var(--text-dim);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.guide-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.guide-table code {
    font-family: var(--font-mc);
    font-size: 0.75rem;
    color: var(--orange-bright);
}

.guide-bullets {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.lb-player-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    user-select: none;
    width: fit-content;
}

.lb-player-cell:hover {
    transform: translateX(4px);
    color: var(--orange-bright);
}

.lb-player-cell:hover .lb-player-head {
    box-shadow: 0 0 10px var(--cyan-glow);
    border-color: var(--cyan);
}

.lb-player-head {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Player Profile Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 2, 8, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.profile-modal-card {
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 2.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 119, 0, 0.2);
    border: 1px solid var(--border-glow);
}

.modal-close-btn {
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.35rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #fff;
    transform: scale(1.15);
}

.profile-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.profile-modal-body-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.profile-3d-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-3d-viewport {
    position: relative;
    width: 100%;
    height: 360px;
    background: radial-gradient(circle at center, rgba(30, 20, 50, 0.6) 0%, rgba(10, 10, 20, 0.85) 100%);
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.profile-3d-canvas {
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}

.profile-3d-canvas:active {
    cursor: grabbing;
}

.profile-spin-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-mc);
    font-size: 0.65rem;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
    z-index: 5;
    white-space: nowrap;
}

.profile-spin-btn:hover {
    background: rgba(255, 119, 0, 0.2);
    border-color: var(--orange-bright);
    color: var(--orange-bright);
    transform: translateX(-50%) scale(1.05);
}

.profile-spin-btn .svg-icon {
    width: 14px;
    height: 14px;
}

.profile-actions-panel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.btn-profile-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mc);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-profile-action .svg-icon {
    width: 16px;
    height: 16px;
}

.btn-copy-skin:hover:not(:disabled) {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.btn-copy-cape:hover:not(:disabled) {
    background: rgba(147, 51, 234, 0.2);
    border-color: var(--purple);
    color: #c084fc;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
}

.btn-profile-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.profile-info-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    image-rendering: pixelated;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
    display: block;
}

.profile-online-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-family: var(--font-mc);
    padding: 2px 6px;
    border-radius: 4px;
    background: #475569;
    color: #fff;
    white-space: nowrap;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-online-badge.online {
    background: #00ff88;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.profile-modal-title-group {
    flex: 1;
    min-width: 0;
}

.profile-modal-name {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0.2rem 0 0.4rem 0;
    word-break: break-all;
}

.profile-modal-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.pdate-item strong {
    color: var(--text-main);
}

.profile-ranks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-rank-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.25s ease;
}

.profile-rank-card:hover {
    border-color: var(--cyan);
    background: rgba(0, 242, 254, 0.04);
}

.rank-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-bright);
    flex-shrink: 0;
}

.rank-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rank-card-label {
    font-size: 0.65rem;
    font-family: var(--font-mc);
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.rank-card-val-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.rank-card-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.profile-stat-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pstat-label {
    font-size: 0.65rem;
    font-family: var(--font-mc);
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.pstat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

@media (max-width: 800px) {
    .profile-modal-body-grid {
        grid-template-columns: 1fr;
    }
    .profile-3d-viewport {
        height: 300px;
    }
    .profile-ranks-grid {
        grid-template-columns: 1fr;
    }
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
    .profile-modal-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Alerts & Toasts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid var(--danger);
    color: #ff6b81;
}

.alert-success {
    background: rgba(46, 213, 115, 0.15);
    border: 1px solid var(--success);
    color: #7bed9f;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-panel);
    border: 1px solid var(--cyan);
    color: var(--text-main);
    padding: 0.85rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px var(--cyan-glow);
    z-index: 100005;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Utilities */
.hidden { display: none !important; }
.mt-auto { margin-top: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.flex-col { display: flex; flex-direction: column; }

/* Admin Panel Styles */
.admin-badge {
    background: rgba(181, 69, 255, 0.2);
    border: 1px solid var(--purple);
    color: #e9d5ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-guides-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-guides-table th,
.admin-guides-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 119, 0, 0.15);
}

.admin-guides-table th {
    font-family: var(--font-heading);
    color: var(--orange-bright);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.admin-guides-table tr:hover td {
    background: rgba(255, 119, 0, 0.04);
}

.admin-action-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-edit {
    background: rgba(255, 119, 0, 0.15);
    border-color: rgba(255, 119, 0, 0.4);
    color: var(--orange-bright);
}
.btn-edit:hover {
    background: var(--orange-bright);
    color: #000;
}

.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff6b81;
}
.btn-danger:hover {
    background: #ff4757;
    color: #fff;
}

.btn-order {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 0.35rem 0.5rem;
}
.btn-order:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}
.btn-order:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* Full-Page Guide Editor */
.guide-editor-page {
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
}

.guide-editor-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.guide-editor-back-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.guide-editor-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.guide-editor-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.guide-editor-top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-editor-bottombar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.admin-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.admin-select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.admin-select option {
    background: #0d1117;
    color: #fff;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.editor-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.editor-mode-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.mode-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
    background: var(--orange);
    color: #000;
    font-weight: 700;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem;
    background: rgba(10, 14, 22, 0.95);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.toolbar-group {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 0.4rem;
    margin-right: 0.15rem;
}

.toolbar-group:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    user-select: none;
}

.toolbar-btn:hover {
    background: rgba(255, 119, 0, 0.2);
    border-color: var(--orange-bright);
    color: var(--orange-bright);
}

.toolbar-btn.template-btn {
    background: rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.3);
    color: var(--cyan);
}

.toolbar-btn.template-btn:hover {
    background: var(--cyan);
    color: #000;
}

.guide-split-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    background: rgba(5, 7, 12, 0.85);
    overflow: hidden;
}

.guide-split-wrap.editor-only {
    grid-template-columns: 1fr;
}
.guide-split-wrap.editor-only .preview-pane {
    display: none;
}

.guide-split-wrap.preview-only {
    grid-template-columns: 1fr;
}
.guide-split-wrap.preview-only .editor-pane {
    display: none;
}

.editor-pane {
    display: flex;
    flex-direction: column;
}

.editor-pane .admin-textarea {
    border: none;
    border-radius: 0;
    min-height: 380px;
    height: 100%;
    resize: vertical;
    background: transparent;
    padding: 1rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
}

.preview-pane {
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 380px;
    background: rgba(12, 16, 25, 0.7);
    overflow: hidden;
}

.guide-split-wrap.preview-only .preview-pane {
    border-left: none;
}

.preview-pane-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    background: rgba(0, 242, 254, 0.05);
    border-bottom: 1px solid rgba(0, 242, 254, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-article-body {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: 480px;
    flex: 1;
}

.preview-article-body .article-body {
    font-size: 0.9rem;
    line-height: 1.6;
}

.admin-textarea:focus {
    outline: none;
}

@media (max-width: 768px) {
    .guide-split-wrap {
        grid-template-columns: 1fr !important;
    }
    .preview-pane {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

/* Studio Layout: Left 3D Character Overview + Right Two Windows (Skin & Cape) */
.skin-studio-grid {
    align-items: flex-start;
}

.viewer-sticky-panel {
    position: sticky;
    top: 85px;
    height: fit-content;
    contain: paint;
    transform: translateZ(0);
}

.viewer-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    border-radius: 6px;
    height: auto;
    line-height: 1.2;
}

.studio-panels-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.studio-card {
    padding: 1.5rem;
}

.studio-subtabs {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.1rem;
}

.studio-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    white-space: nowrap;
}

.studio-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.studio-tab-btn.active {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 14px var(--cyan-glow);
}

.studio-tab-btn .svg-icon-mini,
.svg-icon-mini {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    flex-shrink: 0;
    fill: currentColor;
}

.drop-svg-icon {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.mini-pill {
    font-size: 0.62rem;
    font-family: var(--font-mc);
    padding: 2px 6px;
    border-radius: 4px;
    background: #00ff88;
    color: #000;
    font-weight: bold;
}


.cape-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 0.85rem;
}

.cape-status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 6px #64748b;
}

.dot-indicator.active {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fff;
}

.skin-presets-section,
.cape-presets-section {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.skin-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.cape-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.skin-preset-card,
.cape-preset-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.4rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    transition: all 0.22s ease;
}

.skin-preset-card:hover,
.cape-preset-card:hover {
    border-color: var(--cyan);
    background: rgba(0, 242, 254, 0.08);
    transform: translateY(-2px);
}

.skin-preset-card.selected,
.cape-preset-card.selected,
.wardrobe-card.selected {
    border-color: var(--cyan);
    background: rgba(0, 242, 254, 0.15);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.skin-preset-canvas {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cape-preset-canvas {
    width: 48px;
    height: 72px;
    border-radius: 4px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.skin-preset-name,
.cape-preset-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.preset-sub-badge {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1;
}

.preset-sub-badge.halloween {
    color: var(--orange-bright);
}

/* Skin Source Tabs (Catalog vs Wardrobe) */
.skin-source-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
    margin-bottom: 0.8rem;
}

.skin-source-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skin-source-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.skin-source-tab.active {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.4);
    color: #fff;
    box-shadow: 0 0 12px rgba(234, 88, 12, 0.25);
}

.wardrobe-count-badge {
    background: rgba(234, 88, 12, 0.35);
    color: var(--orange-bright);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid rgba(234, 88, 12, 0.5);
    min-width: 18px;
    text-align: center;
}

.skin-source-tab.active .wardrobe-count-badge {
    background: var(--orange-bright);
    color: #0b0712;
    border-color: #fff;
}

/* Personal Wardrobe Section */
.wardrobe-presets-section {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.wardrobe-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.wardrobe-header-info {
    display: flex;
    flex-direction: column;
}

.wardrobe-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wardrobe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    max-height: 290px;
    overflow-y: auto;
    padding: 6px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.wardrobe-grid::-webkit-scrollbar {
    width: 6px;
}
.wardrobe-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.wardrobe-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.wardrobe-card:hover {
    border-color: rgba(234, 88, 12, 0.7);
    background: rgba(234, 88, 12, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(234, 88, 12, 0.22);
}

.wardrobe-card:active {
    transform: translateY(0) scale(0.98);
}

.wardrobe-card-del-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    z-index: 5;
    padding: 0;
}

.wardrobe-card-del-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 1);
    color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.wardrobe-card-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wardrobe-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.45);
    display: block;
}

.wardrobe-card-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dim);
}

.wardrobe-card-badge.slim {
    color: var(--cyan);
    border-color: rgba(0, 242, 254, 0.4);
}

.wardrobe-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.wardrobe-card-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: -2px;
    pointer-events: none;
}

.wardrobe-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.wardrobe-empty-icon {
    opacity: 0.4;
    color: var(--orange-bright);
}

.wardrobe-empty-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.wardrobe-empty-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 240px;
    line-height: 1.4;
}

/* Add Wardrobe Modal */
.add-wardrobe-modal-card {
    max-width: 440px;
    width: 92%;
    padding: 1.5rem;
    position: relative;
    border: 1px solid rgba(234, 88, 12, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(234, 88, 12, 0.15);
}

.wardrobe-preview-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}

.wardrobe-preview-img-display {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.wardrobe-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.btn-save-wardrobe {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.4);
    color: var(--orange-bright);
}

.btn-save-wardrobe:hover {
    background: rgba(234, 88, 12, 0.3);
    border-color: var(--orange-bright);
    color: #fff;
    box-shadow: 0 0 12px rgba(234, 88, 12, 0.3);
}

.btn-save-cape-wardrobe {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.35);
    color: var(--cyan);
}

.btn-save-cape-wardrobe:hover {
    background: rgba(0, 242, 254, 0.25);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.cape-wardrobe-grid {
    grid-template-columns: repeat(3, 1fr);
}

.wardrobe-card-cape-img {
    width: 50px;
    height: 80px;
    border-radius: 4px;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.45);
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .skin-presets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .cape-presets-grid,
    .cape-wardrobe-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
}

@media (max-width: 1620px) {
    .brand-server-area, .brand-capsule-divider {
        display: none !important;
    }
}

@media (max-width: 1350px) {
    .brand-ver-badge {
        display: none;
    }
    .nav-btn {
        padding: 0.28rem 0.38rem;
        font-size: 0.78rem;
        gap: 0.18rem;
    }
}

@media (max-width: 1180px) {
    .nav-btn .icon {
        display: none;
    }
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
    .viewer-sticky-panel {
        position: static !important;
        top: auto !important;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-card {
        padding: 1.75rem;
    }
    .nav-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "left actions"
            "links links";
        gap: 0.75rem;
        padding: 0.6rem 1rem;
    }
    .nav-left {
        grid-area: left;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nav-left::-webkit-scrollbar {
        display: none;
    }
    .nav-actions {
        grid-area: actions;
        justify-content: flex-end;
    }
    .nav-links {
        grid-area: links;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .clans-podium-grid {
        grid-template-columns: 1fr;
    }
    .clans-hero-card {
        padding: 1.5rem;
    }
    .clans-search-wrap,
    .clans-search-input {
        width: 100%;
    }
}

@media (max-width: 850px) {
    .guides-wrapper {
        grid-template-columns: 1fr;
    }
    .guide-content-panel {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 768px) {
    .map-container {
        height: 520px;
        padding: 0.75rem;
    }
    .map-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .map-info {
        justify-content: center;
        font-size: 0.85rem;
    }
    .map-actions {
        display: flex;
        width: 100%;
        gap: 0.5rem;
    }
    .map-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 0.55rem 0.6rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .map-actions .btn svg {
        flex-shrink: 0;
    }
    .map-error-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 0.5rem;
    }
    .map-error-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 650px) {
    .profile-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }
    .profile-banner .btn {
        width: 100%;
        justify-content: center;
    }
    .card-header-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 600px) {
    .leaderboard-tabs-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-top-tab {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .nav-actions {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .server-ip-pill {
        justify-content: center;
        width: 100%;
        max-width: 320px;
    }
    .profile-modal-card,
    .mod-modal-card {
        padding: 1.5rem 1rem;
    }
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin: 1rem auto;
    }
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-header > div:last-child,
    .admin-header .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .skin-mod-notice-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    .skin-mod-notice-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Button Icon */
.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.btn:hover:not(:disabled) .btn-icon {
    transform: scale(1.15);
}

/* Client Mod Requirement Notice Banner */
.skin-mod-notice {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.16) 0%, rgba(147, 51, 234, 0.14) 100%), rgba(18, 12, 28, 0.7);
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-left: 5px solid var(--orange-bright);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(234, 88, 12, 0.15);
}

.skin-mod-notice-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(234, 88, 12, 0.22);
    border: 1px solid rgba(249, 115, 22, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.35);
}

.skin-mod-notice-badge .svg-icon {
    width: 26px;
    height: 26px;
    color: var(--orange-bright);
}

.skin-mod-notice-body {
    flex: 1;
}

.skin-mod-notice-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
    font-family: var(--font-sans);
}

.skin-mod-notice-desc {
    font-size: 0.88rem;
    line-height: 1.48;
    color: #cbd5e1;
}

.skin-mod-notice-desc strong {
    color: var(--orange-bright);
}

.skin-mod-notice-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 850px) {
    .skin-mod-notice {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }
    .skin-mod-notice-actions {
        flex-direction: row;
        width: 100%;
    }
    .skin-mod-notice-actions .btn {
        flex: 1;
    }
}

@media (max-width: 500px) {
    .skin-mod-notice-actions {
        flex-direction: column;
    }
    .skin-mod-notice-actions .btn {
        width: 100%;
    }
}

/* Mod Installation Modal Card */
.mod-modal-card {
    width: 90%;
    max-width: 580px;
    padding: 2rem;
    position: relative;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(20, 14, 30, 0.95), rgba(10, 8, 16, 0.98));
    border: 1px solid rgba(255, 119, 0, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(234, 88, 12, 0.2);
}

.mod-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mod-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
}

.mod-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
}

.mod-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0 0;
}

.mod-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mod-step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mod-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange-bright);
    color: #120800;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.mod-step-info strong {
    display: block;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.mod-step-info p {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

.mod-step-info code {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--cyan);
    font-family: var(--font-mc);
    font-size: 0.82rem;
}

.mod-modal-footer {
    padding-top: 0.5rem;
}

/* MinePGU Clans & Clan Styling */
.text-gold {
    color: #fbbf24 !important;
}

.profile-clan-badge-wrap {
    margin: 0.35rem 0 0.5rem;
}

.profile-clan-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fef08a;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.profile-clan-pill.no-clan {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    cursor: default;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.profile-clan-pill.no-clan .clan-pill-svg {
    color: var(--text-dim);
    opacity: 0.45;
}

.profile-clan-pill:hover {
    background: rgba(251, 191, 36, 0.22);
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}

.profile-clan-pill:active {
    transform: translateY(0);
}

.clan-pill-svg {
    width: 14px;
    height: 14px;
    color: #fbbf24;
    flex-shrink: 0;
}

.clan-role-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.clan-members-pill {
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--cyan);
    font-weight: 600;
}

.clan-role-badge.clan-role-owner {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.clan-role-badge.clan-role-admin {
    background: rgba(0, 242, 254, 0.2);
    color: var(--cyan);
    border: 1px solid rgba(0, 242, 254, 0.4);
}

.clan-role-badge.clan-role-default {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Clan Leaderboard Cell */
.lb-clan-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.clan-tag-pill {
    display: inline-block;
    font-family: var(--font-mc);
    font-size: 0.7rem;
    padding: 1px 5px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: var(--orange-bright);
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 2px;
}

.clan-name-text {
    font-size: 0.95rem;
    color: #fff;
}

.clan-desc-text {
    color: var(--text-muted);
    font-size: 0.78rem;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clan-members-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Clickable Clan Row in Leaderboard */
.clickable-clan-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.clickable-clan-row:hover td {
    background: rgba(0, 242, 254, 0.06) !important;
}

.clan-click-hint {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    color: var(--cyan);
    opacity: 0.75;
    margin-top: 2px;
}

.clickable-clan-row:hover .clan-click-hint {
    opacity: 1;
    text-decoration: underline;
}

/* Clan Details Modal Redesign */
.clan-details-modal-card {
    position: relative;
    max-width: 660px;
    width: 95%;
    padding: 1.75rem;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(20, 21, 30, 0.98), rgba(12, 13, 20, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 170, 0, 0.22);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 170, 0, 0.08);
}

.clan-details-modal-card .modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.clan-details-modal-card .modal-close-btn:hover {
    background: rgba(255, 119, 0, 0.15);
    border-color: rgba(255, 119, 0, 0.45);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.25);
}

.clan-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
}

.clan-modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(181, 69, 255, 0.15));
    border: 1px solid rgba(255, 170, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-bright);
    box-shadow: 0 0 16px rgba(255, 170, 0, 0.2);
    flex-shrink: 0;
}

.clan-modal-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.clan-modal-subtitle {
    font-family: var(--font-mc);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--orange-bright);
}

.clan-modal-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.clan-modal-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
    .clan-modal-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.clan-meta-box {
    background: rgba(14, 15, 22, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.85rem 0.65rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.clan-meta-box:hover {
    border-color: rgba(255, 170, 0, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.clan-meta-box .meta-label {
    font-family: var(--font-mc);
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.clan-meta-box .meta-val {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.clan-meta-box .lb-player-cell {
    margin: 0 auto;
}

.clan-modal-desc {
    background: rgba(0, 0, 0, 0.35);
    border-left: 3px solid var(--orange-bright);
    padding: 0.65rem 0.95rem;
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.clan-members-block {
    margin-top: 0.5rem;
}

.clan-members-heading-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.clan-members-heading {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clan-members-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 11, 16, 0.5);
}

.clan-members-table thead th {
    background: rgba(18, 19, 28, 0.85);
    color: var(--text-dim);
    font-family: var(--font-mc);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.clan-members-table tbody tr {
    transition: background 0.15s ease;
}

.clan-members-table tbody tr:hover {
    background: rgba(255, 170, 0, 0.06);
}

.clan-members-table tbody td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.clan-members-table tbody tr:last-child td {
    border-bottom: none;
}

/* Clan Role Badges */
.clan-role-badge.role-owner,
.clan-role-badge.clan-role-owner {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.clan-role-badge.role-admin,
.clan-role-badge.clan-role-admin {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.clan-role-badge.role-member,
.clan-role-badge.clan-role-default {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ========================================================
   TABLES & GRID STYLING (Сетка таблицы для лидербордов и кланов)
   ======================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    margin: 0.5rem 0;
}

.lb-table,
.clan-members-table,
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(11, 15, 23, 0.65);
    backdrop-filter: blur(8px);
}

.lb-table thead th,
.clan-members-table thead th,
.leaderboard-table thead th {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    color: var(--text-muted);
    font-family: var(--font-mc);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    user-select: none;
}

.lb-table thead th:last-child,
.clan-members-table thead th:last-child,
.leaderboard-table thead th:last-child {
    border-right: none;
}

.lb-table tbody td,
.clan-members-table tbody td,
.leaderboard-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transition: background 0.15s ease;
}

.lb-table tbody td:last-child,
.clan-members-table tbody td:last-child,
.leaderboard-table tbody td:last-child {
    border-right: none;
}

.lb-table tbody tr:last-child td,
.clan-members-table tbody tr:last-child td,
.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* Zebra striping for clear row distinction */
.lb-table tbody tr:nth-child(even),
.clan-members-table tbody tr:nth-child(even),
.leaderboard-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.016);
}

/* Hover highlights */
.lb-table tbody tr:hover,
.clan-members-table tbody tr:hover,
.leaderboard-table tbody tr:hover {
    background: rgba(0, 242, 254, 0.04);
}

.clan-members-table td:nth-child(3) {
    white-space: nowrap;
    text-align: center;
}

.clan-members-table td:nth-child(4) {
    white-space: nowrap;
    text-align: right;
}

.role-owner {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

.role-admin {
    background: rgba(0, 242, 254, 0.15) !important;
    color: var(--cyan) !important;
    border: 1px solid rgba(0, 242, 254, 0.35) !important;
}

.role-member {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

.user-clan-role-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--cyan);
    font-weight: 600;
    margin-left: 4px;
    display: inline-block;
    vertical-align: middle;
}

.zoom-fab-reset svg {
    transition: transform 0.3s ease;
}

.zoom-fab-reset:hover svg {
    transform: rotate(-90deg);
}

/* ========================================================
   CLANS TAB & PODIUM
   ======================================================== */
.clans-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.clans-hero-card {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(20, 24, 33, 0.95) 0%, rgba(10, 12, 18, 0.95) 100%);
    border: 1px solid var(--border-color);
}

.clans-hero-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 119, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.clans-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.clans-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 119, 0, 0.12);
    border: 1px solid rgba(255, 119, 0, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mc);
    color: var(--cyan);
    margin-bottom: 0.75rem;
}

.clans-hero-title {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.clans-hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.clans-stats-pills {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.clans-stat-pill {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 110px;
}

.clans-stat-pill .stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.clans-stat-pill .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Clans Podium */
.clans-podium-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.clans-section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.clans-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.clan-podium-card {
    background: rgba(15, 18, 25, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.clan-podium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Rank 1: Gold */
.clan-podium-card.rank-1 {
    border-color: rgba(251, 191, 36, 0.45);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.08) 0%, rgba(15, 18, 25, 0.9) 100%);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.12);
}
.clan-podium-card.rank-1:hover {
    border-color: #fbbf24;
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
}

/* Rank 2: Silver */
.clan-podium-card.rank-2 {
    border-color: rgba(203, 213, 225, 0.35);
    background: linear-gradient(180deg, rgba(203, 213, 225, 0.06) 0%, rgba(15, 18, 25, 0.9) 100%);
    box-shadow: 0 0 15px rgba(203, 213, 225, 0.08);
}
.clan-podium-card.rank-2:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(203, 213, 225, 0.2);
}

/* Rank 3: Bronze */
.clan-podium-card.rank-3 {
    border-color: rgba(249, 115, 22, 0.35);
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.06) 0%, rgba(15, 18, 25, 0.9) 100%);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.08);
}
.clan-podium-card.rank-3:hover {
    border-color: #f97316;
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.2);
}

.podium-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.podium-rank-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.clan-podium-card.rank-1 .podium-rank-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.clan-podium-card.rank-2 .podium-rank-badge {
    background: linear-gradient(135deg, #f1f5f9 0%, #64748b 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(203, 213, 225, 0.4);
}

.clan-podium-card.rank-3 .podium-rank-badge {
    background: linear-gradient(135deg, #fed7aa 0%, #c2410c 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}

.podium-members-pill {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
}

.podium-card-main {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.podium-clan-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.podium-clan-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.podium-leader-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.podium-leader-avatar {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    image-rendering: pixelated;
    background: #000;
}

.podium-leader-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.podium-action-hint {
    font-size: 0.75rem;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Clans Table Header & Search */
.clans-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.clans-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.clans-search-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.45rem 1rem 0.45rem 2.25rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s;
    width: 260px;
}

.clans-search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
    width: 290px;
}

/* Desktop Nav Overflow Protection */
.nav-links {
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
    display: none;
}

/* =============================================================
   Client Mods Catalog Styling
   ============================================================= */
.mods-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.mods-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.6rem 2rem;
    border-radius: var(--radius-lg, 16px);
    background: linear-gradient(135deg, rgba(26, 17, 39, 0.75), rgba(15, 10, 20, 0.85));
    border: 1px solid rgba(251, 146, 60, 0.22);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.mods-banner-badge {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--orange-bright, #f97316);
}

.mods-banner-badge svg {
    width: 32px;
    height: 32px;
}

.mods-banner-body {
    flex: 1;
}

.mods-banner-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.mods-title-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn-add-mod {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.35);
}

.btn-add-mod .btn-icon {
    width: 16px;
    height: 16px;
}

.mods-banner-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mods-version-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(234, 88, 12, 0.18);
    border: 1px solid rgba(251, 146, 60, 0.35);
    color: #fed7aa;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.mods-banner-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Loader Filter Bar */
.mods-filter-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-lg, 16px);
    background: rgba(18, 12, 28, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.mods-filter-label {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.88rem;
}

.mods-filter-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mod-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.mod-filter-btn.active {
    background: rgba(234, 88, 12, 0.22);
    border-color: var(--orange-bright, #f97316);
    color: #fff;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
}

/* Mods Grid */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.mod-card {
    display: flex;
    flex-direction: column;
    padding: 1.6rem;
    border-radius: var(--radius-lg, 16px);
    background: rgba(20, 13, 26, 0.88);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.mod-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 119, 0, 0.2);
}

.mod-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1rem;
}

.mod-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 119, 0, 0.12);
    border: 1px solid rgba(255, 149, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--orange-bright);
    overflow: hidden;
}

.mod-card-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.mod-card-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
}

.mod-card-title-box {
    flex: 1;
    min-width: 0;
}

.mod-card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem 0;
    word-break: break-word;
    line-height: 1.25;
}

/* Unified Halloween Orange Category Badges for ALL categories */
.mod-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 119, 0, 0.16) !important;
    border: 1px solid rgba(255, 149, 0, 0.45) !important;
    color: #fed7aa !important;
    box-shadow: 0 0 10px rgba(255, 119, 0, 0.2);
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.mod-meta-badges {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.mod-size-badge {
    font-size: 0.72rem;
    color: #fed7aa;
    background: rgba(255, 119, 0, 0.1);
    border: 1px solid rgba(255, 119, 0, 0.25);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
}

.mod-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
    min-height: 2.7rem;
}

/* Mod Card Controls & Select */
.mod-card-controls {
    margin-top: auto;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mod-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mod-select-label {
    color: #fed7aa;
    font-weight: 600;
    font-size: 0.82rem;
}

.mod-version-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: rgba(12, 7, 16, 0.88);
    border: 1px solid rgba(255, 119, 0, 0.28);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mod-version-select:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
}

.mod-version-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mod-version-select option {
    background: #140b1e;
    color: var(--text-main);
    padding: 0.4rem;
}

/* Actions */
.mod-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mod-card-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.mod-deps-container {
    width: 100%;
}

.btn-deps {
    border-color: rgba(255, 149, 0, 0.35) !important;
    color: #fed7aa !important;
    background: rgba(255, 119, 0, 0.1) !important;
}

.btn-deps:hover {
    background: rgba(255, 119, 0, 0.22) !important;
    border-color: var(--orange-bright) !important;
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
    color: #fff !important;
}

.pointer-none {
    pointer-events: none;
}

.btn-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Admin Mod Card Actions */
.mod-admin-card-actions {
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.btn-mod-delete {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.32) !important;
    color: #f87171 !important;
    font-size: 0.78rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-mod-delete:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

/* Add Mod Modal Dialog (Admin Only) */
.add-mod-modal-card {
    max-width: 500px;
    width: 95%;
    padding: 2rem 2rem 1.85rem 2rem;
    border-radius: 16px;
    background: rgba(18, 11, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 119, 0, 0.25);
    position: relative;
}

.add-mod-modal-card .modal-close-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.35rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.add-mod-modal-card .modal-close-btn:hover {
    color: var(--orange-bright);
    transform: scale(1.18);
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.modal-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header-title-wrap .svg-icon {
    width: 22px;
    height: 22px;
}

.text-orange {
    color: var(--orange-bright, #f97316);
}

.input-text {
    width: 100%;
    box-sizing: border-box;
    background: rgba(12, 7, 16, 0.88);
    border: 1px solid rgba(255, 119, 0, 0.28);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-text:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
}

.modal-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* Loading Skeleton & Error */
.mod-loading-card, .mod-error-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    border-radius: var(--radius-lg, 16px);
    color: #cbd5e1;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .mods-grid {
        grid-template-columns: 1fr;
    }
    .mods-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    .mods-filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Mod Dependencies Modal Dialog */
.mod-deps-modal-card {
    max-width: 580px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 1.75rem 2rem;
    border-radius: 16px;
    background: rgba(18, 11, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 119, 0, 0.25);
    position: relative;
    box-sizing: border-box;
}

.mod-deps-modal-card .modal-close-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.35rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.mod-deps-modal-card .modal-close-btn:hover {
    color: var(--orange-bright);
    transform: scale(1.18);
}

.mod-deps-modal-body {
    overflow-y: auto;
    margin: 1rem 0;
    padding-right: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 52vh;
}

.mod-dep-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 119, 0, 0.15);
    border-radius: 10px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.mod-dep-item:hover {
    border-color: rgba(255, 119, 0, 0.35);
    background: rgba(255, 119, 0, 0.04);
}

.mod-dep-info-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1;
}

.mod-dep-icon-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mod-dep-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mod-dep-text-wrap {
    min-width: 0;
    flex: 1;
}

.mod-dep-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mod-dep-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.mod-dep-filename {
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
}

.mod-dep-action-wrap {
    flex-shrink: 0;
}

.mod-deps-loading, .mod-deps-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    text-align: center;
}

/* Confirm Delete Mod Modal Dialog (Admin Only) */
.confirm-delete-modal-card {
    max-width: 460px;
    width: 92%;
    padding: 1.85rem 2rem 1.75rem 2rem;
    border-radius: 16px;
    background: rgba(18, 11, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(239, 68, 68, 0.22);
    position: relative;
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-delete-modal-card .modal-close-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.35rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.confirm-delete-modal-card .modal-close-btn:hover {
    color: #ef4444;
    transform: scale(1.18);
}

.confirm-delete-body {
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin: 1.25rem 0 1.5rem 0;
}

.confirm-delete-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main, #f1f5f9);
    margin: 0;
}

.confirm-delete-subtext {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted, #94a3b8);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Admin Panel Category Navigation & Catalog Styles
   ========================================================================== */
.admin-nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
}

.admin-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-nav-tab .admin-tab-svg {
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

.admin-nav-tab:hover {
    color: var(--text-main);
    background: rgba(255, 119, 0, 0.1);
    border-color: rgba(255, 119, 0, 0.3);
}

.admin-nav-tab.active {
    background: rgba(255, 119, 0, 0.18);
    border-color: var(--orange-bright);
    color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.25);
}

.admin-subpanel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-subpanel-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.admin-subpanel-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-mods-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-filter-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    min-width: 200px;
}

.admin-filter-input:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 8px rgba(255, 119, 0, 0.3);
}

.admin-catalog-type-switch {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.admin-subtab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-subtab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.admin-subtab-btn.active {
    background: var(--orange-bright);
    color: #000;
    font-weight: 700;
}

.admin-catalog-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    object-fit: contain;
    image-rendering: pixelated;
    display: block;
    margin: 0 auto;
}

.admin-preview-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
}

.admin-preview-img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

/* ===================================================================
   Admin Catalog Modals (Skins & Capes: Add / Edit)
   =================================================================== */

.admin-catalog-modal-card {
    max-width: 680px;
    width: 95%;
    padding: 2rem 2.25rem 1.85rem 2.25rem;
    border-radius: 16px;
    background: rgba(16, 10, 24, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 119, 0, 0.28);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 119, 0, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-catalog-modal-card .modal-close-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.25rem;
    right: 1.35rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.35rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.admin-catalog-modal-card .modal-close-btn:hover {
    color: var(--orange-bright);
    transform: scale(1.15);
}

.catalog-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 119, 0, 0.15);
}

.catalog-modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 119, 0, 0.2), rgba(181, 69, 255, 0.12));
    border: 1px solid rgba(255, 119, 0, 0.35);
    box-shadow: 0 0 16px rgba(255, 119, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.catalog-modal-icon-badge svg {
    width: 22px;
    height: 22px;
    color: var(--orange-bright);
}

.catalog-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.catalog-modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* 2-Column Grid Layout for Form */
.catalog-form-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 640px) {
    .catalog-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.catalog-form-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Group & Input enhancements */
.catalog-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.catalog-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-form-label .label-hint {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

.catalog-input {
    width: 100%;
    background: rgba(10, 6, 14, 0.85);
    border: 1px solid rgba(255, 119, 0, 0.25);
    border-radius: 8px;
    color: #fff;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.catalog-input:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
    background: rgba(14, 8, 20, 0.95);
}

.catalog-input[readonly] {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.catalog-select {
    width: 100%;
    background: rgba(10, 6, 14, 0.85);
    border: 1px solid rgba(255, 119, 0, 0.25);
    border-radius: 8px;
    color: #fff;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.catalog-select:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
}

.catalog-select option {
    background: #181024;
    color: #fff;
}

/* Custom Upload Zone */
.catalog-upload-zone {
    border: 1.5px dashed rgba(255, 119, 0, 0.35);
    border-radius: 12px;
    background: rgba(255, 119, 0, 0.03);
    padding: 1.15rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    user-select: none;
}

.catalog-upload-zone:hover {
    border-color: var(--orange-bright);
    background: rgba(255, 119, 0, 0.08);
    box-shadow: 0 0 16px rgba(255, 119, 0, 0.15);
}

.catalog-upload-icon {
    width: 32px;
    height: 32px;
    color: var(--orange-bright);
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.catalog-upload-zone:hover .catalog-upload-icon {
    transform: translateY(-2px);
}

.catalog-upload-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.catalog-upload-subtext {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Checkerboard Preview & Inspector Card */
.catalog-preview-card {
    background: rgba(10, 6, 14, 0.9);
    border: 1px solid rgba(255, 119, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.catalog-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: repeating-conic-gradient(#1e1329 0% 25%, #130a1c 0% 50%) 50% / 14px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 90px;
}

.catalog-preview-img-display {
    max-width: 96px;
    max-height: 96px;
    image-rendering: pixelated;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
    border-radius: 4px;
}

.catalog-metrics-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.catalog-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.catalog-metric-value {
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Transparency Progress Bar */
.transparency-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-top: 0.2rem;
}

.transparency-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.3s ease, background 0.3s ease;
}

.transparency-bar-fill.bar-ok {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.transparency-bar-fill.bar-warn {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.transparency-bar-fill.bar-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* ==========================================================================
   Universal Custom App Dialog (Confirm / Prompt / Alert)
   ========================================================================== */
.app-dialog-card {
    max-width: 480px;
    width: 92%;
    padding: 1.85rem 2rem 1.75rem 2rem;
    border-radius: 16px;
    background: rgba(18, 11, 24, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: relative;
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.app-dialog-card.dialog-danger {
    border: 1px solid rgba(239, 68, 68, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(239, 68, 68, 0.22);
}

.app-dialog-card.dialog-primary {
    border: 1px solid var(--border-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 119, 0, 0.22);
}

.app-dialog-card .modal-close-btn {
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.85rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.app-dialog-card .modal-close-btn:hover {
    color: var(--orange-bright);
    transform: scale(1.18);
}

.app-dialog-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-dialog-icon svg {
    width: 24px;
    height: 24px;
}

.app-dialog-body {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    margin: 1.25rem 0 1.5rem 0;
}

.dialog-danger .app-dialog-body {
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.app-dialog-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main, #f1f5f9);
    margin: 0;
}

.app-dialog-message strong {
    color: #fff;
    font-weight: 600;
}

.app-dialog-message strong.text-orange {
    color: var(--orange-bright);
}

.app-dialog-subtext {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted, #94a3b8);
    margin-top: 0.6rem;
}

.app-dialog-input-wrap {
    margin-top: 0.9rem;
}

.app-dialog-input {
    width: 100%;
    background: rgba(9, 6, 12, 0.9);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s;
}

.app-dialog-input:focus {
    border-color: var(--orange-bright);
    box-shadow: 0 0 12px rgba(255, 149, 0, 0.35);
}








/* Player Profile Reputation System */
.profile-reputation-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.reputation-badge-box {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reputation-label {
    color: var(--text-dim);
    font-weight: 500;
}

.reputation-val {
    font-family: var(--font-mc);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.reputation-val.positive {
    color: #4ade80 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.45);
}

.reputation-val.negative {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.reputation-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.reputation-actions.disabled-self {
    opacity: 0.45;
}

.btn-rep-vote {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.btn-rep-vote .rep-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.15s ease;
}

.btn-rep-vote:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-rep-vote:hover:not(:disabled) .rep-icon {
    transform: scale(1.15);
}

.btn-rep-vote.btn-like:hover:not(:disabled) {
    border-color: #4ade80;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.25);
}

.btn-rep-vote.btn-like.active {
    border-color: #4ade80;
    color: #064e3b;
    background: #4ade80;
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}

.btn-rep-vote.btn-like.active .rep-icon {
    stroke: #064e3b;
    fill: #064e3b;
}

.btn-rep-vote.btn-dislike:hover:not(:disabled) {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.btn-rep-vote.btn-dislike.active {
    border-color: #ef4444;
    color: #fff;
    background: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.btn-rep-vote.btn-dislike.active .rep-icon {
    stroke: #fff;
    fill: #fff;
}

.btn-rep-vote:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


/* 3D Skin Viewer Controls Toolbar (skinview3d) */
.viewer-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.viewer-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.viewer-ctrl-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 125px;
}

.viewer-ctrl-label {
    font-size: 0.75rem;
    color: var(--text-dim, #94a3b8);
    white-space: nowrap;
}

.viewer-select {
    width: 100%;
    padding: 5px 8px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.viewer-select:focus, .viewer-select:hover {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.95);
}

.viewer-range {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    accent-color: #38bdf8;
}

.viewer-controls-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.viewer-controls-actions .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 65px;
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.viewer-controls-actions .btn.active {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}


/* ==========================================================================
   TICKETS & SUPPORT SYSTEM
   ========================================================================== */

.tickets-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tickets-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30, 18, 40, 0.9) 0%, rgba(18, 12, 24, 0.85) 100%);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 149, 0, 0.15);
}

.tickets-banner-badge {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 119, 0, 0.12);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-bright);
    flex-shrink: 0;
    box-shadow: 0 0 16px var(--orange-glow);
}

.tickets-banner-body {
    flex: 1;
    min-width: 0;
}

.tickets-banner-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.tickets-title-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tickets-banner-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.tickets-subpill {
    background: rgba(181, 69, 255, 0.12);
    border: 1px solid rgba(181, 69, 255, 0.35);
    color: #e9d5ff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tickets-title-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ticket-limit-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 149, 0, 0.08);
    border: 1px solid rgba(255, 149, 0, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-main);
}

.ticket-limit-pill.limit-full {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.ticket-limit-pill .limit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.ticket-limit-pill.limit-full .limit-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.tickets-banner-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

.tickets-guest-card {
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 540px;
    margin: 2rem auto;
}

.tickets-guest-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 119, 0, 0.1);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-bright);
    margin-bottom: 0.5rem;
}

.tickets-guest-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.tickets-guest-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 440px;
}

.player-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 640px) {
    player-tickets-grid {
        grid-template-columns: 1fr;
    }
}

.player-ticket-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-ticket-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px var(--orange-glow);
}

.player-ticket-card.card-closed {
    opacity: 0.75;
    border-color: rgba(255, 255, 255, 0.1);
}

.player-ticket-card.card-closed:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ticket-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ticket-id-tag {
    font-family: var(--font-mc);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 7px;
    border-radius: 4px;
}

.ticket-cat-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e9d5ff;
    background: rgba(181, 69, 255, 0.15);
    border: 1px solid rgba(181, 69, 255, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

.ticket-status-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ticket-status-tag.status-open {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.ticket-status-tag.status-in-progress {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.ticket-status-tag.status-closed {
    color: #9ca3af;
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.ticket-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ticket-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticket-card-msgs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Ticket Dialog & Modals */
.ticket-modal-card {
    max-width: 600px;
    width: 100%;
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
}

.ticket-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-modal-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 119, 0, 0.12);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-bright);
    flex-shrink: 0;
}

.ticket-textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
    line-height: 1.5;
}

.ticket-rule-reminder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 149, 0, 0.08);
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #fed7aa;
}

.ticket-dialog-card {
    max-width: 820px;
    width: 100%;
    height: 85vh;
    max-height: 820px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.ticket-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ticket-dialog-title-area {
    flex: 1;
    min-width: 0;
}

.ticket-dialog-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.ticket-dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.ticket-dialog-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-dot {
    color: rgba(255, 255, 255, 0.3);
}

.ticket-messages-thread {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.ticket-msg-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 88%;
}

.ticket-msg-row.msg-player {
    align-self: flex-start;
}

.ticket-msg-row.msg-admin {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ticket-msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    image-rendering: pixelated;
    flex-shrink: 0;
}

.ticket-msg-row.msg-admin .ticket-msg-avatar {
    border-color: var(--purple);
    box-shadow: 0 0 10px var(--purple-glow);
}

.ticket-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    word-break: break-word;
}

.ticket-msg-row.msg-player .ticket-msg-bubble {
    border-top-left-radius: 2px;
    background: rgba(25, 17, 32, 0.85);
    border-color: rgba(255, 119, 0, 0.25);
}

.ticket-msg-row.msg-admin .ticket-msg-bubble {
    border-top-right-radius: 2px;
    background: linear-gradient(135deg, rgba(45, 20, 60, 0.9) 0%, rgba(30, 15, 45, 0.85) 100%);
    border-color: rgba(181, 69, 255, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ticket-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.ticket-msg-sender {
    font-weight: 700;
    color: var(--text-main);
}

.ticket-msg-time {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.ticket-msg-body {
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #f1e9e1;
}

.ticket-reply-wrap {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ticket-reply-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.ticket-reply-textarea {
    flex: 1;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 10px;
}

.ticket-reply-send-btn {
    height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.ticket-closed-notice {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.75rem;
}

/* Admin Panel Tickets */
.admin-tickets-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-ticket-status-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-filter-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-filter-pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.admin-filter-pill.active {
    background: var(--orange-bright);
    color: #120917;
    box-shadow: 0 0 10px var(--orange-glow);
}

.pill-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-filter-pill.active .pill-badge {
    background: rgba(0, 0, 0, 0.25);
    color: #120917;
}

.pill-badge-open {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.pill-badge-prog {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.admin-tickets-table tr td {
    vertical-align: middle;
}

.ticket-player-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-avatar-inline {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    image-rendering: pixelated;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-status-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}


.modal-close-icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.modal-close-icon-btn:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.45);
    color: #ef4444;
    transform: scale(1.06);
}

.modal-close-icon-btn svg {
    display: block;
}

.ticket-status-wrap {
    display: inline-flex;
    align-items: center;
}


/* -------------------------------------------------------------
   Mod Download Counter & Tracker
   ------------------------------------------------------------- */
.mod-download-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0.65rem 0;
    user-select: none;
    line-height: 1.4;
}

.mod-download-stats svg {
    width: 15px;
    height: 15px;
    stroke: var(--cyan);
    flex-shrink: 0;
}

.mod-download-stats strong,
.mod-download-stats .mod-stats-total {
    color: var(--text-main);
    font-weight: 700;
}

.mod-download-stats .mod-stats-unique {
    color: var(--cyan);
    font-weight: 700;
}
