:root {
    --bg-dark: #07090e;
    --bg-surface: #0e131d;
    --bg-surface-elevated: #151d2c;
    --bg-card: #111723;
    --border: #1e283d;
    --border-highlight: #334360;
    
    --ice-blue: #38bdf8;
    --ice-cyan: #06b6d4;
    --ice-glow: rgba(56, 189, 248, 0.4);
    --ice-bg: rgba(56, 189, 248, 0.1);

    --rust-orange: #ea580c;
    --rust-orange-hover: #f97316;
    --rust-orange-glow: rgba(234, 88, 12, 0.45);
    
    --green-access: #4ade80;
    --green-access-glow: rgba(74, 222, 128, 0.3);
    --green-bg: rgba(74, 222, 128, 0.1);
    
    --yellow-pending: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    
    --red-danger: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Roboto Condensed', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(234, 88, 12, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-highlight);
}

/* Header & Navbar */
.navbar {
    background: rgba(14, 19, 29, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 2rem;
}

.nav-container {
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ice-blue);
    box-shadow: 0 0 15px var(--ice-glow);
    transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.08) rotate(3deg);
}

.logo-text-ice {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #7dd3fc;
    text-shadow: 0 0 15px var(--ice-glow);
}

.logo-text-rust {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f97316;
    text-shadow: 0 0 15px var(--rust-orange-glow);
}

.logo-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--ice-blue);
    color: #38bdf8;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.nav-btn.active {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.server-status-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(14, 16, 21, 0.7);
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.pulse-dot.dot-online { background: var(--green-access); box-shadow: 0 0 10px var(--green-access); }
.pulse-dot.dot-starting { background: var(--yellow-pending); box-shadow: 0 0 10px var(--yellow-pending); }
.pulse-dot.dot-offline { background: var(--red-danger); box-shadow: 0 0 10px var(--red-danger); }

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.admin-toggle-btn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.admin-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Main Content Area */
.main-content {
    flex: 1;
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2.5rem 1rem 4rem;
    position: relative;
}

.hero-emblem-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: 1.5rem;
}

.hero-emblem-img {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ice-blue);
    box-shadow: 
        0 0 35px var(--ice-glow), 
        0 0 65px var(--rust-orange-glow);
    animation: floatEmblem 5s ease-in-out infinite alternate;
}

@keyframes floatEmblem {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-7px) scale(1.02); }
}

.hero-subtitle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--ice-blue);
    color: #7dd3fc;
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 15px var(--ice-glow);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.ice-text {
    color: #7dd3fc;
    text-shadow: 0 0 25px var(--ice-glow);
}

.rust-text {
    color: #f97316;
    text-shadow: 0 0 25px var(--rust-orange-glow);
}

.hero-desc {
    max-width: 740px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.85rem 1.8rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--rust-orange), #a72816);
    color: #fff;
    box-shadow: 0 4px 20px var(--rust-orange-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--rust-orange-hover), #bd321f);
    box-shadow: 0 6px 25px rgba(205, 65, 43, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #252b38;
    border-color: #4f5972;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.45);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-disabled {
    background: #1a1e27 !important;
    border: 1px solid #2e3444 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
    transition: 0.3s;
}

.feature-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
    background: linear-gradient(90deg, transparent, var(--rust-orange), transparent);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Roadmap / Step Section */
.steps-container {
    margin-top: 4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-heading h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.section-heading p {
    color: var(--text-secondary);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    position: relative;
}

.step-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--rust-orange);
    color: var(--rust-orange);
    font-family: var(--font-mono);
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Profile & Launcher Section */
.profile-dashboard {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .profile-dashboard {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.user-card-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--border-highlight);
    margin: 0 auto 0.8rem;
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #2b3242, #181c25);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.avatar-small {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #252b38;
    border: 1px solid var(--border-highlight);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.avatar-upload-label:hover {
    color: var(--text-primary);
    border-color: var(--rust-orange);
    background: rgba(205, 65, 43, 0.1);
}

.download-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.download-item-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.download-item-card:hover {
    border-color: var(--green-access);
    background: rgba(74, 222, 128, 0.03);
}

.user-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
}

.user-meta-row span:first-child {
    color: var(--text-muted);
}

.user-meta-row span:last-child {
    font-weight: 600;
    font-family: var(--font-mono);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-approved {
    background: var(--green-bg);
    border: 1px solid var(--green-access);
    color: var(--green-access);
    box-shadow: 0 0 10px var(--green-access-glow);
}

.badge-pending {
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-pending);
    color: var(--yellow-pending);
}

