:root {
    --ss-bg: #020204;
    --ss-bg-soft: #050508;
    --ss-panel: rgba(8, 12, 22, 0.82);
    --ss-panel-strong: rgba(5, 8, 16, 0.94);
    --ss-green: #00ff9c;
    --ss-green-strong: #00e676;
    --ss-cyan: #00f5ff;
    --ss-purple: #a020ff;
    --ss-purple-strong: #7b2cff;
    --ss-magenta: #b026ff;
    --ss-gold: #ffd166;
    --ss-gold-strong: #f5b841;
    --ss-text: #f3f7ff;
    --ss-muted: #8b8fa3;
    --ss-border: rgba(160, 227, 255, 0.2);
    --ss-shadow: 0 24px 64px rgba(0, 0, 0, 0.52);
    --ss-glow-green: 0 0 30px rgba(0, 255, 157, 0.24);
    --ss-glow-purple: 0 0 34px rgba(168, 85, 247, 0.26);
    --ss-live-red: #ff1744;
    --ss-mono-font: "JetBrains Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
    --ss-wallet-chip-border: rgba(246, 196, 69, 0.44);
    --ss-wallet-chip-bg: rgba(246, 196, 69, 0.08);
    --ss-wallet-chip-text: rgba(255, 255, 255, 0.72);
    --ss-wallet-chip-balance: #f6c445;
    --ss-wallet-chip-shadow: inset 0 0 0 1px rgba(255, 239, 182, 0.1), 0 10px 22px rgba(0, 0, 0, 0.24);
    --ss-wallet-chip-shadow-hover: inset 0 0 0 1px rgba(255, 239, 182, 0.14), 0 16px 30px rgba(0, 0, 0, 0.28), 0 0 22px rgba(246, 196, 69, 0.32);
    --ss-wallet-coin-glow: 0 0 16px rgba(246, 196, 69, 0.42);
    --ss-wallet-coin-glow-hover: 0 0 22px rgba(246, 196, 69, 0.56);
    --ss-wallet-chip-height: 44px;
    --ss-wallet-chip-gap: 10px;
    --ss-wallet-coin-wrap-size: 28px;
    --ss-wallet-coin-size: 24px;
    --ss-wallet-chip-compact-height: 38px;
    --ss-wallet-chip-compact-gap: 8px;
    --ss-wallet-chip-compact-coin-wrap-size: 24px;
    --ss-wallet-chip-compact-coin-size: 20px;
}

body:not(.ss-live-body) {
    background:
        linear-gradient(145deg, rgba(3, 6, 12, 0.97), rgba(2, 3, 7, 0.99)),
        radial-gradient(circle at 14% 18%, rgba(160, 32, 255, 0.18), transparent 42%),
        radial-gradient(circle at 82% 84%, rgba(0, 255, 156, 0.12), transparent 40%),
        url("../images/cyber/cyber-stream-bg.png") center top / cover fixed no-repeat,
        var(--ss-bg);
    color: var(--ss-text);
    font-family: "Space Grotesk", "Rajdhani", "Segoe UI", sans-serif;
}

body:not(.ss-live-body)::before,
body:not(.ss-live-body)::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

body:not(.ss-live-body)::before {
    background-image:
        linear-gradient(to right, rgba(0, 245, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 245, 255, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.2;
}

body:not(.ss-live-body)::after {
    background-image: linear-gradient(transparent 46%, rgba(255, 255, 255, 0.02) 50%, transparent 54%);
    background-size: 100% 8px;
    opacity: 0.18;
}

body:not(.ss-live-body) main::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.68);
}

main {
    position: relative;
    z-index: 1;
}

main > :where(
    .saas-landing,
    .search-shell,
    .community-shell,
    .contact-shell,
    .ads-shell,
    .admin-shell,
    .stats-shell,
    .pulse-shell,
    .upload-shell,
    .my-profile-shell,
    .pp-shell,
    .creator-shell,
    .ticket-dashboard-shell,
    .ticket-center-shell,
    .subscription-grid,
    .date-match-shell,
    .feed-post-page,
    .feed-stats-page
) {
    width: min(1520px, calc(100vw - 30px));
    margin-left: auto;
    margin-right: auto;
}

