/* ============ THEME VARIABLES ============ */
:root {
    --bg-1: #0b132b;
    --bg-2: #1c2541;
    --bg-3: #1a3a52;
    --surface: rgba(28, 37, 65, 0.7);
    --surface-2: rgba(11, 19, 43, 0.85);
    --surface-3: rgba(11, 19, 43, 0.6);
    --border: rgba(72, 202, 228, 0.2);
    --border-strong: rgba(72, 202, 228, 0.4);
    --text: #e0fbfc;
    --text-dim: rgba(224, 251, 252, 0.7);
    --text-muted: rgba(224, 251, 252, 0.5);
    --accent: #48cae4;
    --accent-2: #ff9e00;
    --accent-3: #ff6d00;
    --danger: #ff5252;
    --success: #69f0ae;
    --warning: #ffc107;
    --topbar-bg: rgba(11, 19, 43, 0.75);
    --scroll-track: rgba(11, 19, 43, 0.7);
    --scroll-thumb-start: #3a7ca5;
    --scroll-thumb-end: #6a4c93;
    --scroll-thumb-hover-start: #48cae4;
    --scroll-thumb-hover-end: #8e6fb8;
    --sb-size: 12px;
}

[data-theme="light"] {
    --bg-1: #e8eef5;
    --bg-2: #f0f4f8;
    --bg-3: #d9e4ec;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-2: rgba(255, 255, 255, 0.95);
    --surface-3: rgba(255, 255, 255, 0.85);
    --border: rgba(72, 202, 228, 0.35);
    --border-strong: rgba(72, 202, 228, 0.55);
    --text: #0b132b;
    --text-dim: rgba(11, 19, 43, 0.75);
    --text-muted: rgba(11, 19, 43, 0.55);
    --accent: #0077b6;
    --accent-2: #e67e00;
    --accent-3: #d35400;
    --danger: #d32f2f;
    --success: #2e7d32;
    --warning: #f9a825;
    --topbar-bg: rgba(255, 255, 255, 0.85);
    --scroll-track: rgba(200, 210, 220, 0.8);
    --scroll-thumb-start: #5b8fbb;
    --scroll-thumb-end: #7a5cae;
    --scroll-thumb-hover-start: #0077b6;
    --scroll-thumb-hover-end: #9a7bc4;
}

/* ============ RESET ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

body:has(.auth-wrapper) {
    overflow: hidden;
}

/* ============ BG BLUR ============ */
.bg-blur {
    position: fixed;
    inset: 0;
    background-image: url("/static/fon.png");
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.45);
    transform: scale(1.1);
    z-index: -2;
    pointer-events: none;
    transition: filter 0.3s;
}

[data-theme="light"] .bg-blur {
    filter: blur(20px) brightness(1.1) saturate(0.9);
}

/* ============ TOPBAR ============ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.5rem;
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    transition: background 0.3s, border-color 0.3s;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon-img {
    width: 32px;
    height: 32px;
    display: block;
    filter: drop-shadow(0 0 8px rgba(72, 202, 228, 0.6));
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #48cae4, #ff9e00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(72, 202, 228, 0.1);
    color: var(--text);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(72, 202, 228, 0.18), rgba(255, 158, 0, 0.1));
    color: var(--text);
}

.nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-label {
    flex-shrink: 0;
}

.nav-badge {
    background: linear-gradient(90deg, #ff9e00, #ff6d00);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    line-height: 1.3;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.theme-toggle {
    background: rgba(72, 202, 228, 0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.18s;
}

.theme-toggle:hover {
    background: rgba(72, 202, 228, 0.2);
    transform: translateY(-2px);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    transition: background 0.18s;
}

.topbar-user:hover {
    background: rgba(72, 202, 228, 0.1);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    image-rendering: pixelated;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-name {
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info .group-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    align-self: flex-start;
}

.logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s;
}

.logout-link:hover {
    background: rgba(255, 82, 82, 0.15);
    color: var(--danger);
}

/* ============ CONTENT ============ */
.content {
    flex: 1;
    padding: 5.5rem 2rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* ============ HERO ============ */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #48cae4, #ff9e00, #ff6d00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ============ FEATURES ============ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 158, 0, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(72, 202, 228, 0.15);
}

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.feature-card h3 {
    color: var(--accent-2);
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============ SERVERS BLOCK ============ */
.servers-block {
    margin: 3rem 0;
}

.servers-block h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.servers-intro {
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.server-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.server-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 158, 0, 0.45);
}

