:root {
  --chaytu-neon-art: url("/manus-storage/async-images/0BF7me0Q0VeK3hqeAxswRQ/image-1.webp");
  --neon-night: #050817;
  --neon-ink: #071022;
  --neon-panel: rgba(10, 17, 35, .93);
  --neon-panel-soft: rgba(12, 23, 45, .88);
  --neon-line: #24436a;
  --neon-line-bright: #3e83a6;
  --neon-text: #ebf8ff;
  --neon-muted: #91a8bd;
  --neon-cyan: #63e6e7;
  --neon-green: #71f2ae;
  --neon-violet: #a78bfa;
  --neon-purple: #8f75e8;
  --neon-danger: #ff647d;
  --neon-warn: #ffbe68;
  color-scheme: dark;
}

body {
  background: var(--neon-night);
  color: var(--neon-text);
}

.weather-screen {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(41, 112, 149, .28), transparent 35%),
    radial-gradient(circle at 82% 78%, rgba(103, 67, 183, .22), transparent 34%),
    var(--chaytu-neon-art) center / cover no-repeat,
    linear-gradient(145deg, #050817, #08142b 54%, #08091c);
}

.weather-card {
  background: rgba(5, 12, 28, .93);
  border-color: #335d85;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .68), 0 0 48px rgba(54, 164, 211, .12);
}
.weather-card h1 { color: var(--neon-text); }
.weather-copy, .weather-meta { color: var(--neon-muted); }
.auth-panel { border-top-color: #294b74; }
.auth-tab { background: #0c1830; border-color: #29466e; color: #91a6c1; }
.auth-tab.active { background: linear-gradient(110deg, #6be8a9, #59dce5); border-color: #8afbd1; color: #06172a; box-shadow: 0 0 20px rgba(89, 220, 229, .24); }
.register-input, .weather-card input { background: #070f21; border-color: #2e517a; color: var(--neon-text); }
.register-input:focus, .weather-card input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 2px rgba(99, 230, 231, .16); }
.primary-button { background: linear-gradient(110deg, #62efaa, #48d8db); color: #061525; box-shadow: 0 0 22px rgba(72, 216, 219, .24); }
.primary-button:hover { background: linear-gradient(110deg, #7cf7b9, #76eced); }
.register-status.error, .setting-status.error, .friend-qr-status.error { color: #ff8b9c; }

.app-shell {
  min-width: 0;
  overflow-x: clip;
  background-color: var(--neon-night);
  background-image:
    var(--chaytu-neon-art),
    radial-gradient(ellipse at 12% 0%, rgba(24, 188, 170, .22), transparent 36%),
    radial-gradient(ellipse at 88% 16%, rgba(116, 76, 215, .2), transparent 34%),
    radial-gradient(ellipse at 50% 100%, rgba(13, 82, 146, .18), transparent 43%),
    linear-gradient(135deg, #050817 0%, #08142a 52%, #09091d 100%);
  background-position: center, center, center, center, center;
  background-size: cover, auto, auto, auto, auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.topbar {
  background: rgba(5, 10, 25, .91);
  border-bottom-color: #203c62;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.brand { min-width: 0; }
.brand-mark { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: none; background: transparent; }
.brand-logo { filter: drop-shadow(0 0 11px rgba(99, 230, 231, .55)); }
.brand strong { color: var(--neon-cyan); text-shadow: 0 0 18px rgba(99, 230, 231, .22); }
.brand small { color: #8aa5bd; }

.ghost-button, .secondary-button, .subtle-button {
  background: rgba(10, 21, 42, .88);
  border-color: #2b5278;
  color: #bcd2e6;
  min-height: 44px;
}
.ghost-button:hover, .secondary-button:hover, .subtle-button:hover {
  background: rgba(24, 49, 75, .96);
  border-color: var(--neon-cyan);
  color: #eaffff;
}
.current-user { background: rgba(10, 20, 42, .86); border-color: #2b5278; }
.unread-badge { background: #27306b; color: #d9d8ff; border-color: #676bd2; }

.sidebar {
  background: rgba(4, 11, 26, .68);
  border-right-color: #1c3b61;
}
.side-heading, .tiny-code { color: #8eabc4; }
.node-card, .protocol-card {
  background: rgba(10, 22, 45, .9);
  border-color: #254c76;
}
.node-avatar { background: #123b54; color: #a9f5ef; }
.node-card small, .protocol-card small { color: #8da9bd; }
.side-nav a { color: #9ab0c4; }
.side-nav a:hover, .side-nav a.active { background: linear-gradient(110deg, #67eaa8, #55dfe1); color: #061525; box-shadow: 0 0 18px rgba(85, 223, 225, .18); }
.protocol-icon { color: var(--neon-violet); }

.content { min-width: 0; }
.room-navigation {
  background: linear-gradient(110deg, rgba(19, 51, 62, .84), rgba(43, 31, 72, .84));
  border-color: #315d82;
  border-right-color: #9471ca;
  box-shadow: 0 9px 28px rgba(0, 0, 0, .24);
}
.room-nav-button { color: #a7bfd3; min-height: 44px; }
.room-nav-button:hover { color: #e7fbff; border-color: #4d8fb1; }
.room-nav-button.active {
  background: linear-gradient(110deg, #71f2ae 0%, #52dde4 100%);
  border-color: #9bffe0;
  color: #061525;
  box-shadow: 0 0 0 3px rgba(99, 230, 231, .12), 0 0 24px rgba(82, 221, 228, .3);
}
.room-nav-button.active span { color: #0b2940; }
.eyebrow { color: #7eeed6; }
.content-heading h2 { color: #f0f8ff; }
.connection-badge { color: #9ebbd1; }

.panel {
  background: linear-gradient(145deg, rgba(19, 37, 53, .86), rgba(27, 20, 49, .88));
  border-color: #4c7d92;
  border-right-color: #9471ca;
  box-shadow: 0 0 0 1px rgba(101, 210, 226, .08), 0 18px 44px rgba(0, 0, 0, .3), 0 0 24px rgba(117, 66, 198, .08);
  backdrop-filter: blur(8px);
}
.panel-header { border-bottom-color: #234568; }
.panel-header strong { color: #e9f7ff; }
.panel-header small, .empty-state { color: #91a9bf; }
.chat-panel-header .secondary-button,
#new-conversation-btn {
  background: linear-gradient(110deg, #63ecaa, #4bdde0);
  border-color: #8fffe0;
  color: #061525;
  box-shadow: 0 0 22px rgba(75, 221, 224, .27);
}
.chat-panel-header .secondary-button:hover,
#new-conversation-btn:hover { background: linear-gradient(110deg, #87f7bd, #7cecef); color: #061525; }

.conversation-toolbar, .conversation-builder { border-bottom-color: #24496d; background: rgba(8, 19, 39, .84); }
.conversation-toolbar select, .conversation-builder .settings-input,
.contact-search input, .chat-form input, .settings-input,
.inline-form input, .voice-personal-picker select,
.friend-qr-dialog input[type=text] {
  background: #070f22;
  border-color: #2c527b;
  color: var(--neon-text);
}
.conversation-toolbar select:focus, .contact-search input:focus,
.chat-form input:focus, .settings-input:focus, .inline-form input:focus,
.voice-personal-picker select:focus, .friend-qr-dialog input[type=text]:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(99, 230, 231, .14);
}

.message.incoming {
  background: rgba(36, 25, 69, .86);
  border-left: 2px solid var(--neon-violet);
  color: #eee8ff;
  box-shadow: 0 0 18px rgba(143, 117, 232, .1);
}
.message.outgoing {
  background: linear-gradient(120deg, #22edaa, #1ee0ed);
  border-right: 2px solid #72f6d4;
  color: #062c2f;
  box-shadow: 0 0 22px rgba(78, 224, 191, .3);
}
.message-meta, .chat-footer, .poll-status { color: #87a0b6; }

.contacts-panel, .settings-card, .inbox-panel, .independent-voice-panel { background: linear-gradient(145deg, rgba(12, 23, 47, .95), rgba(8, 16, 34, .95)); }
.contact-section, .contact-row, .inbox-row { border-color: #23476b; }
.contact-info strong, .inbox-row strong { color: #e1f1fb; }
.contact-info small, .contact-empty, .inbox-row small, .inbox-privacy { color: #8da7bc; }
.contact-info .avatar { background: #193b59; border-color: #397c96; color: #b7f8ef; }
.contact-action, .notification-button {
  background: rgba(13, 31, 53, .9);
  border-color: #326183;
  color: #b5d9e7;
  min-height: 44px;
}
.contact-action:hover, .notification-button:hover { border-color: var(--neon-cyan); background: #183957; color: #f0ffff; }
.contact-action.accept { background: #123c41; border-color: #48c6a6; color: #b9ffe4; }
.contact-action:disabled, button:disabled, select:disabled, input:disabled { opacity: .48; cursor: not-allowed; }

.composer-panel { background: rgba(8, 17, 36, .96); border-color: #315b83; box-shadow: 0 -12px 34px rgba(0, 0, 0, .32); }
.chat-form { border: 0; }
.send-button { background: linear-gradient(120deg, #5decaa, #45d9df); color: #061525; box-shadow: 0 0 20px rgba(69, 217, 223, .28); min-width: 44px; min-height: 44px; }
.send-button:hover { background: linear-gradient(120deg, #8af7bd, #7af0ef); }
.timer-setting-btn { background: #15294a; border-color: #2e5277; color: #abc5db; min-height: 44px; }
.timer-setting-btn.active, .filter-btn.active, .conversation-kind-btn.active, .voice-mode.active, .walkie-mode.active {
  background: linear-gradient(110deg, #61e8a6, #51dce1);
  border-color: #94ffe0;
  color: #061525;
}
.emoji-toggle { background: #122e49; border-color: #3d7b9a; color: #c5fdf1; min-height: 44px; }
.emoji-toggle:hover:not(:disabled), .emoji-toggle[aria-expanded=true] { background: #1a5360; border-color: var(--neon-cyan); }
.emoji-picker { background: rgba(8, 18, 39, .98); border-color: #427ca0; box-shadow: 0 -12px 38px rgba(0, 0, 0, .55); }
.emoji-picker-header strong, .emoji-picker-status { color: #e8f8ff; }
.emoji-picker-header button, .emoji-category, .emoji-option { background: #112744; border-color: #2a5278; color: #bed7e6; }
.emoji-category[aria-pressed=true], .emoji-option:hover { background: #24466b; border-color: var(--neon-cyan); color: #f0ffff; }

.voice-mode, .walkie-mode, .conversation-kind-btn, .filter-btn, .member-choice, .voice-choice {
  background: #0c1d37;
  border-color: #2c5277;
  color: #a9c4d8;
  min-height: 44px;
}
.voice-participant { background: #12354a; border-color: #388ca1; color: #baf7ec; }
.voice-status, .walkie-status, .voice-fx-note, .microphone-protection small { color: #91a9bc; }
.voice-effect-controls, .microphone-protection, .walkie-panel { background: rgba(8, 25, 45, .9); border-color: #2e6178; }
.voice-effect-controls button { background: #163a50; border-color: #3d8195; color: #caf9f0; min-height: 44px; }
.voice-effect-controls button[aria-pressed=false] { background: #17243a; border-color: #405a79; color: #a5b7cb; }
.voice-effect-controls button:hover:not(:disabled) { background: #225d69; border-color: var(--neon-cyan); }
.voice-busy-status, #calls-busy-status, #walkie-busy-status { background: rgba(55, 39, 24, .94); border-color: #9b6b35; color: #ffd393; }

.phone-control.is-end, .phone-control.is-hangup, .walkie-end-button {
  background: #3d1527;
  border-color: var(--neon-danger);
  color: #ffdce3;
}
.phone-control.is-end .phone-symbol, .phone-control.is-hangup .phone-symbol { background: #69233b; color: #ff7892; }
.phone-control.is-end:hover, .phone-control.is-hangup:hover, .walkie-end-button:hover { background: #61213a; border-color: #ff9aaa; }
.walkie-talk-button.transmitting { background: #d47b2b; border-color: #ffd078; color: #fff; box-shadow: 0 0 22px rgba(255, 183, 91, .3); }
.walkie-talk-button:not(:disabled):not(.transmitting):hover { background: #205a63; border-color: #7ef0e4; }

.secure-chip, .encryption-badge { background: #132d4d; border-color: #397da0; color: #aeeff0; }
.danger-zone { border-color: #7d3048; background: linear-gradient(145deg, rgba(40, 17, 39, .96), rgba(17, 14, 35, .96)); }
.danger-zone p, .danger-icon { color: #ff9bab; }
.danger-button { background: #4b192d; border-color: var(--neon-danger); color: #ffd5dd; min-height: 44px; }
.danger-button:hover { background: #70223c; border-color: #ff99aa; }
.error, .register-status.error, .setting-status.error, .notification-status.error { color: #ff899d; }
.notification-dialog, .friend-qr-dialog { background: rgba(7, 15, 34, .98); border-color: #39719a; color: var(--neon-text); box-shadow: 0 25px 90px rgba(0, 0, 0, .7); }
.notification-dialog header, .friend-qr-dialog header { border-bottom-color: #254b72; }
.notification-dialog::backdrop, .friend-qr-dialog::backdrop { background: rgba(2, 5, 18, .78); }
.notification-toast { background: #173b51; border-color: var(--neon-cyan); color: #eaffff; }
.friend-qr-modes button[aria-pressed=true] { background: linear-gradient(110deg, #61e7a7, #53dce1); border-color: #9dffe2; color: #061525; }
.friend-qr-candidate { background: #142f49; border-color: #4187a5; }

.app-footer { border-top-color: #1c3c61; color: #7895ad; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: #83f5e2; }

@media (max-width: 850px) {
  .app-shell { background-attachment: scroll; }
  .topbar, .sidebar, .content, .panel { min-width: 0; }
  .room-navigation { max-width: 100%; }
}
@media (max-width: 580px) {
  .topbar-actions .ghost-button { white-space: normal; overflow-wrap: anywhere; line-height: 1.15; flex-wrap: wrap; }
  .room-nav-button { min-height: 44px; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
  .contact-action, .notification-button, .timer-setting-btn { min-height: 44px; }
  .emoji-picker { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
