:root {
    --bg-dark: #09090b;
    /* Zinc 950 */
    --bg-sidebar: #050505;
    --bg-panel: #141417;
    /* Zinc 900 */
    --bg-element: #27272a;
    /* Zinc 800 */
    --bg-hover: #3f3f46;
    /* Zinc 700 */

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    /* Zinc 400 */
    --text-muted: #71717a;
    /* Zinc 500 */

    --accent-color: #2ecc71;
    --accent-shine: rgba(46, 204, 113, 0.6);

    --border-color: #27272a;

    --danger: #ef4444;
    --success: #2ecc71;
    --warning: #f59e0b;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    background-image: url('../images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* Dark Overlay for Readability over BG Image */
.app-overlay {
    background: rgba(9, 9, 11, 0.85);
    /* Darken content slightly */
    width: 100%;
    height: 100%;
    display: flex;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: rgba(5, 5, 5, 0.95);
    border-right: 1px solid #1f1f22;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    gap: 32px;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

/* Logo */
.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md) !important;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-element);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--bg-element);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-element);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.user-display:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    /* Removed radial gradient to show BG image through overlay */
}

.top-bar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: transparent;
    z-index: 10;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.crumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Views */
.view {
    display: none;
    padding: 40px;
    height: 100%;
    overflow-y: auto;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(24, 24, 27, 0.8);
    /* Semi-transparent */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform 0.2s;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-secondary);
}

.stat-label {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: white;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-element);
    border: 1px solid var(--border-color);
    transition: .4s;
    border-radius: 34px !important;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .4s;
    border-radius: 50% !important;
}

input:checked+.slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: white;
}

/* User List (Replaced Table) */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-entry {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1fr 1fr;
    /* Columns for Name, UUID, Status, StaffMods, Action */
    align-items: center;
    width: 100%;
    transition: background 0.2s;
}

.user-entry:hover {
    background: rgba(39, 39, 42, 0.8);
    border-color: var(--text-secondary);
}

.user-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-col.main {
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.user-col.sub {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 12px;
}

.user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-sm.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-sm.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* Cosmetics Grid Fix */
.cosmetics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    /* Smaller cards */
    gap: 24px;
    padding: 24px;
}

/* Cosmetic Card Redesign */
.cosmetic-card {
    background: rgba(24, 24, 27, 0.4);
    /* Glass Background */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 320px;
    /* Fixed Height for Uniformity */
    position: relative;
}

.cosmetic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Preview Area */
.cosmetic-preview {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    /* Subtle Dark Overlay */
    padding: 24px;
    overflow: hidden;
}