.server-icon {
    font-size: 2rem;
}

.server-card h3 {
    color: var(--accent-2);
    font-size: 1.1rem;
}

.server-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.server-status {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(76, 175, 80, 0.18);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.45);
}

.server-status.soon {
    background: rgba(255, 193, 7, 0.18);
    color: var(--warning);
    border-color: rgba(255, 193, 7, 0.45);
}

.server-card-soon {
    opacity: 0.85;
    border-style: dashed;
}

.servers-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.servers-note a {
    color: var(--accent);
    text-decoration: none;
}

.servers-note a:hover {
    text-decoration: underline;
}

/* ============ ABOUT PAGE ============ */
.about-intro {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 1.02rem;
    text-align: center;
}

.servers-detail h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.mode-card {
    display: flex;
    gap: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.mode-card:hover {
    border-color: rgba(255, 158, 0, 0.45);
}

.mode-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.mode-body h3 {
    color: var(--accent-2);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.mode-body p {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.95rem;
}

.mode-card-soon {
    opacity: 0.85;
    border-style: dashed;
}

.team {
    margin: 3rem 0;
}

.team h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.team-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.team-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 158, 0, 0.5);
}

.team-avatar-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.3);
}

.team-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.team-card h3 {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.team-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 158, 0, 0.18);
    color: var(--accent-2);
    border: 1px solid rgba(255, 158, 0, 0.4);
}

/* ============ CTA ============ */
.cta {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(72, 202, 228, 0.1), rgba(255, 158, 0, 0.1));
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-top: 2rem;
}

.cta h2 {
    color: var(--accent-2);
    margin-bottom: 0.6rem;
    font-size: 1.8rem;
}

.cta p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

/* ============ BUTTONS ============ */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #ff9e00, #ff6d00);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 109, 0, 0.45);
}

.btn-primary.big {
    padding: 14px 36px;
    font-size: 1.1rem;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-secondary {
    display: block;
    padding: 10px 16px;
    background: rgba(72, 202, 228, 0.1);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.6rem;
    transition: background 0.18s, transform 0.18s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(72, 202, 228, 0.2);
    transform: translateY(-2px);
}

.btn-secondary.danger {
    color: var(--danger);
    border-color: rgba(255, 82, 82, 0.4);
    background: rgba(255, 82, 82, 0.08);
}

.btn-secondary.danger:hover {
    background: rgba(255, 82, 82, 0.18);
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid #ff5252;
    color: #ff8a80;
}

.alert-success {
    background: rgba(0, 255, 128, 0.12);
    border: 1px solid #69f0ae;
    color: #69f0ae;
}

/* ============ AUTH PAGES ============ */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
}

.auth-card {
    background: var(--surface-2);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card .logo h1 {
    font-size: 1.6rem;
    background: linear-gradient(90deg, #48cae4, #ff9e00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

[data-theme="light"] .input-group input {
    background: rgba(255, 255, 255, 0.7);
}

.input-group input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 10px rgba(255, 158, 0, 0.4);
}

.switch-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.switch-link a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
}

.switch-link a:hover {
    text-decoration: underline;
}

.switch-link.forgot {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ============ SOCIAL LOGIN ============ */
.social-login {
    margin-top: 1.5rem;
    text-align: center;
}

.social-divider {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
    cursor: pointer;
}

.social-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.social-btn.google:hover {
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
}

.social-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.social-btn svg {
    display: block;
}

/* ============ START PAGE ============ */
.download-block {
    text-align: center;
    margin: 2rem 0 3rem;
}

.download-btn {
    font-size: 1.2rem;
    padding: 16px 44px;
    display: inline-block;
}

.download-note {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 158, 0, 0.45);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.info-card h3 {
    color: var(--accent-2);
    margin-bottom: 0.9rem;
    font-size: 1.1rem;
}

.info-card ul,
.info-card ol {
    padding-left: 1.2rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-card a {
    color: var(--accent);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

.muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============ SUPPORT ============ */
.support-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .support-layout {
        grid-template-columns: 1fr;
    }
}

select,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.7);
}

select:focus,
textarea:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 10px rgba(255, 158, 0, 0.4);
}

textarea {
    resize: vertical;
}

.ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.ticket-row:hover {
    transform: translateX(4px);
    border-color: rgba(255, 158, 0, 0.5);
    background: var(--surface-2);
}

