/* 2P_BOT Streamer App — тёмная тема по макету Figma */
:root {
    --bg-primary: #0d0d1a;
    --bg-secondary: #131320;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222238;
    --bg-footer: #0a0a14;
    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --accent-purple: #9146ff;
    --accent-pink: #e040fb;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-cyan: #06b6d4;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.08);
    --gradient-purple-pink: linear-gradient(135deg, #9146ff 0%, #e040fb 100%);
    --gradient-cta: linear-gradient(135deg, #e040fb 0%, #9146ff 50%, #e040fb 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-secondary);
}

/* ===== CUSTOM SCROLLBARS ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: rgba(145, 70, 255, 0.4);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* ===== HIDE NUMERIC SPINNERS ===== */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Blazor FocusOnNavigate ставит фокус на h1 — убираем рамку */
h1:focus, h1:focus-visible {
    outline: none;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--accent-purple);
    text-decoration: none;
}

a:hover {
    color: var(--accent-pink);
}

/* ===== HEADER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-purple-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 800;
    color: white;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.logo-img-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.sponsor-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.sponsor-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: var(--text-secondary);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.btn-twitch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-purple);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-twitch:hover {
    background: #7c3aed;
    color: white;
}

/* ===== MAIN CONTENT ===== */
.app-main {
    flex: 1;
    padding-top: 64px;
    position: relative;
}

.streamer-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* ===== DECORATIVE ELEMENTS ===== */
.bg-pattern {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-pattern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(145, 70, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(224, 64, 251, 0.06) 0%, transparent 50%);
}

/* Декоративные ромбы и круги */
.decor-diamond {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(145, 70, 255, 0.2);
    transform: rotate(45deg);
    border-radius: 4px;
}

.decor-diamond-large {
    width: 120px;
    height: 120px;
}

.decor-diamond-outline {
    border: 2px solid rgba(145, 70, 255, 0.15);
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(224, 64, 251, 0.15);
    filter: blur(4px);
}

.decor-circle-sm {
    width: 8px;
    height: 8px;
}

.decor-circle-md {
    width: 12px;
    height: 12px;
}

/* ===== BUTTONS ===== */
.btn-twitch-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    background: var(--accent-purple);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-twitch-primary:hover {
    background: #7c3aed;
    color: white;
    transform: translateY(-1px);
}

.btn-twitch-primary:active {
    transform: scale(0.98);
}

.btn-twitch-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-twitch-primary .twitch-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-twitch-primary-block {
    width: 100%;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    background: transparent;
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-telegram:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    background: transparent;
    color: var(--accent-purple);
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    border: 1px solid rgba(145, 70, 255, 0.3);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-outline-light:hover {
    background: rgba(145, 70, 255, 0.1);
    color: white;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 6rem 1.5rem 5rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero .highlight {
    background: var(--gradient-purple-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    text-align: center;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== FEATURE CARDS ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

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

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.3s;
}

.feature-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
}

.feature-card:hover::before {
    background: var(--gradient-purple-pink);
}

.feature-card .icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card .icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Feature card colors */
.icon-purple {
    background: rgba(145, 70, 255, 0.15);
    color: var(--accent-purple);
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.icon-pink {
    background: rgba(224, 64, 251, 0.15);
    color: var(--accent-pink);
}

.icon-green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.icon-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Features grid 6 columns */
.features-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .features-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .how-it-works {
        grid-template-columns: 1fr;
    }
}

.how-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-card);
    position: relative;
    overflow: hidden;
}

.how-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple-pink);
}

.how-card-title {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.how-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.how-step:last-child {
    margin-bottom: 0;
}

.how-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-pink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.how-step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.how-step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.how-step-content a {
    color: var(--accent-purple);
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: var(--gradient-cta);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    text-align: center;
    margin: 2rem 1.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cta-banner h2 {
    font-size: 1.75rem;
    margin-bottom: 0.625rem;
    font-weight: 700;
    position: relative;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.75rem;
    font-size: 1rem;
    position: relative;
}

.cta-banner .btn-outline-light {
    background: white;
    color: var(--accent-purple);
    border: none;
}

.cta-banner .btn-outline-light:hover {
    background: rgba(255,255,255,0.9);
}

/* ===== STREAMERS SHOWCASE ===== */
.streamers-showcase {
    padding: 3rem 1.5rem;
    text-align: center;
}

.streamers-showcase h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2rem;
}

.streamers-avatars {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.streamer-avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.streamer-avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--border-card);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.streamer-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--accent-purple);
    object-fit: cover;
    transition: border-color 0.2s, transform 0.2s;
}

.streamer-avatar-item:hover .streamer-avatar-img {
    border-color: var(--accent-pink);
    transform: scale(1.05);
}

.streamer-avatar-item:hover .streamer-avatar-circle {
    border-color: var(--accent-purple);
}

.streamer-avatar-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.streamer-avatar-item:hover .streamer-avatar-name {
    color: var(--text-primary);
}

/* ===== AUTH CARD ===== */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-card {
    max-width: 420px;
    width: 100%;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-card);
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-card .logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    background: var(--gradient-purple-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
    overflow: hidden;
}

.auth-card .logo-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-card);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1rem auto 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-card .auth-hint {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.auth-card .btn-twitch-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.auth-card .terms {
    margin-top: 1.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.auth-card .terms a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.auth-card .terms a:hover {
    color: var(--text-primary);
}

.auth-card .terms-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--text-secondary);
    text-decoration: underline;
    cursor: pointer;
}

.auth-card .terms-link-btn:hover {
    color: var(--text-primary);
}