:where(
    .hero-copy,
    .hero-console,
    .section-block,
    .final-cta,
    .home-results,
    .recon-card,
    .community-hero,
    .community-panel,
    .member-card,
    .message-sidebar,
    .message-thread,
    .stats-list,
    .pulse-panel,
    .contact-card,
    .contact-panel,
    .ads-panel,
    .admin-panel,
    .admin-metric-card,
    .ticket-widget,
    .ticket-kpi-card,
    .ticket-detail-shell,
    .ticket-table-wrap,
    .upload-step,
    .upload-side-card,
    .pp-card,
    .creator-main,
    .creator-media,
    .feed-post-card,
    .feed-stats-page__card,
    .subscription-card,
    .discount-card,
    .placeholder-actions,
    .feature-placeholder-section
) {
    border-radius: 18px !important;
    border: 1px solid var(--ss-border) !important;
    background:
        linear-gradient(160deg, rgba(168, 85, 247, 0.1), rgba(0, 245, 255, 0.06) 42%, rgba(5, 8, 16, 0.9) 100%),
        var(--ss-panel) !important;
    box-shadow: var(--ss-shadow), var(--ss-glow-purple);
}

.navbar {
    min-height: 70px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 8, 16, 0.86);
    backdrop-filter: blur(14px);
    z-index: 1200;
}

.navbar-logo {
    font-size: 2rem;
    letter-spacing: 0.06em;
    color: #050505;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    text-shadow: none;
}

.navbar-logo-text {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.96);
    color: #050505;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
}

.navbar-logo-image {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(168, 85, 247, 0.42);
    background: rgba(255, 255, 255, 0.04);
}

.navbar-menu {
    align-items: center;
    gap: 14px;
}

.navbar-left,
.navbar-right {
    gap: 10px;
}

.navbar-right-main {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.navbar-admin-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(96px, auto));
    align-items: center;
    justify-content: end;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    order: -1;
    position: relative;
    z-index: 1210;
}

.navbar-admin-actions a {
    border-color: rgba(255, 0, 255, 0.55);
    background: rgba(255, 0, 255, 0.16);
    color: #ffd6ff;
    justify-content: center;
    text-align: center;
}

.navbar-left a,
.navbar-right a,
.navbar-right button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(241, 247, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
}

.navbar-left a:hover,
.navbar-right a:hover,
.navbar-right button:hover {
    border-color: rgba(0, 245, 255, 0.42);
    background: rgba(0, 245, 255, 0.12);
    color: #fff;
}

.navbar-stream-kit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 4px;
    position: relative;
}

.ss-wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--ss-wallet-chip-gap);
    min-height: var(--ss-wallet-chip-height);
    border-radius: 13px;
    border: 1px solid var(--ss-wallet-chip-border);
    background: var(--ss-wallet-chip-bg);
    box-shadow: var(--ss-wallet-chip-shadow);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ss-wallet-chip:is(:hover, :focus-within) {
    border-color: rgba(255, 221, 131, 0.62);
    box-shadow: var(--ss-wallet-chip-shadow-hover);
    transform: translateY(-1px) scale(1.02);
}

.ss-wallet-chip__coin-wrap {
    width: var(--ss-wallet-coin-wrap-size);
    height: var(--ss-wallet-coin-wrap-size);
    border-radius: 999px;
    background: radial-gradient(circle at 32% 30%, rgba(255, 250, 228, 0.82) 0%, rgba(246, 196, 69, 0.26) 38%, rgba(53, 28, 6, 0.34) 100%);
    border: 1px solid rgba(255, 216, 120, 0.44);
    display: grid;
    place-items: center;
    box-shadow: var(--ss-wallet-coin-glow);
    overflow: hidden;
    flex: 0 0 auto;
    transition: box-shadow 180ms ease;
}

.ss-wallet-chip:is(:hover, :focus-within) .ss-wallet-chip__coin-wrap {
    box-shadow: var(--ss-wallet-coin-glow-hover);
}

.ss-wallet-chip__coin {
    width: var(--ss-wallet-coin-size);
    height: var(--ss-wallet-coin-size);
    border-radius: 999px;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.08);
}

.ss-wallet-chip__meta {
    display: grid;
    justify-items: end;
    line-height: 1.05;
}

.ss-wallet-chip__label {
    font-size: 0.68rem;
    color: var(--ss-wallet-chip-text);
    letter-spacing: 0.04em;
}

.ss-wallet-chip__balance {
    color: var(--ss-wallet-chip-balance);
    font-size: 0.98rem;
    text-shadow: 0 0 16px rgba(246, 196, 69, 0.4);
}

.navbar-stream-wallet {
    padding: 6px 8px 6px 8px;
}

.ss-wallet-chip--compact {
    min-height: var(--ss-wallet-chip-compact-height);
    gap: var(--ss-wallet-chip-compact-gap);
}

.ss-wallet-chip--compact .ss-wallet-chip__coin-wrap {
    width: var(--ss-wallet-chip-compact-coin-wrap-size);
    height: var(--ss-wallet-chip-compact-coin-wrap-size);
}