.ticket-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ticket-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-open,
.status-progress {
    background: rgba(255, 193, 7, 0.18);
    color: var(--warning);
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.status-resolved {
    background: rgba(76, 175, 80, 0.18);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.45);
}

.status-rejected {
    background: rgba(255, 82, 82, 0.18);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.45);
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

.ticket-detail h2 {
    color: var(--text);
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ticket-type {
    padding: 3px 10px;
    background: rgba(72, 202, 228, 0.15);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    color: var(--accent);
    font-weight: 600;
}

.ticket-date {
    margin-left: auto;
}

.ticket-body {
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.ticket-response {
    margin-top: 1.2rem;
    background: linear-gradient(135deg, rgba(72, 202, 228, 0.08), rgba(255, 158, 0, 0.08));
    border: 1px solid rgba(255, 158, 0, 0.35);
    border-radius: 12px;
    padding: 1.2rem;
}

.ticket-response h4 {
    color: var(--accent-2);
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.ticket-response p {
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ticket-row-main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

.ticket-author {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
}

.responder-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.responder-name {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
}

.ticket-edit-block {
    margin-top: 1.5rem;
    background: rgba(255, 158, 0, 0.06);
    border: 1px solid rgba(255, 158, 0, 0.35);
    border-radius: 12px;
    padding: 1.4rem;
}

.ticket-edit-block h4 {
    color: var(--accent-2);
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

/* ============ GROUP BADGE ============ */
.group-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============ SHOP ============ */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.wallet-box {
    background: var(--surface);
    border: 1px solid rgba(255, 158, 0, 0.4);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.wallet-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.wallet-row strong {
    color: var(--accent-2);
    font-weight: 700;
}

.shop-section {
    margin-top: 2.5rem;
}

.shop-section h2 {
    color: var(--accent-2);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

.shop-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.shop-card-header {
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: center;
}

.shop-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.shop-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    min-height: 2.5em;
    white-space: pre-line;
}

.shop-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    text-align: center;
}

.gold-card {
    background: var(--surface);
    border: 1px solid rgba(255, 158, 0, 0.35);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 640px;
}

.gold-info {
    margin-bottom: 1.2rem;
    color: var(--text-dim);
    white-space: pre-line;
}

.gold-info p {
    margin-bottom: 0.4rem;
}

.gold-slider-row {
    margin-bottom: 1rem;
}

.gold-slider-row input[type="range"] {
    width: 100%;
    accent-color: #ff9e00;
    height: 8px;
    cursor: pointer;
}

.gold-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.gold-summary strong {
    color: var(--accent-2);
}

/* ============ ADMIN SHOP ============ */
.admin-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
}

.admin-item-card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.item-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.4rem;
}

.switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}

.switch input {
    accent-color: #ff9e00;
    cursor: pointer;
}

.admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

/* ============ PASSWORD TOGGLE ============ */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    width: 100%;
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 19, 43, 0.55);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, box-shadow 0.18s;
    backdrop-filter: blur(2px);
}

.toggle-password:hover {
    background: rgba(72, 202, 228, 0.35);
    box-shadow: 0 0 0 1px rgba(72, 202, 228, 0.6);
}

.toggle-password.active {
    background: rgba(11, 19, 43, 0.75);
}

.eye-icon {
    width: 20px;
    height: 20px;
    display: block;
    filter: invert(1) brightness(1.6);
    transition: filter 0.18s;
}

.toggle-password.active .eye-icon {
    filter: invert(0.55) sepia(1) saturate(8) hue-rotate(1deg) brightness(1.1);
}

/* ============ PROFILE ============ */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-main {
    grid-column: span 1;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.profile-username {
    color: var(--text);
    font-size: 1.5rem;
    margin: 0;
}

.profile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.profile-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-value {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    text-align: right;
}

.profile-value.mono {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.verify-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.verify-badge.verified {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.45);
}

.verify-badge.unverified {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-2);
    border: 1px solid rgba(255, 152, 0, 0.45);
}

.wallet-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

.wallet-stat strong {
    color: var(--accent-2);
    font-size: 1.15rem;
}