.badge-rejected {
    background: var(--red-bg);
    border: 1px solid var(--red-danger);
    color: var(--red-danger);
}

.badge-none {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Launcher Download Box (Special Status showcase) */
.launcher-box {
    border-radius: 12px;
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.launcher-box.locked {
    background: #13161e;
    border: 2px dashed #2d3342;
}

.launcher-box.unlocked {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, rgba(18, 20, 26, 0.95) 100%);
    border: 2px solid var(--green-access);
    box-shadow: 0 0 35px var(--green-access-glow);
}

.launcher-box-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.launcher-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.launcher-box.locked .launcher-icon {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
}

.launcher-box.unlocked .launcher-icon {
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid var(--green-access);
    color: var(--green-access);
    box-shadow: 0 0 15px var(--green-access);
}

.token-copy-box {
    margin-top: 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-code {
    font-family: var(--font-mono);
    color: #4ade80;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Form Styling */
.form-card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--rust-orange);
    box-shadow: 0 0 10px var(--rust-orange-glow);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Admin Panel Table & Stats */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    background: var(--bg-dark);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.filter-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab.active {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.search-box {
    position: relative;
    min-width: 280px;
}

.search-box input {
    padding-left: 2.3rem;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: rgba(14, 16, 21, 0.95);
    padding: 1rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.92rem;
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    padding: 2.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Notifications Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    padding: 0.9rem 1.4rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease-out;
}

.toast.toast-success {
    border-color: var(--green-access);
    border-left: 4px solid var(--green-access);
}

.toast.toast-error {
    border-color: var(--red-danger);
    border-left: 4px solid var(--red-danger);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Security Shield Card */
.security-shield-card {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.security-shield-card .shield-icon {
    font-size: 2.2rem;
    line-height: 1;
}

/* Forum Styles */
.forum-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.forum-category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.3rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.forum-category-card:hover {
    border-color: var(--ice-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
}
.forum-category-card.active {
    border-color: var(--ice-blue);
    background: var(--bg-surface-elevated);
}
.forum-topic-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    gap: 1rem;
    flex-wrap: wrap;
}
.forum-topic-item:hover {
    border-color: var(--border-highlight);
    background: var(--bg-surface-elevated);
    transform: translateX(4px);
}
.forum-post-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
}
.forum-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.forum-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.forum-badge-news { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid #ef4444; }
.forum-badge-general { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid #38bdf8; }
.forum-badge-bugs { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid #f59e0b; }
.forum-badge-suggestions { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid #4ade80; }

/* Support Ticket Styles */
.ticket-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem;
    margin-bottom: 1.2rem;
}
.ticket-status-open { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid #f59e0b; }
.ticket-status-resolved { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid #4ade80; }
.ticket-status-closed { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid #64748b; }
.admin-reply-box {
    background: rgba(56, 189, 248, 0.05);
    border-left: 4px solid var(--ice-blue);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
}

/* ==================== Utilities ==================== */
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.text-green { color: var(--green-access); }
.text-amber { color: var(--yellow-pending); }
.text-red { color: var(--red-danger); }
.text-blue { color: #60a5fa; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

a.nav-btn,
a.forum-category-card,
a.forum-topic-item,
a.filter-tab {
    text-decoration: none;
    color: inherit;
}
a.nav-btn { color: var(--text-secondary); }
a.nav-btn.active, a.nav-btn:hover { color: var(--text-primary); }
a.filter-tab { color: var(--text-muted); }
a.filter-tab.active { color: var(--text-primary); }
.nav-btn-admin { color: #f87171 !important; }

.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 0.85rem; font-size: 1.05rem; letter-spacing: 0.5px; }
.btn-pill { padding: 0.4rem 0.8rem; border-radius: 20px; }
.btn-row { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-row-start { justify-content: flex-start; gap: 0.8rem; margin-top: 1.5rem; }

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--rust-orange);
    font-weight: 600;
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-muted { color: var(--text-secondary); font-size: 0.8rem; font-weight: 400; }

/* ==================== Header (mobile menu) ==================== */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
}
.nav-auth { display: flex; gap: 0.5rem; align-items: center; }

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    cursor: pointer;
}
.nav-burger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1300px) {
    .navbar { padding: 0.75rem 1rem; }
    .nav-container { flex-wrap: wrap; }
    .nav-burger { display: flex; }
    .nav-menu {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 0 0.5rem;
        border-top: 1px solid var(--border);
    }
    .nav-open .nav-menu { display: flex; }
    .nav-links { flex-direction: column; align-items: stretch; }
    .nav-btn { justify-content: flex-start; }
    .nav-right { flex-direction: column; align-items: stretch; }
    .server-status-pill { justify-content: center; }
    .nav-auth { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .logo-text-ice, .logo-text-rust { font-size: 1.15rem; }
    .nav-logo .logo-badge { display: none; }
}

/* ==================== Layout ==================== */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
    line-height: 1.15;
}
.page-subtitle { color: var(--text-secondary); }

.section-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
}

.loading, .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.loading { color: var(--text-secondary); }

.center-card {
    text-align: center;
    padding: 3.5rem 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}
.center-card-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.center-card-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.center-card-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    text-transform: uppercase;
}
.card-title-sm { font-size: 1.2rem; margin-bottom: 1rem; }
.card-title-icon { display: flex; align-items: center; gap: 0.6rem; font-size: 1.3rem; margin-bottom: 1rem; }
.card-text { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.card-text-sm { font-size: 0.85rem; }

.info-box {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}
.info-box strong { color: var(--text-muted); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.info-line { margin-top: 0.6rem; }
.info-line:first-child { margin-top: 0; }
@media (max-width: 600px) {
    .info-grid { grid-template-columns: 1fr; }
}

.alert {
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
}
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid var(--yellow-pending); }
.alert-danger { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); }
.alert-danger .alert-title { color: #f87171; }
.alert-title { font-weight: 700; margin-bottom: 0.3rem; }
.alert-body { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.alert-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
}
.alert-row-main { display: flex; align-items: center; gap: 0.9rem; }
.alert-icon { font-size: 1.6rem; }

/* ==================== Home ==================== */
.feature-icon-tag { font-size: 1.5rem; font-family: var(--font-mono); font-weight: 700; }
.tag-orange { color: var(--rust-orange); }
.tag-blue { color: #60a5fa; }
.tag-amber { color: #f59e0b; }
.tag-green { color: var(--green-access); }

@media (max-width: 700px) {
    .hero-title { font-size: 2.2rem; letter-spacing: 1px; }
    .hero-desc { font-size: 1rem; }
    .hero-emblem-img { width: 130px; height: 130px; }
    .steps-container { padding: 1.5rem; }
    .main-content { padding: 1.5rem 1rem; }
    .page-title { font-size: 1.9rem; }
    .panel-card, .form-card { padding: 1.4rem; }
    .modal-card { padding: 1.5rem; }
    .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
    .features-grid { grid-template-columns: 1fr; }
}

/* ==================== Forms & modals ==================== */
.form-card-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
}
.form-card-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 2rem; }
.form-hint { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 0.3rem; }
.form-actions { margin-top: 1.5rem; }
.form-actions-stack { display: flex; flex-direction: column; gap: 0.8rem; }
.form-actions-end { display: flex; justify-content: flex-end; gap: 0.8rem; flex-wrap: wrap; }
.form-footnote { margin-top: 1.2rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.label-row label { margin-bottom: 0; }
.form-control-locked {
    opacity: 0.85;
    cursor: not-allowed;
    background: #161922;
    color: var(--green-access);
    font-family: var(--font-mono);
    font-weight: 700;
}
.form-control-inline { width: auto; padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.inline-label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.code-input {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    letter-spacing: 6px;
    font-weight: 700;
}
.textarea-lg { min-height: 140px; }
.modal-text { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.5; }
.modal-wide { max-width: 650px; }
.modal-card { max-height: calc(100vh - 3rem); overflow-y: auto; }

.toast-icon { font-size: 1.2rem; }
.toast-hide { opacity: 0; transform: translateX(20px); transition: all 0.3s ease; }

/* ==================== Header user button & roles ==================== */
.role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 1px;
    border: 1px solid;
}
.role-badge-sm { font-size: 0.65rem; }
.role-admin { background: #dc2626; border-color: #ef4444; color: #fff; }
.role-tester { background: #15803d; border-color: #22c55e; color: #fff; }
.role-player { background: #374151; border-color: #4b5563; color: #d1d5db; }

/* ==================== Profile ==================== */
.profile-name { font-family: var(--font-heading); font-size: 1.6rem; margin-top: 0.3rem; }
.profile-email { color: var(--text-muted); font-size: 0.9rem; word-break: break-all; }
.profile-actions { margin-top: 2rem; }
.profile-side { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.user-meta-row { gap: 1rem; }
.user-meta-row span:last-child { text-align: right; word-break: break-word; }

.launcher-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.launcher-text { color: var(--text-secondary); font-size: 0.95rem; }

.server-address-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    padding: 1.1rem;
    margin-bottom: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.server-address-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.server-address-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--green-access);
    font-weight: 700;
    letter-spacing: 1px;
}

.shield-title { color: #38bdf8; font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 0.3rem; text-transform: uppercase; }
.shield-text { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.5; }

.download-card {
    border: 1px solid var(--green-access);
    background: rgba(74, 222, 128, 0.04);
    border-radius: 8px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.download-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.download-title { font-weight: 700; font-size: 1.15rem; color: var(--green-access); display: flex; align-items: center; gap: 0.5rem; }
.download-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.3rem; }
.badge-ready { background: rgba(34, 197, 94, 0.15); border-color: #22c55e; color: var(--green-access); }
.badge-soon { background: var(--yellow-bg); border-color: var(--yellow-pending); color: var(--yellow-pending); }

@media (max-width: 600px) {
    .launcher-box { padding: 1.3rem; }
    .launcher-box-header { flex-direction: column; align-items: flex-start; }
}

/* ==================== Admin ==================== */
.admin-tabs { padding: 6px; }
.toolbar-right { display: flex; align-items: center; gap: 1rem; }
.stat-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stat-amber { background: var(--yellow-bg); color: var(--yellow-pending); }
.stat-green { background: var(--green-bg); color: var(--green-access); }
.stat-red { background: var(--red-bg); color: var(--red-danger); }
.filter-tabs { flex-wrap: wrap; }
.search-box { flex: 1; max-width: 360px; }
@media (max-width: 700px) {
    .search-box { min-width: 0; max-width: none; width: 100%; }
}

.th-right { text-align: right; }
.td-empty { text-align: center; padding: 2.5rem !important; color: var(--text-muted); }
.td-specs { font-size: 0.85rem; max-width: 240px; }
.td-nowrap { white-space: nowrap; }
.td-details { font-size: 0.85rem; max-width: 380px; word-break: break-word; }
.actions-cell { justify-content: flex-end; flex-wrap: wrap; }
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-cell-name { font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.user-cell-email { font-size: 0.75rem; color: var(--text-muted); }

.app-modal-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.5rem; }
.app-modal-name { font-family: var(--font-heading); font-size: 1.4rem; }
.nick-badge {
    font-size: 0.75rem;
    color: var(--green-access);
    border: 1px solid #22c55e;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    vertical-align: middle;
}
.quote-block { margin-bottom: 1.5rem; }
.quote-label { color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
.quote-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.9rem;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.rcon-row { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.console-output {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--green-access);
    min-height: 85px;
    white-space: pre-wrap;
    word-break: break-word;
}
.logs-box {
    background: #08090b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.45;
    color: #d1d5db;
    max-height: 420px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ==================== Pager ==================== */
.pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.5rem 0;
}
.pager-btn {
    min-width: 38px;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font: 600 0.9rem var(--font-main);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.pager-btn:hover { border-color: var(--border-highlight); color: var(--text-primary); }
.pager-btn.active { border-color: var(--rust-orange); color: var(--text-primary); cursor: default; }
.pager-btn.disabled { opacity: 0.4; cursor: default; }
.pager-gap { padding: 0.4rem 0.2rem; color: var(--text-muted); }

/* ==================== Forum ==================== */
.cat-title { font-family: var(--font-heading); font-size: 1.25rem; margin-bottom: 0.3rem; }
.cat-desc { color: var(--text-secondary); font-size: 0.85rem; }
.cat-count { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.forum-topic-item.pinned { border-color: rgba(245, 158, 11, 0.45); }
.topic-main { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.topic-title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.topic-title { font-size: 1.05rem; font-weight: 600; color: #f8fafc; word-break: break-word; }
.topic-meta { font-size: 0.8rem; color: var(--text-muted); }
.topic-meta strong { color: #d1d5db; }
.topic-stats { display: flex; align-items: center; gap: 1.5rem; color: var(--text-muted); font-size: 0.85rem; }
.topic-stat-replies { color: var(--green-access); font-weight: 700; }
.forum-badge-pinned { background: var(--yellow-bg); color: #fbbf24; border: 1px solid #f59e0b; }

.mod-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.forum-post-main { border-left: 4px solid var(--ice-blue); }
.forum-post-header { gap: 1rem; flex-wrap: wrap; }
.post-author-row { display: flex; align-items: center; gap: 0.9rem; }
.post-author { display: flex; align-items: center; gap: 0.5rem; }
.post-date { font-size: 0.8rem; color: var(--text-muted); }
.post-title { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 1rem; color: #fff; word-break: break-word; }
.post-body { color: #d1d5db; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.post-body-sm { font-size: 0.92rem; }
.replies-block { margin: 2.5rem 0 2rem; }
.replies-block > .card-title { margin-bottom: 1rem; }

/* ==================== Support ==================== */
.ticket-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.ticket-head-main { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; min-width: 0; }
.ticket-id { background: #1e293b; color: #94a3b8; border-color: #334155; }
.ticket-title { font-weight: 700; font-size: 1.15rem; color: #fff; word-break: break-word; }
.ticket-cat { font-size: 0.8rem; color: var(--text-muted); }
.ticket-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; word-break: break-word; }
.ticket-meta strong { color: #f8fafc; }
.ticket-body {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.1rem;
    color: #d1d5db;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.6rem;
}
.ticket-date { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 0.4rem; }
.ticket-waiting { margin-top: 0.8rem; font-size: 0.82rem; color: var(--yellow-pending); font-style: italic; }
.admin-reply-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; font-weight: 700; color: #38bdf8; font-size: 0.9rem; }
.admin-reply-text { color: #e2e8f0; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

.ticket-admin-card { margin-bottom: 1.5rem; }
.ticket-admin-open { border-left: 4px solid #f59e0b; }
.ticket-admin-done { border-left: 4px solid #22c55e; }
.ticket-reply-form {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1rem;
}
.ticket-reply-form textarea { min-height: 80px; margin-bottom: 0.8rem; }
.ticket-reply-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; color: #38bdf8; }
.ticket-reply-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }

/* ==================== Footer ==================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    background: rgba(10, 11, 14, 0.9);
    margin-top: 4rem;
}
.site-footer-inner {
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.site-footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.site-footer-brand img { border-radius: 50%; object-fit: cover; }
.site-footer-ip { color: var(--text-secondary); }

/* ==================== Chart palette (validated against the dark surface) ==================== */
:root {
    --chart-a: #0284c7;   /* columns: sign-ups, applications */
    --chart-b: #16a34a;   /* lines: TPS, online */
}

/* ==================== Notifications ==================== */
.notif-wrap { position: relative; }
.notif-bell {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    cursor: pointer;
}
.notif-bell:hover { border-color: var(--ice-blue); }
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--red-danger);
    color: #fff;
    font: 700 0.7rem/20px var(--font-main);
    text-align: center;
    border: 2px solid var(--bg-surface);
}
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, calc(100vw - 2rem));
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 200;
    overflow: hidden;
}
.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
}
.notif-title { font-family: var(--font-heading); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.5px; }
.notif-list { max-height: min(420px, 70vh); overflow-y: auto; }
.notif-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.4;
}
.notif-item:hover { background: var(--bg-surface-elevated); color: var(--text-primary); }
.notif-item.unread { color: var(--text-primary); border-left: 3px solid var(--ice-blue); }
.notif-date { font-size: 0.75rem; color: var(--text-muted); }
.notif-empty { padding: 1.5rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 1300px) {
    .nav-menu { order: 10; }
    .notif-wrap { margin-left: auto; }
    /* the bell is not at the edge here (the burger is), so the panel spans the window instead */
    .notif-panel { position: fixed; top: 4.4rem; left: 1rem; right: 1rem; width: auto; }
}

/* ==================== Player profile & links ==================== */
.user-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border-highlight); }
.user-link:hover { color: var(--ice-blue); border-bottom-color: var(--ice-blue); }

.player-card { margin-bottom: 1.5rem; }
.player-head { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.player-head .avatar-large { margin: 0; }
.player-head-main { flex: 1; min-width: 200px; }
.player-head-main .page-title { word-break: break-all; text-transform: none; }
.player-badges { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.3rem 0 0.5rem; }
.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.link-list { display: flex; flex-direction: column; }
.link-list-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-decoration: none;
}
.link-list-item:hover .link-list-title { color: var(--ice-blue); }
.link-list-title { font-weight: 600; word-break: break-word; }
.link-list-meta { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; }

/* ==================== Forum search ==================== */
.forum-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}
.forum-search-box { flex: 1; min-width: 220px; max-width: none; }
@media (max-width: 700px) {
    .forum-search .form-control-inline { flex: 1; }
}

/* ==================== Dashboard ==================== */
.stat-sub { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.2rem; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-baseline { stroke: var(--border-highlight); stroke-width: 1; }
.chart-axis { fill: var(--text-muted); font: 11px var(--font-main); font-variant-numeric: tabular-nums; }
.chart-value { fill: var(--text-primary); font: 600 12px var(--font-main); }
.chart-col { fill: var(--chart-a); }
.chart-bar { outline: none; cursor: default; }
.chart-bar:hover .chart-col, .chart-bar:focus .chart-col { fill: #0ea5e9; }
.chart-bar:focus-visible .chart-hit-area { stroke: var(--ice-blue); stroke-width: 1; }
.chart-hit-area { fill: transparent; }
.chart-line { fill: none; stroke: var(--chart-b); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--chart-b); fill-opacity: 0.1; stroke: none; }
.chart-dot { fill: var(--chart-b); stroke: var(--bg-surface); stroke-width: 2; }
.chart-cross { stroke: var(--text-muted); stroke-width: 1; }
.chart-empty { padding: 3rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.chart-tip {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8rem;
}
.chart-tip strong { font-size: 1rem; color: var(--text-primary); }
.chart-tip span { color: var(--text-secondary); }

.chart-table { margin-top: 0.6rem; font-size: 0.85rem; }
.chart-table summary { cursor: pointer; color: var(--text-muted); }
.chart-table table { margin-top: 0.5rem; }
.chart-table th, .chart-table td { padding: 0.35rem 0.6rem; font-variant-numeric: tabular-nums; }
.table-compact th, .table-compact td { padding: 0.55rem 0.8rem; font-size: 0.85rem; }

.meter-row { margin-top: 1rem; }
.meter-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.35rem; font-size: 0.88rem; }
.meter-label { color: var(--text-secondary); }
.meter-value { font-family: var(--font-mono); font-size: 0.82rem; }
.meter { height: 8px; border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 4px; }
.meter-ok { background: rgba(2, 132, 199, 0.18); }
.meter-ok .meter-fill { background: var(--chart-a); }
.meter-warn { background: rgba(245, 158, 11, 0.18); }
.meter-warn .meter-fill { background: var(--yellow-pending); }
.meter-danger { background: rgba(239, 68, 68, 0.18); }
.meter-danger .meter-fill { background: var(--red-danger); }
.meter-status { font-size: 0.75rem; margin-top: 0.3rem; color: var(--text-muted); }
.meter-status-warn { color: var(--yellow-pending); }
.meter-status-danger { color: var(--red-danger); }
.meter-w-0 { width: 0; } .meter-w-5 { width: 5%; } .meter-w-10 { width: 10%; } .meter-w-15 { width: 15%; }
.meter-w-20 { width: 20%; } .meter-w-25 { width: 25%; } .meter-w-30 { width: 30%; } .meter-w-35 { width: 35%; }
.meter-w-40 { width: 40%; } .meter-w-45 { width: 45%; } .meter-w-50 { width: 50%; } .meter-w-55 { width: 55%; }
.meter-w-60 { width: 60%; } .meter-w-65 { width: 65%; } .meter-w-70 { width: 70%; } .meter-w-75 { width: 75%; }
.meter-w-80 { width: 80%; } .meter-w-85 { width: 85%; } .meter-w-90 { width: 90%; } .meter-w-95 { width: 95%; }
.meter-w-100 { width: 100%; }

.error-list { display: flex; flex-direction: column; gap: 0.5rem; }
.error-item { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-dark); }
.error-item summary {
    cursor: pointer;
    padding: 0.65rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.85rem;
    word-break: break-word;
}
.error-item .logs-box { margin: 0 0.9rem 0.9rem; max-height: 300px; }

/* Header width. A logged-in admin's header (6 links, status, user, logout, bell) needs ~1750px at full size,
   so between the burger breakpoint and 1840px it is compacted, and only wider screens get the roomy version. */
.nav-btn, .nav-logo, .server-status-pill, .nav-auth .btn { white-space: nowrap; flex-shrink: 0; }
@media (min-width: 1301px) and (max-width: 1840px) {
    .navbar { padding: 0.85rem 1rem; }
    .nav-logo .logo-text, .nav-logo .logo-badge { display: none; }
    .nav-btn { padding: 0.5rem 0.5rem; font-size: 0.88rem; }
    .nav-container, .nav-menu, .nav-right { gap: 0.7rem; }
    .server-status-pill .status-extra { display: none; }
    #user-profile-btn .role-badge { display: none; }
}
@media (min-width: 1841px) {
    .nav-container { max-width: 1760px; }
}