.ss-wallet-chip--compact .ss-wallet-chip__coin {
    width: var(--ss-wallet-chip-compact-coin-size);
    height: var(--ss-wallet-chip-compact-coin-size);
}

.ss-wallet-chip--compact .ss-wallet-chip__label {
    font-size: 0.62rem;
}

.ss-wallet-chip--compact .ss-wallet-chip__balance {
    font-size: 0.86rem;
}

.navbar-stream-wallet__meta {
    min-width: 84px;
}

.navbar-stream-wallet__plus {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.62) !important;
    background: rgba(168, 85, 247, 0.18) !important;
    color: #f6e8ff !important;
    font-size: 1rem !important;
    line-height: 1;
    padding: 0 !important;
}

.navbar-stream-wallet__plus:focus-visible {
    outline: 2px solid rgba(0, 245, 255, 0.56);
    outline-offset: 2px;
}

.navbar-stream-notify {
    position: relative;
    width: 42px;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(12, 18, 28, 0.84) !important;
    padding: 0 !important;
}

.navbar-stream-notify__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.88);
    background: rgba(168, 85, 247, 0.95);
    color: #fff;
    font-size: 0.66rem;
    display: grid;
    place-items: center;
    line-height: 1;
}

.navbar-stream-notify__badge.is-hidden {
    display: none;
}

.navbar-notify-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0, 245, 255, 0.36);
    background:
        linear-gradient(160deg, rgba(6, 12, 20, 0.96), rgba(6, 10, 18, 0.98)),
        rgba(4, 8, 14, 0.98);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.58), 0 0 28px rgba(0, 245, 255, 0.18);
    z-index: 320;
}

.navbar-notify-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-notify-panel__head strong {
    color: #e8faff;
    font-size: 0.94rem;
    letter-spacing: 0.03em;
}

.navbar-notify-panel__head small {
    color: rgba(198, 239, 247, 0.78);
    font-size: 0.72rem;
}

.navbar-notify-panel__filters {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px 0;
    flex-wrap: wrap;
}

.navbar-notify-chip {
    min-height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 159, 0.34);
    background: rgba(0, 255, 159, 0.12);
    color: #c8ffe8;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.navbar-notify-panel__list {
    padding: 8px 10px 10px;
    overflow-y: auto;
    max-height: min(60vh, 500px);
    display: grid;
    gap: 7px;
}

.navbar-notify-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 12, 0.72);
    text-decoration: none;
}

.navbar-notify-item:hover,
.navbar-notify-item:focus-visible {
    border-color: rgba(0, 245, 255, 0.48);
    background: rgba(0, 245, 255, 0.12);
}

.navbar-notify-item__avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(168, 85, 247, 0.42);
}

.navbar-notify-item__body {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.navbar-notify-item__title {
    color: #eaf8ff;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-notify-item__text {
    color: rgba(197, 240, 250, 0.8);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-notify-item__time {
    color: rgba(177, 230, 238, 0.68);
    font-size: 0.68rem;
}

.navbar-notify-empty {
    margin: 0;
    color: rgba(202, 241, 250, 0.82);
    font-size: 0.8rem;
    padding: 10px 8px;
}

.navbar-stream-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 18, 28, 0.84);
}

@media (max-width: 620px) {
    .ss-wallet-chip {
        min-height: 40px;
        gap: 8px;
    }

    .ss-wallet-chip__coin-wrap {
        width: 24px;
        height: 24px;
    }

    .ss-wallet-chip__coin {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ss-wallet-chip,
    .ss-wallet-chip__coin-wrap {
        transition: none;
    }

    .ss-wallet-chip:is(:hover, :focus-within) {
        transform: none;
    }
}

.navbar-stream-user__avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(168, 85, 247, 0.52);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.48), rgba(0, 245, 255, 0.28));
    color: #f7eeff;
    font-size: 0.75rem;
    font-weight: 800;
}

.navbar-stream-user__name {
    color: #f4f8ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.navbar-stream-user__live {
    color: var(--ss-green);
    font-size: 0.82rem;
    font-weight: 800;
}

#navbar-auth-logged-out,
#navbar-auth-logged-in {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-overlay {
    background: rgba(3, 6, 14, 0.88);
    backdrop-filter: blur(6px);
}

.modal {
    border: 1px solid var(--ss-border);
    border-radius: 18px;
    background:
        linear-gradient(170deg, rgba(168, 85, 247, 0.12), rgba(0, 245, 255, 0.08), rgba(8, 12, 20, 0.94)),
        var(--ss-panel-strong);
    box-shadow: var(--ss-shadow), var(--ss-glow-purple);
}

.modal h2 {
    color: var(--ss-cyan);
}