/* ============ SKIN SECTION ============ */
.skin-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.skin-viewer-wrap {
    position: relative;
    padding: 10px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    box-shadow:
        0 0 0 1px rgba(192, 38, 211, 0.25) inset,
        0 0 24px rgba(72, 202, 228, 0.15),
        0 0 48px rgba(192, 38, 211, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
}

.skin-viewer-wrap::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, #ff9e00, #c026d3, #48cae4);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.75;
}

.skin-viewer-wrap canvas {
    display: block;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 40%, rgba(72, 202, 228, 0.12), transparent 70%);
}

.skin-controls {
    flex: 1;
    min-width: 260px;
}

.skin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.skin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 0.6rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
    font-family: inherit;
    color: #fff;
    line-height: 1.1;
    text-align: center;
}

.skin-btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.skin-btn.primary {
    background: linear-gradient(90deg, #ff9e00, #ff6d00);
    box-shadow: 0 4px 14px rgba(255, 109, 0, 0.25);
}

.skin-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 109, 0, 0.4);
}

.skin-btn.danger {
    background: rgba(255, 82, 82, 0.12);
    border-color: rgba(255, 82, 82, 0.45);
    color: #ff8a80;
}

.skin-btn.danger:hover {
    background: rgba(255, 82, 82, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 82, 82, 0.25);
}

.skin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.skin-hint {
    margin-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ============ ACCORDION ============ */
summary.btn-secondary {
    display: block;
    padding: 10px 16px;
    background: rgba(72, 202, 228, 0.1);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--accent);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.18s;
    margin-bottom: 0.6rem;
    cursor: pointer;
    list-style: none;
}

summary.btn-secondary:hover {
    background: rgba(72, 202, 228, 0.2);
}

summary.btn-secondary::-webkit-details-marker {
    display: none;
}

/* ============ NOTIFICATIONS ============ */
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.notif-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.notif-item-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 3rem 0.9rem 1.1rem;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    flex: 1;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.notif-item:hover {
    transform: translateX(4px);
    border-color: rgba(255, 158, 0, 0.5);
    background: var(--surface-2);
}

.notif-item.unread {
    border-left: 3px solid #ff9e00;
    background: rgba(255, 158, 0, 0.06);
}

.notif-item-main {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.notif-body {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.notif-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-delete {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}

.notif-item-wrap:hover .notif-delete {
    opacity: 1;
}

.notif-delete:hover {
    background: rgba(255, 82, 82, 0.18);
    border-color: rgba(255, 82, 82, 0.5);
    color: var(--danger);
    transform: translateY(-50%) scale(1.1);
}

/* ============ HELPERS ============ */
.info-card,
.ticket-detail,
.ticket-row,
.notif-item {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

#response-wrapper {
    transition: opacity 0.18s;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.status-badge.seasonal {
    background: rgba(76, 175, 80, 0.18);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.45);
}

.status-badge.holiday {
    background: rgba(255, 82, 82, 0.18);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.45);
}

/* ============ NEWS FEED ============ */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.4rem 1.6rem;
    transition: border-color 0.2s, transform 0.2s;
}

.news-card:hover {
    border-color: rgba(255, 158, 0, 0.4);
    transform: translateY(-2px);
}

.news-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.news-author {
    color: var(--text-dim);
}

.news-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.news-card-title {
    text-decoration: none;
    color: var(--text);
}

.news-card-title h2 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    transition: color 0.2s;
}

.news-card-title:hover h2 {
    color: var(--accent-2);
}

.news-card-preview {
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-line;
}

.news-card-footer {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.news-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
}

.news-action:hover {
    background: rgba(72, 202, 228, 0.12);
    color: var(--accent);
}

.news-action.like-btn.active {
    color: var(--danger);
}

.news-action.muted {
    color: var(--text-muted);
    cursor: default;
}

.news-action.muted:hover {
    background: transparent;
}

.news-action.danger {
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.4);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.news-action.danger:hover {
    background: rgba(255, 82, 82, 0.15);
    color: #ff8a80;
    border-color: rgba(255, 82, 82, 0.6);
}