.cosmetic-preview img {
    /* Portrait Aspect */
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.cosmetic-card:hover .cosmetic-preview img {
    transform: scale(1.05);
    /* Unified hover scale */
}

/* Info Section */
.cosmetic-info {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    /* Slight tint */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    height: 80px;
    backdrop-filter: blur(5px);
}

.cosmetic-name {
    font-weight: 700;
    color: white;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cosmetic-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge (Top Left) */
.type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    right: auto;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

/* Delete Button (Top Right) */
.btn-delete-item {
    position: absolute;
    top: 0px;
    right: 0px;
    left: auto;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease-in-out;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
}

.cosmetic-card:hover .btn-delete-item {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-delete-item:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Content Sections */
.content-section {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.section-header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

/* Login Page Styles */
.login-body {
    background-color: var(--bg-dark);
    background-image: url('../images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid var(--border-color);
    padding: 48px;
    width: 400px;
    text-align: center;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.login-header {
    margin-bottom: 32px;
}

.login-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: white;
}

.btn-login {
    background: #5865F2;
    /* Discord */
    color: white;
    text-decoration: none;
    display: block;
    padding: 14px;
    border-radius: 12px !important;
    font-weight: 600;
    transition: transform 0.2s;
    border: none;
    font-family: var(--font-main);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: #4752c4;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
}

/* Utility */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: white;
    width: 320px;
    outline: none;
    transition: all 0.2s;
}

.btn-search {
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-create-cosmetic {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pill {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pill:hover {
    background: var(--bg-hover);
    color: white;
}

.btn-pill.active {
    background: var(--bg-element);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.1);
}

.filter-pills {
    display: flex;
    gap: 8px;
}

/* Dashboard Fixed Layout */
/* Dashboard Fixed Layout Generic */
.view.dashboard-layout {
    overflow: hidden !important;
    display: none;
    flex-direction: column;
    padding: 0 !important;
}

.view.dashboard-layout.active {
    display: flex;
}

.dashboard-fixed-top {
    flex: 0 0 auto;
    padding: 32px 40px 24px 40px;
    z-index: 10;
}

.dashboard-scroll-area {
    flex: 1;
    padding: 0 40px 40px 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-scroll-area .content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.dashboard-scroll-area .terminal-container {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: transparent;
    /* Remove container bg to let cards show */
    padding: 1px;
    /* Avoid border collapse issues */
}

/* System Logs Styling */
.log-entry {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.2s;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-secondary);
}

.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.log-time {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.log-type.SENT {
    color: #3b82f6;
}

.log-type.RECEIVED {
    color: #2ecc71;
}

.log-source {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.log-packet {
    color: #eebb00;
    font-family: var(--font-mono);
}

.log-data {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);

    /* Truncation default */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    scrollbar-color: #757575 transparent;
}

/* JSON Formatting */
.fmt-json {
    white-space: pre-wrap;
    /* Show formatting */
    max-height: 200px;
    /* Limit vertical height */
    overflow-y: auto;
    /* Scroll if needed */
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 4px;
    margin-top: 4px;
}

/* Syntax Colors */
.key {
    color: #ff79c6;
}

/* Pink/Purple */
.string {
    color: #f1fa8c;
}

/* Yellow */
.number {
    color: #bd93f9;
}

/* Purple */
.boolean {
    color: #ffb86c;
}

/* Orange */
.null {
    color: #6272a4;
}

/* Gray */

.btn-delete-item {
    background: var(--danger);
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 50%;
    margin: 8px;
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    /* Track background */
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #52525b;
    /* Solid grey thumb */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #71717a;
    /* Lighter on hover */
}

/* Fix double darkening on json blocks */
.fmt-json::-webkit-scrollbar-track {
    background: transparent;
}

/* Generic Panel Scroll Helper */
.panel-scroll-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    /* Important for flex scroll */
}

/* Standalone Layout (No Top Stats) */
.dashboard-scroll-area.standalone {
    padding-top: 40px;
}

/* User Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: fit-content;
}

.status-indicator.online {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.1);
}

.status-indicator.offline {
    background: rgba(39, 39, 42, 0.5);
    color: #71717a;
    border: 1px solid #27272a;
}

/* Old Cape Preview Logic */
.type-cape .texture-container {
    width: 80px;
    height: 128px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: capeFloat 4s ease-in-out infinite;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent backing */
    backdrop-filter: blur(4px);
}

.type-cape .texture-container img {
    position: absolute;
    width: 512px !important;
    height: 256px !important;
    left: -8px;
    top: -8px;
    image-rendering: pixelated;
    object-fit: fill !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
}

.type-wings .texture-container {
    width: 160px;
    height: 128px;
    /* Transparent container for floating effect */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: capeFloat 4s ease-in-out infinite;
    animation-delay: 1s;
    /* Offset from capes for variety */
    position: relative;
    overflow: hidden;
    /* Essential for crop */
}

.type-wings .texture-container img {
    /* Crop to bottom-left quadrant */
    width: 250% !important;
    height: auto !important;
    position: absolute;
    left: 0;
    bottom: 0;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    transform: none !important;
}

/* Hold to Confirm Modal (Restyled) */
.hold-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Lighter dim */
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hold-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hold-container {
    background: rgba(24, 24, 27, 0.9);
    /* Dark Glass */
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg, 12px);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hold-overlay.active .hold-container {
    transform: scale(1);
}

/* ... headers ... */
.hold-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.warning-icon {
    width: 48px;
    height: 48px;
    color: var(--danger);
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.3));
}

#hold-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-hold {
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-md, 8px);
    transition: border-color 0.2s;
}

.btn-hold:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.hold-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(220, 38, 38, 0.8);
    /* Red */
    z-index: 1;
    transition: width 0.1s linear;
    /* Smooth fill controlled by JS timer steps? Actually JS sets holding class which does transition */
    /* JS sets .holding. Wait, old JS had transition on class. */
}

/* Revert transition here to match old JS logic which relies on CSS transition? */
/* Old CSS: transition: width 1.5s linear; */
.hold-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--danger);
    z-index: 1;
    transition: width 1.5s linear;
}