.modal input,
.modal select,
.modal textarea,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
select,
textarea {
    border: 1px solid rgba(157, 232, 255, 0.24);
    border-radius: 12px;
    background: rgba(2, 6, 14, 0.74);
    color: #f3f7ff;
}

.modal button[type="submit"] {
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.52);
    background: linear-gradient(125deg, rgba(168, 85, 247, 0.94), rgba(255, 43, 214, 0.92));
    color: #fbf6ff;
    box-shadow: var(--ss-glow-purple);
}

:where(
    .btn-primary,
    .btn-secondary,
    .neon-button,
    .ghost-button,
    .neon-btn,
    .pulse-btn,
    .admin-btn,
    .btn-scan,
    .btn-reset,
    .upload-next,
    .upload-back,
    .upload-submit,
    .contact-submit,
    .ads-submit,
    .subscribe-btn,
    .ticket-link,
    .placeholder-return-btn,
    .feed-switch__btn
) {
    border-radius: 999px !important;
    border: 1px solid rgba(168, 85, 247, 0.48) !important;
    background: linear-gradient(125deg, rgba(176, 38, 255, 0.94), rgba(123, 44, 255, 0.9)) !important;
    color: #fef8ff !important;
    box-shadow: 0 0 22px rgba(160, 32, 255, 0.28);
}

:where(
    .ghost-button,
    .btn-secondary,
    .upload-back,
    .btn-reset,
    .mailbox-tab
) {
    background: rgba(7, 11, 20, 0.8) !important;
    border: 1px solid rgba(160, 32, 255, 0.42) !important;
    color: #eef2ff !important;
    box-shadow: none;
}

:where(
    .btn-primary:hover,
    .neon-button:hover,
    .neon-btn:hover,
    .upload-next:hover,
    .upload-submit:hover,
    .pulse-btn:hover,
    .btn-scan:hover
) {
    transform: translateY(-1px);
    box-shadow: 0 0 26px rgba(176, 38, 255, 0.42) !important;
}

:where(
    input,
    select,
    textarea
) {
    box-shadow: inset 0 0 0 1px rgba(156, 236, 255, 0.08);
}

:where(
    input:focus,
    select:focus,
    textarea:focus
) {
    border-color: rgba(0, 255, 156, 0.52) !important;
    box-shadow:
        0 0 0 1px rgba(0, 255, 156, 0.36),
        0 0 20px rgba(0, 255, 156, 0.2) !important;
}

:where(
    .community-subtle,
    .message-meta,
    .stats-range-badge,
    .upload-subtle,
    .console-note
) {
    font-family: var(--ss-mono-font);
    letter-spacing: 0.03em;
}

.ss-toast-host {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 1200;
    display: grid;
    gap: 8px;
    max-width: min(420px, calc(100vw - 20px));
}

.ss-toast {
    border-radius: 12px;
    border: 1px solid rgba(160, 32, 255, 0.52);
    background:
        linear-gradient(145deg, rgba(176, 38, 255, 0.2), rgba(6, 10, 18, 0.92)),
        rgba(5, 8, 16, 0.92);
    color: #f3f7ff;
    padding: 10px 12px;
    font-size: 0.84rem;
    line-height: 1.35;
    box-shadow:
        0 14px 26px rgba(0, 0, 0, 0.45),
        0 0 20px rgba(160, 32, 255, 0.3);
    animation: ssToastIn 180ms ease;
}

.ss-toast--ok {
    border-color: rgba(0, 255, 156, 0.52);
}

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

:where(.chip, .pill, .status-chip, .pulse-chip, .platform-pill, .member-tag) {
    border-radius: 999px !important;
    border: 1px solid rgba(168, 85, 247, 0.38) !important;
    background: rgba(168, 85, 247, 0.12) !important;
    color: #f3f7ff !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ss-cyan);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .navbar-stream-kit {
        display: none;
    }
}

@media (max-width: 900px) {
    .navbar {
        min-height: 58px;
        padding: 8px 10px;
    }

    .navbar-logo {
        font-size: 1.4rem;
    }

    .navbar-left a,
    .navbar-right a,
    .navbar-right button {
        min-height: 38px;
    }

    .navbar-right-main,
    .navbar-admin-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .navbar-right-main {
        flex-direction: column;
    }

    .navbar-admin-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 0;
        padding-top: 0;
    }

    .navbar-admin-actions > a:first-child {
        grid-column: 1 / -1;
    }

    .navbar-logo-text {
        min-height: 30px;
        padding: 0 10px;
    }

    .navbar-notify-panel {
        position: fixed;
        top: 62px;
        right: 8px;
        width: min(420px, calc(100vw - 16px));
    }
}