/* ============ NEWS POST ============ */
.news-post {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.news-post-content {
    color: var(--text);
    line-height: 1.7;
    font-size: 1.02rem;
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
}

.news-post-actions {
    display: flex;
    gap: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============ COMMENTS TREE ============ */
.comment-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-tree > .comment-item {
    margin-bottom: 0.8rem;
}

.comment-item {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    position: relative;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.comment-author {
    color: var(--text-dim);
    font-weight: 600;
}

.comment-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.comment-body {
    color: var(--text);
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin-bottom: 0.5rem;
}

.comment-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.3rem;
}

.comment-actions .news-action {
    font-size: 0.85rem;
    padding: 2px 6px;
}

.reply-form {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.comment-children {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0 0 1.5rem;
    border-left: 2px solid rgba(72, 202, 228, 0.25);
    padding-left: 1rem;
}

.comment-children .comment-children {
    margin-left: 0.8rem;
    padding-left: 0.8rem;
}

/* ============ NEWS CAROUSEL ============ */
.news-carousel {
    position: relative;
    margin: 0.75rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-3);
}

.news-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-carousel-track::-webkit-scrollbar {
    display: none;
}

.news-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
}

.news-carousel.multi .news-carousel-slide {
    flex: 0 0 calc(100% - 40px);
}

.news-carousel-slide img,
.news-carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.news-carousel-slide:hover img,
.news-carousel-slide:hover video {
    transform: scale(1.02);
}

.news-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(11, 19, 43, 0.7);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}

.news-carousel:hover .news-carousel-btn {
    opacity: 1;
}

.news-carousel-btn:hover {
    background: rgba(72, 202, 228, 0.6);
}

.news-carousel-btn.prev {
    left: 10px;
}

.news-carousel-btn.next {
    right: 10px;
}

.news-carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(11, 19, 43, 0.75);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 1;
}

.news-carousel-slide.more img,
.news-carousel-slide.more video {
    filter: blur(6px) brightness(0.6);
    transform: scale(1.05);
}

.attachment-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 2;
}

/* ============ VIEWER MODAL ============ */
.viewer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.viewer-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-content img,
.viewer-content video {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.viewer-close:hover {
    background: rgba(255, 82, 82, 0.6);
}

.viewer-prev,
.viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-prev {
    left: 1.5rem;
}

.viewer-next {
    right: 1.5rem;
}

.viewer-prev:hover,
.viewer-next:hover {
    background: rgba(72, 202, 228, 0.4);
}

.viewer-counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

/* ============ EDIT ATTACHMENTS ============ */
.edit-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.edit-attachment-card {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem;
}

.edit-attachment-preview {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
}

.edit-attachment-preview img,
.edit-attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.edit-attachment-controls {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.edit-attachment-controls input[type="number"] {
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
}

.edit-delete-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #ff8a80;
}

/* ============ CUSTOM SCROLLBAR ============ */
* {
    scrollbar-width: thin;
    scrollbar-color: #5b5b9e var(--scroll-track);
}

*::-webkit-scrollbar {
    width: var(--sb-size);
    height: var(--sb-size);
}

*::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 10px;
    margin: 2px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--scroll-thumb-start), var(--scroll-thumb-end));
    border-radius: 10px;
    border: 3px solid var(--scroll-track);
    background-clip: padding-box;
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--scroll-thumb-hover-start), var(--scroll-thumb-hover-end));
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: var(--scroll-track);
}

*::-webkit-scrollbar:horizontal {
    height: var(--sb-size);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .topbar {
        padding: 0.6rem 1rem;
    }
    .topbar-nav .nav-label {
        display: none;
    }
    .topbar-nav .nav-link {
        padding: 0.5rem;
    }
    .topbar-user .user-info {
        display: none;
    }
    .content {
        padding: 5rem 1rem 2rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .mode-card {
        flex-direction: column;
    }
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .viewer-prev,
    .viewer-next {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
    .viewer-prev {
        left: 0.5rem;
    }
    .viewer-next {
        right: 0.5rem;
    }
    .news-carousel-slide {
        aspect-ratio: 4 / 3;
    }
    .news-carousel.multi .news-carousel-slide {
        flex: 0 0 calc(100% - 20px);
    }
    .news-carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    .news-carousel-btn.prev {
        left: 6px;
    }
    .news-carousel-btn.next {
        right: 6px;
    }
    .video-overlay {
        font-size: 1.8rem;
    }
    .attachment-more {
        font-size: 1.5rem;
    }
    .comment-children {
        margin-left: 0.8rem;
        padding-left: 0.6rem;
    }
    .comment-children .comment-children {
        margin-left: 0.4rem;
        padding-left: 0.4rem;
    }
    .skin-actions {
        grid-template-columns: 1fr;
    }
}
.content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    gap: 1rem;
}

.auth-flash-wrap {
    width: 100%;
    max-width: 400px;
}