/* Модальное окно «Условия использования» на странице входа */
.terms-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.terms-modal-card {
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle, #eee);
}

.terms-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #000);
}

.terms-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    border-radius: 8px;
}

.terms-modal-close:hover {
    background: var(--bg-secondary, #f2f2f7);
    color: var(--text-primary, #000);
}

.terms-modal-body {
    padding: 1.25rem 1.5rem;
}

.terms-modal-body p {
    margin: 0 0 0.75rem 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary, #333);
}

.terms-modal-operator {
    font-size: 0.875rem !important;
    color: var(--text-secondary, #666) !important;
}

.terms-modal-operator a {
    color: var(--link-color, #9146ff);
    text-decoration: none;
}

.terms-modal-operator a:hover {
    text-decoration: underline;
}

.terms-modal-docs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.terms-modal-docs .terms-modal-download {
    margin-top: 0;
}

.terms-modal-download {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.625rem 1rem;
    background: var(--twitch-purple, #9146ff);
    color: #fff;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.terms-modal-download:hover {
    opacity: 0.9;
}

.auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* ===== FOOTER ===== */
.app-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-brand .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.footer-brand .logo-text {
    font-size: 1.125rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer-section h4 {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.social-links a:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* Цветные иконки брендов (как у YouTube) */
.social-links a.social-link-telegram {
    color: #0088cc;
}
.social-links a.social-link-telegram:hover {
    color: #00a2e8;
    border-color: #0088cc;
}

.social-links a.social-link-tiktok {
    color: #00f2ea;
}
.social-links a.social-link-tiktok:hover {
    color: #5cfff9;
    border-color: #00f2ea;
}

.social-links a.social-link-youtube:hover {
    color: inherit;
    border-color: #cc0000;
}
.social-links a.social-link-youtube svg {
    display: block;
}

.footer-sponsors {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sponsor-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.sponsor-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

/* ===== DASHBOARD STYLES ===== */
.dashboard-page {
    max-width: 900px;
}

.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* ===== PROFILE CARD ===== */
.profile-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(145, 70, 255, 0.15);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple);
}

.avatar-placeholder-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.profile-info-text {
    min-width: 0;
}

.profile-display-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* ===== PROFILE FORM ===== */
.profile-form .form-group {
    margin-bottom: 1rem;
}

.profile-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-form label svg {
    color: var(--text-secondary);
}

.profile-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.profile-form .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.profile-form .form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
}

/* ===== TOGGLES ===== */
.form-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-row:hover {
    background: rgba(145, 70, 255, 0.08);
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

.toggle-info svg {
    color: var(--accent-purple);
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 13px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-input:checked + .toggle-slider {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--accent-green);
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(22px);
    background: var(--accent-green);
}

/* ===== SAVE BUTTON ===== */
.btn-save-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.5rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-primary:hover {
    background: #1db954;
    transform: translateY(-1px);
}

.btn-save-primary:active {
    transform: scale(0.98);
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-card);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
}

.dashboard-card:hover::before {
    background: var(--gradient-purple-pink);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-blue .card-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.card-blue:hover {
    border-color: var(--accent-blue);
}

.card-pink .card-icon {
    background: rgba(224, 64, 251, 0.15);
    color: var(--accent-pink);
}

.card-pink:hover {
    border-color: var(--accent-pink);
}

.card-purple .card-icon {
    background: rgba(145, 70, 255, 0.15);
    color: var(--accent-purple);
}

.card-purple:hover {
    border-color: var(--accent-purple);
}

.card-cyan .card-icon {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.card-cyan:hover {
    border-color: var(--accent-cyan);
}

.dashboard-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.dashboard-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Dashboard sidebar */
.dashboard-sidebar .sidebar-link {
    display: block;
    padding: 0.65rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, background 0.2s;
}

.dashboard-sidebar .sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(145, 70, 255, 0.08);
}

.dashboard-sidebar .sidebar-link.active {
    color: var(--accent-purple);
    background: rgba(145, 70, 255, 0.12);
}

.dashboard-footer .footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.dashboard-footer .footer-bottom a:hover {
    color: var(--accent-purple);
}

@media (max-width: 768px) {
    .dashboard-sidebar .sidebar-link {
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
    }
}

/* ===== Аналитика зрителей (панель стримера) ===== */
.analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.analytics-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
}

.analytics-card-label {
    font-size: 11px;
    opacity: 0.75;
    margin-bottom: 4px;
}

.analytics-card-value {
    font-size: 18px;
    font-weight: 700;
}

.analytics-table-section {
    background-color: #020617;
    border-radius: 16px;
    padding: 14px 12px 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.analytics-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analytics-table thead tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.analytics-table th,
.analytics-table td {
    padding: 8px 6px;
    text-align: left;
    white-space: nowrap;
}

.analytics-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
}

.analytics-table tbody tr:nth-child(even) {
    background-color: rgba(15, 23, 42, 0.6);
}

.viewer-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.viewer-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.viewer-name {
    display: flex;
    flex-direction: column;
}

.viewer-display-name {
    font-weight: 600;
    color: #e5e7eb;
}

.viewer-id {
    font-size: 11px;
    color: #6b7280;
}

.muted {
    color: #6b7280;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.status-chip.online {
    background-color: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-chip.offline {
    background-color: rgba(148, 163, 184, 0.15);
    color: #9ca3af;
}

@media (max-width: 480px) {
    .analytics-table-section {
        padding: 10px 8px 8px;
    }

    .analytics-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===== BLAZOR ===== */
#blazor-error-ui {
    background: #b32121;
    color: white;
    bottom: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
    display: none;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent-purple);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
