/* teamspeak.css – xTeamSpeak Page */

/* Wrapper */

.xts-wrapper
{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */

.xts-header
{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 32px 0;
    margin-bottom: 36px;
}

.xts-brand-link
{
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: opacity var(--transition);
}

.xts-brand-link:hover { opacity: 0.8; }

.xts-brand-title
{
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    white-space: nowrap;
}

.xts-accent { color: var(--accent); }

.xts-brand-tagline
{
    font-size: 0.65rem;
    color: var(--text-subtle);
    font-family: var(--font-mono);
    margin-top: 4px;
    letter-spacing: 0.06em;
}

/* Main */

.xts-main
{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 32px 3rem;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Card row */

.xts-card-row
{
    display: flex;
    width: 100%;
    align-items: stretch;
}

.xts-right-col
{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

/* Stats row — description takes remaining space, online stays compact */

.xts-stats-row
{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: stretch;
}

/* Shared stat box */

.xts-stat-box
{
    background: rgba(12, 9, 22, 0.84);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow), 0 0 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Online box — fixed width, same padding as description, content centered */

.xts-stat-box--online
{
    width: 220px;
    flex-shrink: 0;
    position: relative;
}

.xts-online-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xts-online-body
{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 8px 0;
}

/* TS uses cyan instead of Discord green */

.xts-online-dot
{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #57c4e4;
    box-shadow: 0 0 8px rgba(87, 196, 228, 0.7);
    animation: xts-pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes xts-pulse
{
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(87, 196, 228, 0.7); }
    50%       { opacity: 0.5; box-shadow: 0 0 4px rgba(87, 196, 228, 0.3); }
}

.xts-online-count
{
    font-size: 1.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
    line-height: 1;
}

.xts-online-text
{
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.xts-stat-label
{
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-bottom: 6px;
}

/* Description text */

.xts-desc-text
{
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.75;
    flex: 1;
}

/* Tags */

.xts-desc-tags
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.xts-tag
{
    font-size: 0.72rem;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 0.5px solid rgba(232, 99, 122, 0.25);
    color: var(--text-muted);
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    cursor: default;
}

.xts-tag:hover
{
    border-color: rgba(232, 99, 122, 0.6);
    color: var(--text-primary);
    background: rgba(232, 99, 122, 0.15);
}

/* Panels row — perks left, channel-overview right */

.xts-panels-row
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: stretch;
}

/* Shared panel style */

.xts-perks-card,
.xts-members-card
{
    background: rgba(12, 9, 22, 0.84);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow), 0 0 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Channel-overview card — height locked to perks card, scroll inside */

.xts-members-card
{
    overflow: hidden;
}

.xts-panel-title
{
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-subtle);
    margin-bottom: 16px;
    flex-shrink: 0;
}

/* Perks */

.xts-perk
{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.xts-perk:last-child
{
    border-bottom: none;
    padding-bottom: 0;
}

.xts-perk-icon
{
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.xts-perk-icon--pink  { background: var(--accent-soft); border: 0.5px solid rgba(232, 99, 122, 0.25); }
.xts-perk-icon--blue  { background: rgba(88, 101, 242, 0.12); border: 0.5px solid rgba(88, 101, 242, 0.2); }
.xts-perk-icon--green { background: rgba(107, 207, 158, 0.12); border: 0.5px solid rgba(107, 207, 158, 0.2); }

.xts-perk-text strong
{
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.xts-perk-text span
{
    font-size: 0.78rem;
    color: var(--text-subtle);
    line-height: 1.5;
}

/* Channel scroll list (inside members-card) */

.xts-channel-scroll
{
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.xts-channel-scroll::-webkit-scrollbar { width: 4px; }
.xts-channel-scroll::-webkit-scrollbar-track { background: transparent; }
.xts-channel-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

.xts-channels-loading,
.xts-channels-empty
{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--text-subtle);
    font-family: var(--font-mono);
    padding: 12px 0;
}

/* Channel group */

.xts-ch-group
{
    display: flex;
    flex-direction: column;
}

/* Channel header row */

.xts-ch-header
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: background var(--transition), border-color var(--transition);
    user-select: none;
}

.xts-ch-header.xts-ch-clickable
{
    cursor: pointer;
}

.xts-ch-header.xts-ch-clickable:hover
{
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

.xts-ch-header.xts-ch-has-users
{
    border-color: rgba(232, 99, 122, 0.22);
}

.xts-ch-icon
{
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.xts-ch-icon--pink  { background: var(--accent-soft); border: 0.5px solid rgba(232, 99, 122, 0.25); }
.xts-ch-icon--blue  { background: rgba(88, 101, 242, 0.12); border: 0.5px solid rgba(88, 101, 242, 0.2); }
.xts-ch-icon--green { background: rgba(107, 207, 158, 0.12); border: 0.5px solid rgba(107, 207, 158, 0.2); }
.xts-ch-icon--gray  { background: rgba(255, 255, 255, 0.06); border: 0.5px solid rgba(255, 255, 255, 0.10); }

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

.xts-ch-name
{
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xts-ch-sub
{
    font-size: 0.68rem;
    color: var(--text-subtle);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xts-ch-count
{
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-subtle);
    flex-shrink: 0;
}

.xts-ch-count--live { color: var(--accent); }

/* Chevron */

.xts-ch-chevron
{
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.xts-ch-chevron svg { display: block; }

.xts-ch-group.xts-open .xts-ch-chevron
{
    transform: rotate(90deg);
}

/* Members indented area */

.xts-ch-members
{
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0;
}

.xts-ch-group.xts-open .xts-ch-members
{
    max-height: 500px;
    padding-top: 4px;
}

/* Individual member row */

.xts-ch-member
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    position: relative;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.xts-ch-member:hover
{
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

/* Connector line */

.xts-ch-member::before
{
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 7px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.xts-ch-member-avatar
{
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 0.5px solid rgba(232, 99, 122, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.60rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.xts-ch-member-name
{
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xts-ch-member-status
{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.xts-status--online  { background: #57c4e4; box-shadow: 0 0 5px rgba(87, 196, 228, 0.5); }
.xts-status--away    { background: #faa81a; }
.xts-status--muted   { background: rgba(255, 255, 255, 0.2); }
.xts-status--offline { background: rgba(255, 255, 255, 0.12); }

/* Bottom row — invite left, connect button right */

.xts-bottom-row
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.xts-invite-box
{
    background: rgba(12, 9, 22, 0.84);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: var(--shadow), 0 0 60px rgba(0, 0, 0, 0.3);
    min-height: 46px;
}

.xts-invite-link
{
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xts-copy-btn
{
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: var(--font);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition);
}

.xts-copy-btn:hover
{
    background: var(--glass-hover);
    color: var(--text-primary);
}

.xts-copy-btn.copied
{
    color: var(--success);
    border-color: rgba(107, 207, 158, 0.35);
}

.xts-join-btn
{
    width: 100%;
    justify-content: center;
}

/* Member lightbox */

.xts-lightbox
{
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.xts-lightbox.open
{
    opacity: 1;
    pointer-events: auto;
}

.xts-lightbox-backdrop
{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.xts-lightbox-panel
{
    position: relative;
    z-index: 1;
    background: var(--surface-raised);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    width: 280px;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow), 0 0 60px rgba(0, 0, 0, 0.4);
}

.xts-lightbox.open .xts-lightbox-panel
{
    transform: scale(1) translateY(0);
}

.xts-lightbox-close
{
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}

.xts-lightbox-close:hover
{
    background: var(--accent-soft);
    color: #fff;
}

.xts-lightbox-avatar-wrap
{
    width: 100%;
    aspect-ratio: 1;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.xts-lightbox-avatar-fallback
{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font);
}

.xts-lightbox-info
{
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xts-lightbox-status-row
{
    display: flex;
    align-items: center;
    gap: 7px;
}

.xts-lightbox-status-dot
{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.xts-lightbox-status-text
{
    font-size: 0.72rem;
    color: var(--text-subtle);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.xts-lightbox-username
{
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.xts-lightbox-channel
{
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Responsive */

@media (max-width: 900px)
{
    .xts-stats-row { grid-template-columns: 1fr; }
    .xts-panels-row { grid-template-columns: 1fr; }
}

@media (max-width: 700px)
{
    .xts-header { padding: 24px 18px 0; margin-bottom: 24px; }
    .xts-main { padding: 0 18px 2.5rem; }
    .xts-bottom-row { grid-template-columns: 1fr; }
    .xts-join-btn { width: 100%; }
}
