
/* NovaChat Full Redesign 2026: новая визуальная система для ПК и телефонов */
:root{
    --nova-bg:#f5f7fb;
    --nova-surface:#ffffff;
    --nova-surface-2:#f0f3f9;
    --nova-ink:#111827;
    --nova-muted:#667085;
    --nova-soft:#98a2b3;
    --nova-line:rgba(17,24,39,.10);
    --nova-brand:#635bff;
    --nova-brand-2:#13c2c2;
    --nova-brand-3:#ff7a59;
    --nova-good:#12b76a;
    --nova-bad:#f04438;
    --nova-warn:#f79009;
    --nova-shadow:0 18px 60px rgba(15,23,42,.10);
    --nova-shadow-soft:0 10px 30px rgba(15,23,42,.07);
    --nova-radius:28px;
    --nova-radius-sm:18px;
    --accent-primary:var(--nova-brand);
    --accent-secondary:var(--nova-brand-2);
    --accent-green:var(--nova-good);
    --accent-red:var(--nova-bad);
    --accent-orange:var(--nova-warn);
    --accent-pink:#ec4899;
    --text-primary:var(--nova-ink);
    --text-secondary:var(--nova-muted);
    --border-color:var(--nova-line);
    --card-bg:var(--nova-surface);
    --hover-bg:rgba(99,91,255,.08);
    --bg-primary:var(--nova-bg);
    --bg-secondary:rgba(255,255,255,.88);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0!important;
    min-height:100vh;
    font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;
    color:var(--nova-ink)!important;
    background:
        radial-gradient(circle at 10% 0%, rgba(99,91,255,.18), transparent 34%),
        radial-gradient(circle at 90% 10%, rgba(19,194,194,.18), transparent 31%),
        linear-gradient(180deg,#f8fbff 0%,#eef2f8 100%)!important;
    overflow-x:hidden;
}
a{color:inherit}
button,input,textarea{font-family:inherit}
.animated-bg,.gradient-sphere{display:none!important}
.nova-glow{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.nova-glow:before,.nova-glow:after{content:"";position:absolute;border-radius:999px;filter:blur(40px);opacity:.55}
.nova-glow:before{width:420px;height:420px;background:rgba(99,91,255,.22);left:-120px;top:-130px}
.nova-glow:after{width:520px;height:520px;background:rgba(19,194,194,.18);right:-160px;top:120px}

/* ===== Dashboard ===== */
.nova-app{display:grid;grid-template-columns:292px minmax(0,1fr);min-height:100vh;padding:18px;gap:18px}
.nova-rail{position:sticky;top:18px;height:calc(100vh - 36px);display:flex;flex-direction:column;gap:18px;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.78);border-radius:32px;padding:18px;box-shadow:var(--nova-shadow);backdrop-filter:blur(26px);z-index:30}
.nova-brand{display:flex;align-items:center;gap:12px;text-decoration:none;padding:10px 8px}
.nova-brand-mark{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--nova-brand),#8b5cf6);color:#fff;font-weight:900;box-shadow:0 14px 30px rgba(99,91,255,.28)}
.nova-brand-text{font-size:24px;font-weight:900;letter-spacing:-.05em;color:var(--nova-ink)}
.nova-brand-text small{display:block;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--nova-muted)}
.nova-nav{display:flex;flex-direction:column;gap:7px;flex:1;overflow:auto;padding-right:2px}
.nova-nav a,.nova-mini-link{display:flex;align-items:center;gap:12px;min-height:46px;padding:12px 14px;border-radius:18px;color:var(--nova-muted);text-decoration:none;font-weight:750;transition:.18s ease;background:transparent}
.nova-nav a i,.nova-mini-link i{width:22px;text-align:center;font-size:16px;color:var(--nova-brand)}
.nova-nav a:hover,.nova-mini-link:hover{background:rgba(99,91,255,.08);color:var(--nova-ink);transform:translateX(3px)}
.nova-nav a.active{background:linear-gradient(135deg,var(--nova-brand),#8b5cf6);color:#fff;box-shadow:0 12px 26px rgba(99,91,255,.23)}
.nova-nav a.active i{color:#fff}
.admin-link{background:linear-gradient(135deg,#fff7d6,#ffe8a3)!important;color:#7a4b00!important;border:1px solid rgba(245,158,11,.25)!important}
.admin-link i{color:#d97706!important}
.nova-profile-card{margin-top:auto;border-radius:24px;background:#101828;color:#fff;padding:14px;display:grid;grid-template-columns:52px 1fr;gap:12px;align-items:center;text-decoration:none;box-shadow:0 14px 35px rgba(16,24,40,.18)}
.nova-profile-card img{width:52px;height:52px;border-radius:18px;object-fit:cover;border:2px solid rgba(255,255,255,.22)}
.nova-profile-card strong{display:block;font-size:14px;line-height:1.2;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nova-profile-card span{display:block;margin-top:5px;font-size:12px;color:rgba(255,255,255,.68)}
.nova-main{min-width:0;padding:4px 0 94px}
.nova-hero{position:relative;overflow:hidden;border-radius:36px;padding:32px;background:linear-gradient(135deg,#111827 0%,#312e81 48%,#0f766e 100%);color:#fff;box-shadow:var(--nova-shadow);margin-bottom:18px}
.nova-hero:before{content:"";position:absolute;width:420px;height:420px;border-radius:50%;right:-120px;top:-160px;background:rgba(255,255,255,.12)}
.nova-hero-inner{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:end}
.nova-eyebrow{display:inline-flex;gap:8px;align-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);padding:8px 12px;border-radius:999px;font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.78)}
.nova-hero h1{margin:18px 0 10px;font-size:clamp(32px,5vw,62px);line-height:.94;letter-spacing:-.07em;font-weight:950;max-width:820px;color:#fff!important}
.nova-hero p{margin:0;max-width:650px;color:rgba(255,255,255,.72);font-size:16px;line-height:1.6}
.nova-hero-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.nova-btn,.action-button,.add-story-btn,.create-channel-btn,.action-btn,.call-btn,.chat-send-btn,.sticker-btn,.close-picker,.close-modal,.nav-btn{border:0;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:18px;font-weight:850;transition:.18s ease;white-space:nowrap}
.nova-btn{min-height:48px;padding:0 18px;background:#fff;color:#111827;box-shadow:0 10px 22px rgba(0,0,0,.12)}
.nova-btn:hover{transform:translateY(-2px)}
.nova-btn.primary{background:linear-gradient(135deg,#fff,#dbeafe);color:#111827}
.nova-btn.dark{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.2);box-shadow:none}
.nova-stats{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:14px;margin:18px 0}
.nova-stat{background:rgba(255,255,255,.84);border:1px solid rgba(255,255,255,.75);border-radius:26px;padding:18px;box-shadow:var(--nova-shadow-soft)}
.nova-stat strong{display:block;font-size:26px;letter-spacing:-.05em;color:#111827}
.nova-stat span{display:block;margin-top:4px;color:var(--nova-muted);font-size:13px;font-weight:750}
.nova-section{background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.8);border-radius:30px;padding:22px;box-shadow:var(--nova-shadow-soft);backdrop-filter:blur(20px);margin-bottom:18px}
.nova-section-head,.stories-header,.friends-header,.calls-history-header,.channels-header{display:flex!important;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.nova-section h2,.stories-header h2,.friends-header h2,.calls-history-header h2,.channels-header h2{margin:0!important;font-size:22px!important;letter-spacing:-.04em;color:var(--nova-ink)!important;display:flex;align-items:center;gap:10px}
.stories-list{display:flex!important;gap:12px;overflow-x:auto;padding:4px 4px 12px;scrollbar-width:thin}
.story-circle{min-width:112px!important;max-width:112px;display:flex!important;flex-direction:column;gap:10px;align-items:center;padding:12px;border-radius:22px;background:#fff;border:1px solid var(--nova-line);box-shadow:0 8px 20px rgba(15,23,42,.05);cursor:pointer;transition:.18s ease}
.story-circle:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(15,23,42,.09)}
.story-avatar-wrapper{width:70px!important;height:70px!important;border-radius:24px!important;padding:3px;background:linear-gradient(135deg,var(--nova-brand),var(--nova-brand-2))!important}
.story-avatar-wrapper.has-unviewed{background:linear-gradient(135deg,#12b76a,#84cc16)!important;box-shadow:0 0 0 6px rgba(18,183,106,.10);animation:none!important}
.story-avatar-wrapper img{width:100%;height:100%;object-fit:cover;border-radius:21px!important;border:3px solid #fff!important}
.story-username{max-width:94px;font-size:12px;color:var(--nova-muted);font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.add-story-btn,.create-channel-btn{min-height:44px;padding:0 16px;background:linear-gradient(135deg,var(--nova-brand),#8b5cf6)!important;color:#fff!important;box-shadow:0 12px 24px rgba(99,91,255,.23)}
.nova-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.9fr);gap:18px;align-items:start}
.top-bar{display:flex!important;gap:10px;flex-wrap:wrap;margin-bottom:18px!important}
.action-button{min-height:48px;padding:0 16px!important;background:#fff!important;border:1px solid var(--nova-line)!important;color:var(--nova-muted)!important;border-radius:18px!important;box-shadow:none!important}
.action-button.active{background:#111827!important;color:#fff!important;border-color:#111827!important}
.content-section{display:none!important}.content-section.active{display:block!important}
.friends-grid,.channels-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px!important}
.friend-card,.channel-card,.call-item{background:#fff!important;border:1px solid var(--nova-line)!important;border-radius:26px!important;box-shadow:0 8px 20px rgba(15,23,42,.05)!important;transition:.18s ease;color:var(--nova-ink)!important}
.friend-card{padding:18px!important;text-align:left!important;display:grid;grid-template-columns:64px 1fr;gap:14px;align-items:center}
.friend-card:hover,.channel-card:hover,.call-item:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(15,23,42,.09)!important}
.friend-avatar-large,.channel-avatar,.call-avatar{width:64px!important;height:64px!important;border-radius:22px!important;object-fit:cover;border:0!important}
.friend-name,.channel-name,.call-user{font-weight:900;color:var(--nova-ink)!important;letter-spacing:-.02em}
.friend-status,.channel-stats,.call-details{font-size:13px;color:var(--nova-muted)!important;margin-top:6px}
.friend-actions{grid-column:1/-1;display:flex!important;gap:8px;margin-top:8px!important}
.action-btn{min-height:42px;padding:0 12px;background:var(--nova-surface-2)!important;color:var(--nova-ink)!important;border-radius:16px!important;flex:1}.action-btn.message{background:linear-gradient(135deg,var(--nova-brand),#8b5cf6)!important;color:#fff!important}.action-btn.audio{background:#ecfdf3!important;color:#027a48!important}.action-btn.video{background:#fff1f3!important;color:#c01048!important}
.calls-list{display:flex;flex-direction:column;gap:12px}.call-item{padding:14px!important;display:grid!important;grid-template-columns:56px 1fr auto;align-items:center;gap:12px}.call-status-badge{border-radius:999px;padding:7px 10px;font-size:12px;font-weight:850}.call-status-badge.answered{background:#ecfdf3;color:#027a48}.call-status-badge.missed{background:#fff1f3;color:#c01048}
.channel-card{padding:16px!important;display:grid;grid-template-columns:60px 1fr;gap:12px;align-items:center;cursor:pointer}.channel-info{min-width:0}
.nova-bottom-nav{display:none}

/* ===== Chat ===== */
.nova-chat-layout{display:grid;grid-template-columns:370px minmax(0,1fr);height:100vh;padding:14px;gap:14px;background:transparent!important;overflow:hidden}
.nova-chat-sidebar,.sidebar{position:relative!important;display:flex!important;flex-direction:column!important;width:auto!important;height:auto!important;min-height:0;background:rgba(255,255,255,.82)!important;border:1px solid rgba(255,255,255,.85)!important;border-radius:30px!important;padding:14px!important;box-shadow:var(--nova-shadow)!important;backdrop-filter:blur(24px);overflow:hidden!important}
.sidebar-header{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:8px 8px 14px!important;border-bottom:1px solid var(--nova-line)!important;margin-bottom:12px!important}
.logo{font-size:24px!important;font-weight:950!important;letter-spacing:-.05em;text-decoration:none!important;color:var(--nova-ink)!important;background:none!important;-webkit-text-fill-color:initial!important}
.close-sidebar{display:none;background:var(--nova-surface-2);border:0;width:42px;height:42px;border-radius:15px;color:var(--nova-ink);cursor:pointer}
.friends-list{flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:4px}
.friend-item{display:grid!important;grid-template-columns:52px 1fr;gap:12px;align-items:center;min-height:68px;padding:9px!important;border-radius:20px!important;text-decoration:none!important;color:var(--nova-ink)!important;background:transparent!important;border:1px solid transparent!important;transition:.16s ease}
.friend-item:hover{background:rgba(99,91,255,.07)!important}.friend-item.active{background:#111827!important;color:#fff!important;box-shadow:0 14px 28px rgba(16,24,40,.18)!important}.friend-item.active .friend-last-seen{color:rgba(255,255,255,.64)!important}
.friend-avatar{position:relative;width:52px;height:52px}.friend-avatar img{width:52px!important;height:52px!important;border-radius:18px!important;object-fit:cover}.status-dot{position:absolute;right:-2px;bottom:-2px;width:14px!important;height:14px!important;border-radius:999px;border:3px solid #fff;background:#98a2b3}.friend-item.active .status-dot{border-color:#111827}.status-dot.online{background:var(--nova-good)!important}.status-dot.offline{background:#98a2b3!important}.friend-info{min-width:0}.friend-info .friend-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.friend-last-seen{display:block;margin-top:4px;font-size:12px;color:var(--nova-muted)}
.bot-badge{display:inline-flex;align-items:center;gap:4px;margin-left:5px;font-size:10px;font-weight:900;border-radius:999px;padding:3px 6px;background:rgba(99,91,255,.12);color:var(--nova-brand)}.verified-badge{color:#2e90fa;margin-left:4px}.verified-gold{color:#f59e0b}.verified-purple{color:#8b5cf6}
.nova-sidebar-actions{display:grid;grid-template-columns:1fr;gap:8px;padding-top:12px;border-top:1px solid var(--nova-line);margin-top:12px}.nova-sidebar-actions a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:16px;text-decoration:none;font-weight:850;color:var(--nova-ink);background:var(--nova-surface-2)}
.chat-area{min-width:0;display:flex!important;flex-direction:column!important;background:rgba(255,255,255,.76)!important;border:1px solid rgba(255,255,255,.86)!important;border-radius:30px!important;box-shadow:var(--nova-shadow)!important;overflow:hidden!important;min-height:0;height:auto!important;margin:0!important}
.chat-header{display:grid!important;grid-template-columns:auto 58px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 18px!important;background:rgba(255,255,255,.82)!important;border-bottom:1px solid var(--nova-line)!important;backdrop-filter:blur(20px)}
.mobile-menu-toggle{display:none;width:46px;height:46px;border:0;border-radius:16px;background:#111827;color:#fff;align-items:center;justify-content:center;cursor:pointer}.chat-header-avatar{width:58px!important;height:58px!important;border-radius:20px!important;object-fit:cover;border:0!important}.chat-header-info h2{margin:0!important;font-size:20px!important;letter-spacing:-.04em;color:var(--nova-ink)!important}.chat-header-status{margin-top:5px;color:var(--nova-muted)!important;font-size:13px}.chat-header-actions{display:flex!important;gap:8px}.call-btn{width:46px!important;height:46px!important;border-radius:16px!important;background:var(--nova-surface-2)!important;color:var(--nova-ink)!important}.call-btn.audio{color:#027a48!important;background:#ecfdf3!important}.call-btn.video{color:#c01048!important;background:#fff1f3!important}
.messages-container{flex:1;min-height:0;overflow-y:auto;padding:24px!important;background:linear-gradient(180deg,rgba(245,247,251,.45),rgba(255,255,255,.6))!important;display:flex;flex-direction:column;gap:12px}
.message{display:flex!important;align-items:flex-end;gap:10px;max-width:78%;margin:0!important}.message.outgoing{align-self:flex-end;flex-direction:row-reverse}.message.incoming{align-self:flex-start}.message-avatar{width:36px!important;height:36px!important;border-radius:14px!important;object-fit:cover}.message-content{padding:12px 14px!important;border-radius:22px!important;background:#fff!important;border:1px solid var(--nova-line)!important;box-shadow:0 6px 14px rgba(15,23,42,.05)!important;color:var(--nova-ink)!important;min-width:76px}.message.outgoing .message-content{background:linear-gradient(135deg,var(--nova-brand),#8b5cf6)!important;color:#fff!important;border-color:transparent!important}.message.bot-message .message-content{background:#fff7ed!important;border-color:#fed7aa!important}.message-sender{font-size:12px;font-weight:900;margin-bottom:5px;color:var(--nova-muted)}.message-text{font-size:15px;line-height:1.45;word-break:break-word}.message-time{font-size:11px;margin-top:6px;color:rgba(102,112,133,.84);text-align:right}.message.outgoing .message-time{color:rgba(255,255,255,.68)}.sticker-message,.sent-sticker{max-width:180px}.sent-sticker{display:block;width:150px;height:150px;object-fit:contain}
.chat-input-area{position:relative;padding:14px 16px!important;border-top:1px solid var(--nova-line)!important;background:rgba(255,255,255,.9)!important}.chat-input-form{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}.chat-input{height:52px!important;border:1px solid var(--nova-line)!important;background:var(--nova-surface-2)!important;border-radius:18px!important;padding:0 16px!important;color:var(--nova-ink)!important;font-size:15px;outline:none}.chat-input:focus{border-color:rgba(99,91,255,.45)!important;box-shadow:0 0 0 4px rgba(99,91,255,.10)}.sticker-btn,.chat-send-btn{width:52px!important;height:52px!important;border-radius:18px!important}.sticker-btn{background:var(--nova-surface-2)!important;color:var(--nova-brand)!important}.chat-send-btn{background:linear-gradient(135deg,var(--nova-brand),#8b5cf6)!important;color:#fff!important;box-shadow:0 12px 24px rgba(99,91,255,.22)}
.sticker-picker{position:absolute!important;left:16px;right:16px;bottom:82px;max-height:360px;overflow:auto;background:#fff!important;border:1px solid var(--nova-line)!important;border-radius:24px!important;padding:14px!important;box-shadow:var(--nova-shadow)!important;display:none!important;z-index:40}.sticker-picker.show{display:block!important}.sticker-picker-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.sticker-picker-header h4{margin:0}.close-picker{width:36px;height:36px;background:var(--nova-surface-2);color:var(--nova-ink)}.sticker-pack-title{display:flex;align-items:center;gap:8px;font-weight:900;margin:12px 0}.sticker-pack-title img{width:28px;height:28px;border-radius:10px}.sticker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px}.sticker-item{background:var(--nova-surface-2);border-radius:16px;padding:8px;cursor:pointer}.sticker-item img{width:100%;height:64px;object-fit:contain}.no-chat-selected{height:100%;display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--nova-muted);padding:30px}.no-chat-selected>i{font-size:72px;color:rgba(99,91,255,.28);margin-bottom:18px}.no-chat-selected h3{font-size:28px;margin:0 0 8px;color:var(--nova-ink);letter-spacing:-.05em}
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(6px);z-index:60}.sidebar-overlay.active{display:block}

/* ===== Auth ===== */
.nova-auth-page{min-height:100vh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 10% 10%,rgba(99,91,255,.18),transparent 30%),radial-gradient(circle at 90% 10%,rgba(19,194,194,.16),transparent 30%),#f6f8fc!important;overflow:auto!important}.nova-auth-shell{width:min(1080px,100%);display:grid;grid-template-columns:1.08fr .92fr;background:rgba(255,255,255,.74);border:1px solid rgba(255,255,255,.9);border-radius:38px;box-shadow:var(--nova-shadow);overflow:hidden;backdrop-filter:blur(24px)}.nova-auth-visual{position:relative;min-height:620px;padding:38px;background:linear-gradient(135deg,#111827 0%,#312e81 52%,#0f766e 100%);color:#fff;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.nova-auth-visual:before{content:"";position:absolute;width:460px;height:460px;border-radius:999px;background:rgba(255,255,255,.12);right:-140px;top:-120px}.nova-auth-visual>*{position:relative}.nova-auth-visual h1{font-size:clamp(38px,5vw,64px);line-height:.95;letter-spacing:-.07em;margin:18px 0 14px;color:#fff}.nova-auth-visual p{color:rgba(255,255,255,.75);font-size:16px;line-height:1.7;max-width:460px}.nova-auth-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);font-weight:850;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.nova-auth-cards{display:grid;gap:12px}.nova-auth-mini{display:flex;align-items:center;gap:12px;border-radius:22px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);padding:14px}.nova-auth-mini i{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:rgba(255,255,255,.14)}.nova-auth-form{padding:42px;display:flex;flex-direction:column;justify-content:center;background:rgba(255,255,255,.66)}.nova-auth-form h2{font-size:34px;letter-spacing:-.06em;margin:0 0 8px;color:var(--nova-ink)}.nova-auth-form .subtitle{margin:0 0 24px;color:var(--nova-muted);line-height:1.55}.form-group{margin-bottom:15px}.form-group label{display:block;margin:0 0 8px;font-size:13px;font-weight:900;color:var(--nova-muted)}.nova-auth-form input,.auth-box input{width:100%;height:54px;border:1px solid var(--nova-line);border-radius:18px;background:#fff;color:var(--nova-ink);padding:0 16px;font-size:15px;outline:none}.nova-auth-form input:focus{border-color:rgba(99,91,255,.45);box-shadow:0 0 0 4px rgba(99,91,255,.10)}.username-input-wrapper{position:relative}.username-prefix{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-weight:950;color:var(--nova-brand)}.username-input{padding-left:36px!important}.input-hint,.rules-preview{font-size:12px;color:var(--nova-muted);margin-top:8px;line-height:1.5}.rules-preview{display:grid;gap:4px;background:var(--nova-surface-2);border-radius:18px;padding:12px;margin-bottom:15px}.nova-auth-form button[type="submit"],.auth-box button[type="submit"]{width:100%;height:54px;border:0;border-radius:18px;background:linear-gradient(135deg,var(--nova-brand),#8b5cf6);color:#fff;font-weight:950;font-size:15px;cursor:pointer;box-shadow:0 14px 28px rgba(99,91,255,.24);transition:.18s}.nova-auth-form button[type="submit"]:hover{transform:translateY(-2px)}.nova-auth-form button[type="submit"]:disabled{opacity:.55;cursor:not-allowed;transform:none}.error,.success{border-radius:18px;padding:13px 14px;margin:0 0 16px;font-size:14px;font-weight:800}.error{background:#fff1f3;color:#c01048;border:1px solid #fecdd6}.success{background:#ecfdf3;color:#027a48;border:1px solid #bbf7d0}.auth-footer{margin-top:18px;text-align:center;color:var(--nova-muted)}.auth-footer a{font-weight:950;color:var(--nova-brand);text-decoration:none}.features,.security-badge{display:none!important}
.modal{position:fixed!important;inset:0;display:none!important;align-items:center;justify-content:center;background:rgba(15,23,42,.58)!important;backdrop-filter:blur(12px);z-index:1000;padding:20px}.modal.active{display:flex!important}.modal-content{width:min(520px,100%);background:#fff!important;border-radius:30px!important;border:1px solid var(--nova-line)!important;box-shadow:var(--nova-shadow)!important;padding:22px!important;color:var(--nova-ink)!important}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.modal-header h2{margin:0!important}.close-modal{width:42px;height:42px;background:var(--nova-surface-2)!important;color:var(--nova-ink)!important;font-size:22px}.story-preview{min-height:240px;border:1px dashed rgba(99,91,255,.35);border-radius:24px;background:var(--nova-surface-2);display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:14px}.story-placeholder{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--nova-muted)}.story-placeholder i{font-size:42px;color:var(--nova-brand)}.story-preview img,.story-preview video{max-width:100%;max-height:360px;object-fit:contain}.story-controls textarea{width:100%;min-height:90px;border:1px solid var(--nova-line);border-radius:18px;padding:12px 14px;resize:vertical}.story-options{display:grid;gap:8px;margin:12px 0;color:var(--nova-muted)}.story-viewer{position:fixed;inset:0;background:#050815;z-index:1200;color:#fff}.story-viewer-header{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:16px;z-index:2}.story-user-info{display:flex;align-items:center;gap:12px}.story-user-avatar{width:44px;height:44px;border-radius:16px;object-fit:cover}.story-progress{position:absolute;top:70px;left:16px;right:16px;display:flex;gap:6px;z-index:2}.progress-bar{height:4px;flex:1;border-radius:99px;background:rgba(255,255,255,.22);overflow:hidden}.progress-fill{height:100%;width:0;background:#fff}.progress-fill.active{animation:storyFill 5s linear forwards}@keyframes storyFill{to{width:100%}}.story-media-container{height:100%;display:grid;place-items:center}.story-media-container img,.story-media-container video{max-width:100%;max-height:100%;object-fit:contain}.story-footer{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;gap:22px;padding:18px}.story-navigation{display:flex;align-items:center;gap:12px}.nav-btn{width:48px;height:48px;background:rgba(255,255,255,.14);color:#fff}.story-reactions{font-weight:850;color:rgba(255,255,255,.8)}
@media(max-width:1100px){.nova-app{grid-template-columns:92px minmax(0,1fr)}.nova-rail{padding:12px}.nova-brand-text,.nova-nav span,.nova-profile-card div{display:none}.nova-brand{justify-content:center}.nova-nav a{justify-content:center;padding:12px}.nova-profile-card{grid-template-columns:1fr;place-items:center;padding:10px}.nova-dashboard-grid{grid-template-columns:1fr}.nova-stats{grid-template-columns:repeat(2,1fr)}.nova-chat-layout{grid-template-columns:320px minmax(0,1fr)}}
@media(max-width:760px){body{background:#f5f7fb!important}.nova-app{display:block;padding:10px}.nova-rail{display:none!important}.nova-main{padding:0 0 92px}.nova-hero{border-radius:28px;padding:24px}.nova-hero-inner{display:block}.nova-hero-actions{justify-content:flex-start;margin-top:18px}.nova-stats{grid-template-columns:repeat(2,1fr);gap:10px}.nova-stat{padding:14px;border-radius:22px}.nova-section{border-radius:26px;padding:16px}.friends-grid,.channels-grid{grid-template-columns:1fr!important}.friend-card{grid-template-columns:56px 1fr}.call-item{grid-template-columns:50px 1fr}.call-status-badge{grid-column:2}.nova-bottom-nav{position:fixed;left:10px;right:10px;bottom:10px;z-index:50;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.88);border-radius:24px;padding:8px;box-shadow:var(--nova-shadow);backdrop-filter:blur(22px)}.nova-bottom-nav a{height:52px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-decoration:none;color:var(--nova-muted);font-size:10px;font-weight:850}.nova-bottom-nav a i{font-size:17px;color:var(--nova-brand)}.nova-bottom-nav a.active{background:#111827;color:#fff}.nova-bottom-nav a.active i{color:#fff}.stories-header,.friends-header,.calls-history-header,.channels-header{align-items:flex-start;flex-direction:column}.story-circle{min-width:96px!important;max-width:96px}.story-avatar-wrapper{width:62px!important;height:62px!important}.top-bar{display:grid!important;grid-template-columns:1fr 1fr}.action-button{width:100%}
.nova-chat-layout{display:block;height:100dvh;padding:0;overflow:hidden}.chat-area{height:100dvh!important;border-radius:0!important;border:0!important}.nova-chat-sidebar,.sidebar{position:fixed!important;left:10px;top:10px;bottom:10px;width:min(360px,calc(100vw - 20px))!important;z-index:80;transform:translateX(calc(-100% - 24px));transition:transform .22s ease;border-radius:26px!important}.nova-chat-sidebar.open,.sidebar.open{transform:translateX(0)}.close-sidebar{display:grid}.mobile-menu-toggle{display:flex}.chat-header{grid-template-columns:46px 48px minmax(0,1fr) auto;padding:10px!important}.chat-header-avatar{width:48px!important;height:48px!important;border-radius:17px!important}.chat-header-info h2{font-size:17px!important}.chat-header-actions{gap:6px}.call-btn{width:40px!important;height:40px!important}.messages-container{padding:16px 12px!important}.message{max-width:92%}.message-content{border-radius:20px!important}.message-avatar{display:none}.chat-input-area{padding:10px!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important}.chat-input-form{grid-template-columns:auto 1fr auto}.chat-input{height:48px!important}.sticker-btn,.chat-send-btn{width:48px!important;height:48px!important}.sticker-picker{left:10px;right:10px;bottom:72px}.sent-sticker{width:130px;height:130px}.no-chat-selected .mobile-menu-toggle{display:flex!important;margin-bottom:18px}.nova-auth-page{padding:10px}.nova-auth-shell{display:block;border-radius:28px}.nova-auth-visual{min-height:auto;padding:26px}.nova-auth-visual h1{font-size:38px}.nova-auth-cards{display:none}.nova-auth-form{padding:24px}.nova-auth-form h2{font-size:30px}}
@media(max-width:420px){.nova-stats{grid-template-columns:1fr}.nova-hero h1{font-size:34px}.nova-btn{width:100%;justify-content:center}.nova-hero-actions{display:grid}.nova-section h2{font-size:20px!important}.chat-header{grid-template-columns:42px 44px minmax(0,1fr)}.chat-header-actions .video{display:none}.message-text{font-size:14px}.nova-auth-form{padding:20px}.nova-auth-visual{padding:22px}.nova-auth-visual h1{font-size:34px}}

/* ===== NovaChat Theme System v3: тёмная база + выбор тем без белого фона ===== */
:root,
html[data-nova-theme="midnight"]{
    color-scheme:dark;
    --nova-bg:#070a16;
    --nova-bg-2:#0b1022;
    --nova-surface:#111827;
    --nova-surface-2:#172033;
    --nova-surface-3:#202b42;
    --nova-card:rgba(17,24,39,.82);
    --nova-card-strong:rgba(15,23,42,.95);
    --nova-glass:rgba(15,23,42,.74);
    --nova-input:rgba(2,6,23,.58);
    --nova-ink:#f8fafc;
    --nova-muted:#a9b4c7;
    --nova-soft:#74809a;
    --nova-line:rgba(255,255,255,.12);
    --nova-brand:#8b5cf6;
    --nova-brand-2:#22d3ee;
    --nova-brand-3:#f97316;
    --nova-good:#22c55e;
    --nova-bad:#fb7185;
    --nova-warn:#fbbf24;
    --nova-shadow:0 22px 70px rgba(0,0,0,.45);
    --nova-shadow-soft:0 14px 34px rgba(0,0,0,.28);
    --accent-primary:var(--nova-brand);
    --accent-secondary:var(--nova-brand-2);
    --accent-green:var(--nova-good);
    --accent-red:var(--nova-bad);
    --accent-orange:var(--nova-warn);
    --text-primary:var(--nova-ink);
    --text-secondary:var(--nova-muted);
    --border-color:var(--nova-line);
    --card-bg:var(--nova-card);
    --hover-bg:rgba(139,92,246,.16);
    --bg-primary:var(--nova-bg);
    --bg-secondary:var(--nova-card);
}
html[data-nova-theme="violet"]{
    color-scheme:dark;
    --nova-bg:#12091f;
    --nova-bg-2:#1d1034;
    --nova-surface:#211533;
    --nova-surface-2:#2d1d45;
    --nova-surface-3:#3a2857;
    --nova-card:rgba(33,21,51,.84);
    --nova-card-strong:rgba(24,12,41,.96);
    --nova-glass:rgba(33,21,51,.74);
    --nova-input:rgba(18,9,31,.62);
    --nova-ink:#fff7ff;
    --nova-muted:#d8c8e9;
    --nova-soft:#aa94c4;
    --nova-line:rgba(255,255,255,.14);
    --nova-brand:#c084fc;
    --nova-brand-2:#f472b6;
    --nova-brand-3:#fb923c;
    --nova-good:#34d399;
    --nova-bad:#fb7185;
    --nova-warn:#fde047;
    --nova-shadow:0 22px 70px rgba(10,4,22,.58);
    --nova-shadow-soft:0 14px 34px rgba(10,4,22,.36);
    --accent-primary:var(--nova-brand);
    --accent-secondary:var(--nova-brand-2);
    --accent-green:var(--nova-good);
    --accent-red:var(--nova-bad);
    --accent-orange:var(--nova-warn);
    --text-primary:var(--nova-ink);
    --text-secondary:var(--nova-muted);
    --border-color:var(--nova-line);
    --card-bg:var(--nova-card);
    --hover-bg:rgba(192,132,252,.18);
    --bg-primary:var(--nova-bg);
    --bg-secondary:var(--nova-card);
}
html[data-nova-theme="ocean"]{
    color-scheme:dark;
    --nova-bg:#03181f;
    --nova-bg-2:#06252f;
    --nova-surface:#0b2a35;
    --nova-surface-2:#103848;
    --nova-surface-3:#16485d;
    --nova-card:rgba(11,42,53,.84);
    --nova-card-strong:rgba(4,28,38,.96);
    --nova-glass:rgba(11,42,53,.74);
    --nova-input:rgba(3,24,31,.62);
    --nova-ink:#effdff;
    --nova-muted:#aed6df;
    --nova-soft:#78a9b5;
    --nova-line:rgba(255,255,255,.13);
    --nova-brand:#22d3ee;
    --nova-brand-2:#38bdf8;
    --nova-brand-3:#2dd4bf;
    --nova-good:#34d399;
    --nova-bad:#fb7185;
    --nova-warn:#facc15;
    --nova-shadow:0 22px 70px rgba(0,10,16,.56);
    --nova-shadow-soft:0 14px 34px rgba(0,10,16,.35);
    --accent-primary:var(--nova-brand);
    --accent-secondary:var(--nova-brand-2);
    --accent-green:var(--nova-good);
    --accent-red:var(--nova-bad);
    --accent-orange:var(--nova-warn);
    --text-primary:var(--nova-ink);
    --text-secondary:var(--nova-muted);
    --border-color:var(--nova-line);
    --card-bg:var(--nova-card);
    --hover-bg:rgba(34,211,238,.16);
    --bg-primary:var(--nova-bg);
    --bg-secondary:var(--nova-card);
}
html[data-nova-theme="graphite"]{
    color-scheme:dark;
    --nova-bg:#0b0d10;
    --nova-bg-2:#12161c;
    --nova-surface:#181d24;
    --nova-surface-2:#222934;
    --nova-surface-3:#2e3744;
    --nova-card:rgba(24,29,36,.86);
    --nova-card-strong:rgba(14,17,22,.97);
    --nova-glass:rgba(24,29,36,.76);
    --nova-input:rgba(8,10,13,.64);
    --nova-ink:#f7fafc;
    --nova-muted:#b8c1ce;
    --nova-soft:#858f9e;
    --nova-line:rgba(255,255,255,.12);
    --nova-brand:#94a3b8;
    --nova-brand-2:#60a5fa;
    --nova-brand-3:#f59e0b;
    --nova-good:#22c55e;
    --nova-bad:#fb7185;
    --nova-warn:#fbbf24;
    --nova-shadow:0 22px 70px rgba(0,0,0,.55);
    --nova-shadow-soft:0 14px 34px rgba(0,0,0,.34);
    --accent-primary:var(--nova-brand);
    --accent-secondary:var(--nova-brand-2);
    --accent-green:var(--nova-good);
    --accent-red:var(--nova-bad);
    --accent-orange:var(--nova-warn);
    --text-primary:var(--nova-ink);
    --text-secondary:var(--nova-muted);
    --border-color:var(--nova-line);
    --card-bg:var(--nova-card);
    --hover-bg:rgba(148,163,184,.16);
    --bg-primary:var(--nova-bg);
    --bg-secondary:var(--nova-card);
}
html[data-nova-theme] body{
    color:var(--nova-ink)!important;
    background:
        radial-gradient(circle at 12% -8%, color-mix(in srgb,var(--nova-brand) 42%, transparent), transparent 34%),
        radial-gradient(circle at 90% 4%, color-mix(in srgb,var(--nova-brand-2) 30%, transparent), transparent 32%),
        radial-gradient(circle at 52% 112%, color-mix(in srgb,var(--nova-brand-3) 18%, transparent), transparent 36%),
        linear-gradient(145deg,var(--nova-bg) 0%,var(--nova-bg-2) 100%)!important;
}
html[data-nova-theme] .nova-glow:before{background:color-mix(in srgb,var(--nova-brand) 30%, transparent)!important;opacity:.74}
html[data-nova-theme] .nova-glow:after{background:color-mix(in srgb,var(--nova-brand-2) 24%, transparent)!important;opacity:.68}
html[data-nova-theme] .nova-rail,
html[data-nova-theme] .nova-section,
html[data-nova-theme] .nova-stat,
html[data-nova-theme] .nova-chat-sidebar,
html[data-nova-theme] .sidebar,
html[data-nova-theme] .chat-area,
html[data-nova-theme] .nova-auth-shell,
html[data-nova-theme] .modal-content,
html[data-nova-theme] .sticker-picker,
html[data-nova-theme] .nova-bottom-nav{
    background:var(--nova-glass)!important;
    border-color:var(--nova-line)!important;
    box-shadow:var(--nova-shadow)!important;
    backdrop-filter:blur(24px) saturate(125%)!important;
}
html[data-nova-theme] .nova-auth-form,
html[data-nova-theme] .chat-header,
html[data-nova-theme] .chat-input-area,
html[data-nova-theme] .sidebar-header{
    background:var(--nova-card-strong)!important;
    border-color:var(--nova-line)!important;
}
html[data-nova-theme] .messages-container{
    background:
        radial-gradient(circle at 20% 0%, color-mix(in srgb,var(--nova-brand) 12%, transparent), transparent 30%),
        linear-gradient(180deg,color-mix(in srgb,var(--nova-surface-2) 52%, transparent),color-mix(in srgb,var(--nova-bg) 75%, transparent))!important;
}
html[data-nova-theme] .nova-hero,
html[data-nova-theme] .nova-auth-visual,
html[data-nova-theme] .nova-profile-card{
    background:
        radial-gradient(circle at 85% -20%, color-mix(in srgb,var(--nova-brand-2) 34%, transparent), transparent 42%),
        linear-gradient(135deg,color-mix(in srgb,var(--nova-surface-3) 78%, #000 22%) 0%, color-mix(in srgb,var(--nova-brand) 36%, var(--nova-bg)) 52%, color-mix(in srgb,var(--nova-brand-2) 28%, var(--nova-bg)) 100%)!important;
    border:1px solid var(--nova-line)!important;
}
html[data-nova-theme] .nova-brand-text,
html[data-nova-theme] .nova-section h2,
html[data-nova-theme] .stories-header h2,
html[data-nova-theme] .friends-header h2,
html[data-nova-theme] .calls-history-header h2,
html[data-nova-theme] .channels-header h2,
html[data-nova-theme] .nova-stat strong,
html[data-nova-theme] .friend-name,
html[data-nova-theme] .channel-name,
html[data-nova-theme] .call-user,
html[data-nova-theme] .chat-header-info h2,
html[data-nova-theme] .no-chat-selected h3,
html[data-nova-theme] .nova-auth-form h2,
html[data-nova-theme] .logo,
html[data-nova-theme] .modal-header h2,
html[data-nova-theme] .sticker-picker-header h4,
html[data-nova-theme] .sticker-pack-title{
    color:var(--nova-ink)!important;
}
html[data-nova-theme] .nova-brand-text small,
html[data-nova-theme] .nova-stat span,
html[data-nova-theme] .story-username,
html[data-nova-theme] .friend-status,
html[data-nova-theme] .friend-last-seen,
html[data-nova-theme] .channel-stats,
html[data-nova-theme] .call-details,
html[data-nova-theme] .chat-header-status,
html[data-nova-theme] .message-time,
html[data-nova-theme] .input-hint,
html[data-nova-theme] .rules-preview,
html[data-nova-theme] .form-group label,
html[data-nova-theme] .nova-auth-form .subtitle,
html[data-nova-theme] .auth-footer,
html[data-nova-theme] .no-chat-selected{
    color:var(--nova-muted)!important;
}
html[data-nova-theme] .story-circle,
html[data-nova-theme] .friend-card,
html[data-nova-theme] .channel-card,
html[data-nova-theme] .call-item,
html[data-nova-theme] .friend-item,
html[data-nova-theme] .action-button,
html[data-nova-theme] .message-content,
html[data-nova-theme] .nova-auth-mini,
html[data-nova-theme] .rules-preview,
html[data-nova-theme] .sticker-item{
    background:var(--nova-card)!important;
    color:var(--nova-ink)!important;
    border-color:var(--nova-line)!important;
    box-shadow:var(--nova-shadow-soft)!important;
}
html[data-nova-theme] .friend-item:hover,
html[data-nova-theme] .friend-item.active,
html[data-nova-theme] .nova-nav a:hover,
html[data-nova-theme] .nova-mini-link:hover,
html[data-nova-theme] .action-button:hover,
html[data-nova-theme] .story-circle:hover,
html[data-nova-theme] .channel-card:hover,
html[data-nova-theme] .friend-card:hover,
html[data-nova-theme] .call-item:hover{
    background:var(--hover-bg)!important;
    color:var(--nova-ink)!important;
}
html[data-nova-theme] .nova-nav a.active,
html[data-nova-theme] .action-button.active,
html[data-nova-theme] .nova-bottom-nav a.active,
html[data-nova-theme] .friend-item.active,
html[data-nova-theme] .add-story-btn,
html[data-nova-theme] .create-channel-btn,
html[data-nova-theme] .action-btn.message,
html[data-nova-theme] .chat-send-btn,
html[data-nova-theme] .nova-auth-form button[type="submit"],
html[data-nova-theme] .auth-box button[type="submit"]{
    background:linear-gradient(135deg,var(--nova-brand),var(--nova-brand-2))!important;
    color:#fff!important;
    border-color:transparent!important;
    box-shadow:0 16px 34px color-mix(in srgb,var(--nova-brand) 32%, transparent)!important;
}
html[data-nova-theme] .action-btn,
html[data-nova-theme] .call-btn,
html[data-nova-theme] .mobile-menu-toggle,
html[data-nova-theme] .close-sidebar,
html[data-nova-theme] .close-picker,
html[data-nova-theme] .close-modal,
html[data-nova-theme] .nav-btn,
html[data-nova-theme] .sticker-btn,
html[data-nova-theme] .nova-btn{
    background:var(--nova-surface-2)!important;
    color:var(--nova-ink)!important;
    border:1px solid var(--nova-line)!important;
}
html[data-nova-theme] .nova-btn.primary,
html[data-nova-theme] .nova-btn.dark{
    background:rgba(255,255,255,.13)!important;
    color:#fff!important;
    border-color:rgba(255,255,255,.18)!important;
}
html[data-nova-theme] input,
html[data-nova-theme] textarea,
html[data-nova-theme] .chat-input,
html[data-nova-theme] .nova-auth-form input,
html[data-nova-theme] .auth-box input,
html[data-nova-theme] .story-controls textarea{
    background:var(--nova-input)!important;
    color:var(--nova-ink)!important;
    border-color:var(--nova-line)!important;
}
html[data-nova-theme] input::placeholder,
html[data-nova-theme] textarea::placeholder{color:color-mix(in srgb,var(--nova-muted) 76%, transparent)!important}
html[data-nova-theme] input:focus,
html[data-nova-theme] textarea:focus,
html[data-nova-theme] .chat-input:focus{
    border-color:color-mix(in srgb,var(--nova-brand) 72%, white 0%)!important;
    box-shadow:0 0 0 4px color-mix(in srgb,var(--nova-brand) 22%, transparent)!important;
}
html[data-nova-theme] .message.outgoing .message-content{
    background:linear-gradient(135deg,var(--nova-brand),var(--nova-brand-2))!important;
    color:#fff!important;
}
html[data-nova-theme] .message.bot-message .message-content{
    background:color-mix(in srgb,var(--nova-brand-3) 18%, var(--nova-card))!important;
    border-color:color-mix(in srgb,var(--nova-brand-3) 38%, transparent)!important;
}
html[data-nova-theme] .message.outgoing .message-time{color:rgba(255,255,255,.70)!important}
html[data-nova-theme] .action-btn.audio,
html[data-nova-theme] .call-btn.audio{
    background:color-mix(in srgb,var(--nova-good) 16%, var(--nova-surface-2))!important;
    color:var(--nova-good)!important;
}
html[data-nova-theme] .action-btn.video,
html[data-nova-theme] .call-btn.video{
    background:color-mix(in srgb,var(--nova-bad) 16%, var(--nova-surface-2))!important;
    color:var(--nova-bad)!important;
}
html[data-nova-theme] .error{background:color-mix(in srgb,var(--nova-bad) 16%, var(--nova-card))!important;color:#fecdd3!important;border-color:color-mix(in srgb,var(--nova-bad) 36%, transparent)!important}
html[data-nova-theme] .success{background:color-mix(in srgb,var(--nova-good) 16%, var(--nova-card))!important;color:#bbf7d0!important;border-color:color-mix(in srgb,var(--nova-good) 36%, transparent)!important}
html[data-nova-theme] .admin-link{background:color-mix(in srgb,var(--nova-warn) 18%, var(--nova-card))!important;color:#fde68a!important;border-color:color-mix(in srgb,var(--nova-warn) 34%, transparent)!important}
html[data-nova-theme] .story-avatar-wrapper img{border-color:var(--nova-card-strong)!important}
html[data-nova-theme] .story-preview{background:var(--nova-input)!important;border-color:color-mix(in srgb,var(--nova-brand) 44%, transparent)!important}
html[data-nova-theme] .modal{background:rgba(0,0,0,.68)!important}
html[data-nova-theme] ::-webkit-scrollbar{width:10px;height:10px}
html[data-nova-theme] ::-webkit-scrollbar-track{background:transparent}
html[data-nova-theme] ::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--nova-muted) 32%, transparent);border-radius:999px;border:2px solid transparent;background-clip:content-box}
.nova-theme-switcher{position:fixed;right:18px;top:18px;z-index:1500;font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.nova-theme-toggle{height:46px;border:1px solid var(--nova-line);border-radius:999px;background:var(--nova-card-strong);color:var(--nova-ink);box-shadow:var(--nova-shadow-soft);display:flex;align-items:center;gap:9px;padding:0 15px;font-weight:900;cursor:pointer;backdrop-filter:blur(22px)}
.nova-theme-toggle i{color:var(--nova-brand)}
.nova-theme-menu{position:absolute;right:0;top:56px;width:188px;padding:8px;border:1px solid var(--nova-line);border-radius:22px;background:var(--nova-card-strong);box-shadow:var(--nova-shadow);backdrop-filter:blur(24px);display:none;gap:6px}
.nova-theme-switcher.open .nova-theme-menu{display:grid}
.nova-theme-menu button{height:42px;border:1px solid transparent;border-radius:16px;background:transparent;color:var(--nova-muted);display:flex;align-items:center;gap:10px;padding:0 10px;font-weight:900;cursor:pointer;text-align:left}
.nova-theme-menu button:hover,.nova-theme-menu button.active{background:var(--hover-bg);color:var(--nova-ink);border-color:var(--nova-line)}
.nova-theme-dot{width:18px;height:18px;border-radius:999px;box-shadow:inset 0 0 0 2px rgba(255,255,255,.25)}
.nova-theme-dot.midnight{background:linear-gradient(135deg,#070a16,#8b5cf6,#22d3ee)}
.nova-theme-dot.violet{background:linear-gradient(135deg,#12091f,#c084fc,#f472b6)}
.nova-theme-dot.ocean{background:linear-gradient(135deg,#03181f,#22d3ee,#38bdf8)}
.nova-theme-dot.graphite{background:linear-gradient(135deg,#0b0d10,#94a3b8,#60a5fa)}
@media(max-width:760px){
    html[data-nova-theme] body{background:linear-gradient(145deg,var(--nova-bg),var(--nova-bg-2))!important}
    html[data-nova-theme] .nova-app{background:transparent!important}
    .nova-theme-switcher{top:12px;right:12px}
    .nova-theme-toggle{width:44px;height:44px;padding:0;justify-content:center;border-radius:16px}
    .nova-theme-toggle span{display:none}
    .nova-theme-menu{top:52px;width:178px}
    html[data-nova-theme] .nova-bottom-nav{background:var(--nova-card-strong)!important}
    html[data-nova-theme] .chat-area{background:var(--nova-card-strong)!important}
}
