:root {
  --bg: #f8fbff;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #ff00ff;
  --accent-2: #00e5ff;
  --accent-3: #00b8d4;
  --accent-4: #ff9f1c;
  --accent-5: #ffd166;
  --accent-6: #06d6a0;
  --accent-7: #4c6fff;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: #ffffff;
  --glass: rgba(255, 255, 255, 0.8);
  --border: #e2e8f0;
  --shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, rgba(0, 229, 255, 0.1) 0%, rgba(248, 251, 255, 1) 55%, rgba(255, 255, 255, 1) 100%);
}

body.modal-open {
  overflow: hidden;
}

body.theme-dark {
  --bg: #0b1220;
  --ink: #eef2ff;
  --muted: #94a3b8;
  --accent: #ff5cf0;
  --accent-2: #45f3ff;
  --accent-3: #2ad1ee;
  --accent-4: #ffb86c;
  --accent-5: #ffe29a;
  --accent-6: #34d399;
  --accent-7: #60a5fa;
  --card: rgba(15, 23, 42, 0.92);
  --card-strong: #0f172a;
  --glass: rgba(15, 23, 42, 0.85);
  --border: #1f2937;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 22px rgba(0, 0, 0, 0.35);
  background: radial-gradient(circle at top, rgba(0, 229, 255, 0.08) 0%, #0b1220 60%, #0b1220 100%);
}

#app-loader {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  z-index: 9999;
}

#app-loader.active {
  width: 70%;
  opacity: 1;
}

#app-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: rgba(15, 23, 42, 0);
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease;
  z-index: 9998;
}

body.app-loading-visible #app-loading-overlay {
  opacity: 1;
  visibility: visible;
}

body.app-loading-critical #app-loading-overlay {
  background: rgba(15, 23, 42, 0.35);
  align-items: center;
  pointer-events: auto;
}

body.theme-dark.app-loading-critical #app-loading-overlay {
  background: rgba(11, 18, 32, 0.6);
}

#app-loading-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
}

.app-loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

body.theme-dark .app-loading-spinner {
  border-color: rgba(255, 255, 255, 0.3);
}

body.app-is-loading {
  cursor: progress;
}

a {
  color: var(--accent-3);
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

body.theme-dark .topbar {
  background: rgba(10, 15, 28, 0.92);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 229, 255, 0.25);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.theme-dark .nav a {
  color: var(--ink);
}

.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.nav-notifications-wrap {
  position: relative;
  display: inline-flex;
}

.nav-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0;
  cursor: pointer;
}

body.theme-dark .nav-notifications {
  background: rgba(15, 23, 42, 0.6);
}

.nav-notifications-wrap.is-open .nav-notifications {
  background: rgba(76, 111, 255, 0.12);
  border-color: rgba(76, 111, 255, 0.4);
}

body.theme-dark .nav-notifications-wrap.is-open .nav-notifications {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
}

.nav-notifications svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.95;
}

.nav-notifications-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}

.nav-notifications[data-tooltip]:hover::after,
.nav-notifications[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  z-index: 20;
}

.nav-notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, 92vw);
  max-height: min(68vh, 430px);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 40;
}

.nav-notifications-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-notifications-panel-head strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-notifications-panel-head a {
  margin-left: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.nav-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-notifications-item {
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.04);
  padding: 10px;
}

body.theme-dark .nav-notifications-item {
  background: rgba(15, 23, 42, 0.5);
}

.nav-notifications-item.is-unread {
  border-color: rgba(76, 111, 255, 0.35);
  background: rgba(76, 111, 255, 0.08);
}

body.theme-dark .nav-notifications-item.is-unread {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.15);
}

.nav-notifications-item-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.nav-notifications-item-body {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-notifications-item-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.nav-notifications-item-meta a {
  margin-left: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.nav-notifications-empty {
  margin: 0;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--muted);
}

.nav-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.theme-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

body.theme-dark .theme-toggle {
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.topbar .lang-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.lang-switch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.lang-switch.is-open .lang-switch-trigger {
  background: rgba(76, 111, 255, 0.12);
  border-color: rgba(76, 111, 255, 0.4);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.lang-switch-trigger-flag,
.lang-switch-option-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
  letter-spacing: normal;
  text-transform: none;
}

.lang-switch-trigger-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switch-trigger svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.lang-switch-trigger:focus-visible,
.lang-switch-add-btn:focus-visible,
.lang-switch-option:focus-visible,
.lang-switch-picker-close:focus-visible {
  outline: 2px solid rgba(76, 111, 255, 0.45);
  outline-offset: 2px;
}

.lang-switch-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, 92vw);
  max-height: min(72vh, 460px);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 42;
}

.lang-switch-panel-head {
  display: grid;
  gap: 4px;
  padding: 2px 4px 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.lang-switch-panel-head strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-switch-panel-head span {
  font-size: 12px;
  color: var(--muted);
}

.lang-switch-list,
.lang-switch-picker-list {
  display: grid;
  gap: 8px;
}

.lang-switch-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.lang-switch-option:hover {
  border-color: rgba(76, 111, 255, 0.22);
  background: rgba(76, 111, 255, 0.08);
}

.lang-switch-option.is-active {
  border-color: rgba(76, 111, 255, 0.4);
  background: rgba(76, 111, 255, 0.12);
}

.lang-switch-option-flag {
  width: 30px;
  height: 30px;
  font-size: 18px;
  flex: 0 0 auto;
}

.lang-switch-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.lang-switch-option-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.lang-switch-option-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switch-panel-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.lang-switch-add-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px dashed rgba(76, 111, 255, 0.35);
  background: rgba(76, 111, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.lang-switch-picker {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: min(360px, 92vw);
  max-height: min(72vh, 460px);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 43;
}

.lang-switch-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.lang-switch-picker-head strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-switch-picker-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

body.theme-dark .lang-switch-trigger,
body.theme-dark .lang-switch-option,
body.theme-dark .lang-switch-picker-close {
  background: rgba(15, 23, 42, 0.6);
}

body.theme-dark .lang-switch.is-open .lang-switch-trigger,
body.theme-dark .lang-switch-option.is-active {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
}

body.theme-dark .lang-switch-option:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.14);
}

body.theme-dark .lang-switch-add-btn {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.12);
}

.nav-meta .nav-profile-link {
  margin-left: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.experience-full {
  max-width: 100%;
  padding: 20px 24px 60px;
  overflow-x: visible;
}

#app-main {
  transition: opacity 0.2s ease;
}

body.app-loading-critical #app-main {
  opacity: 0.6;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
  padding: 30px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 36px;
  margin: 0 0 12px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

body.theme-dark .card {
  background: var(--card-strong);
  border: 1px solid var(--border);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 24px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  background: var(--card);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-height: 85vh;
  overflow: auto;
}

.modal-card h3 {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.modal-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5d6d0;
  color: #7a1f12;
  font-size: 14px;
}

.modal-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