.btn-hold.holding .hold-progress {
    width: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

.btn-cancel-hold {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    opacity: 1;
    transition: all 0.2s;
    margin-top: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel-hold:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Secondary Glassmorphism Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-secondary.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* Modal Backdrops (Restored) */
.modal-overlay,
.modal-overlay-create {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active,
.modal-overlay-create.active {
    opacity: 1;
    pointer-events: auto;
}

/* Generic Modal Content (For Create & User Manage) */
.modal-content {
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg, 12px);
    width: 600px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content,
.modal-overlay-create.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    color: white;
}

.modal-close,
.modal-close-create {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover,
.modal-close-create:hover {
    color: white;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

/* Form Styles Restyled */
.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.file-input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    color: white;
    font-family: inherit;
    border-radius: var(--radius-md, 6px);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input[type="text"]:focus,
select:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.file-input {
    padding: 16px;
    text-align: center;
    border-style: dashed;
}

.file-input:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: black;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md, 6px);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-action:hover {
    opacity: 0.9;
}

@keyframes capeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes wingsPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* User Manage Modal Legacy Components (Modernized) */
.user-info-block {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-row .mono {
    font-family: var(--font-mono);
    color: white;
}

.rank-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cosmetics-section {
    margin-top: 40px;
    /* Added spacing as requested */
}

.cosmetics-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    /* Moved closer to search box */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rank-controls {
    display: flex;
    gap: 12px;
}

.rank-select {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    /* Removed border */
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm, 6px);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    /* Remove default arrow to style custom if needed, or keep for simplicity */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.rank-select:focus {
    background-color: rgba(0, 0, 0, 0.4);
}

.rank-select option {
    background-color: #18181b;
    /* Matching modal background */
    color: white;
    padding: 12px;
    font-family: sans-serif;
    /* Options often ignore mono font in some browsers */
}

/* Cosmetic Lists in Modal */
.cosmetics-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input-small {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    /* Removed border */
    padding: 10px 14px;
    border-radius: var(--radius-sm, 6px);
    color: white;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-small:focus {
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-group {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm, 6px);
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-filter {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-filter:hover {
    color: white;
}

.btn-filter.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cosmetic-lists {
    display: flex;
    gap: 50px;
}

.cosmetic-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cosmetic-col h4 {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scroll-list {
    height: 240px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md, 8px);
    scrollbar-color: #757575 transparent;
}

/* Scrollbar styling for modal lists */
.scroll-list::-webkit-scrollbar {
    width: 6px;
}

.scroll-list::-webkit-scrollbar-track {
    background: transparent;
    /* Transparent background as requested */
    border-radius: 4px;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: #757575;
    /* Specific color #757575 */
    border-radius: 10px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
    background: #909090;
}

.list-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: white;
}

.list-item:last-child {
    border-bottom: none;
}

.btn-xs {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-xs:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-xs.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-xs.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.btn-xs.success {
    color: var(--success);
    border-color: rgba(46, 204, 113, 0.2);
}

.btn-xs.success:hover {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--success);
}
