/* === DW ARMA v7.2 PREMIUM === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --surface: #0e0e0e;
  --border: #1a1a1a;
  --text: #fff;
  --text-secondary: #888;
  --accent: #A78BFA;
  --accent-hover: #8B5CF6;
  --discord: #5865F2;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #333;
}

/* Full Screen App Base */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: url('/bg.png') center/cover;
  position: relative;
}

#app::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(8px);
  z-index: 0;
}

#topnav,
#content {
  position: relative;
  z-index: 1;
}

/* Top Navigation */
#topnav {
  height: 70px;
  background: rgba(10, 10, 10, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.nav-logo span {
  color: var(--text-secondary);
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: var(--bg);
  background: var(--text);
}

/* Main Content Area */
#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel {
  display: none;
  width: 100%;
  min-height: 100%;
  padding: 40px 24px;
  animation: fadeIn 0.4s ease forwards;
}

.panel.active {
  display: block;
}

.panel-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.panel-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Buttons */
.btn-create {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-create:hover {
  transform: translateY(-2px);
}

/* Top Nav Profile */
.nav-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 16px 4px 4px;
  border-radius: 30px;
  border: 1px solid var(--border);
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-username {
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: 0.2s;
}

.nav-btn:hover {
  background: var(--text);
  color: var(--bg);
}

/* Clan Grid */
.clan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.clan-card {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: 0.3s;
  backdrop-filter: blur(10px);
}

.clan-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(25, 25, 25, 0.8);
}

.clan-card-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.clan-card-fallback {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.clan-card-info {
  flex: 1;
}

.clan-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.clan-card-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.clan-card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.clan-card-rating {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent);
}

/* News Card */
.news-card {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.news-card-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.news-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.news-card-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
  white-space: pre-wrap;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.news-img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.news-img:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .news-img {
    width: calc(50% - 4px);
    height: 120px;
  }
}

/* Rating Table */
.rating-row {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
  border-radius: 12px;
  cursor: pointer;
}

.rating-row:hover {
  background: rgba(30, 30, 30, 1);
}

.rating-rank {
  width: 40px;
  font-size: 1.2rem;
  font-weight: 800;
}

.rating-rank.top-1 {
  color: #FBBF24;
}

.rating-rank.top-2 {
  color: #9CA3AF;
}

.rating-rank.top-3 {
  color: #B45309;
}

.rating-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  margin-right: 16px;
}

.rating-name {
  flex: 1;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-pts {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.rating-pts-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-left: 4px;
  text-transform: uppercase;
}

/* Modal Forms */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  transform: scale(0.95);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 16px 0 6px;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-family: inherit;
}

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

.drop-zone {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 24px;
  cursor: pointer;
}

.btn-submit:hover {
  background: var(--accent-hover);
}

/* Onboarding (from old code but polished) */
#onboarding {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  animation: fadeIn 0.6s ease;
}

#ob-video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.5);
  transition: opacity 1s ease;
}

#onboarding {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: transparent;
  display: flex;
  overflow: hidden;
}

#ob-landing {
  background: transparent !important;
}

.ob-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ob-logo {
  font-size: 3rem;
  font-weight: 900;
}

.ob-logo-img {
  max-width: 280px;
  height: auto;
  margin-bottom: 32px;
  filter: drop-shadow(0 0 25px rgba(167, 139, 250, 0.4));
  animation: logoPulse 4s infinite ease-in-out;
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(167, 139, 250, 0.4));
  }

  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.6));
  }
}

.ob-logo span {
  color: var(--text-secondary);
}

.ob-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.ob-btn-primary {
  background: var(--discord);
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.ob-container {
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
}

.ob-step-label {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.ob-container h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.ob-container p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.ob-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ob-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
}

.ob-btn-primary[disabled] {
  opacity: 0.5;
  background: var(--border);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.ob-links {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.ob-link {
  flex: 1;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.ob-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ob-rules-box {
  text-align: left;
  height: 240px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  font-size: 0.85rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Global News Feed Updates */
.news-author-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nat-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.nat-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-author-tag span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.news-author-tag span b {
  color: var(--text);
}

.admin-tag span,
.admin-tag span b {
  color: #FCA5A5;
}

.admin-tag .nat-logo {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.admin-news {
  border-left: 4px solid #EF4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, rgba(20, 20, 20, 0.6) 100%);
}

/* Global News Scrolling */
#news-list {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 12px;
}

#news-list::-webkit-scrollbar {
  width: 4px;
}

#news-list::-webkit-scrollbar-track {
  background: transparent;
}

#news-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ========================================
   ИНФОРМАЦИЯ И АКАДЕМИЯ (ПАТЧ v8)
   ======================================== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.info-card {
  display: block;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.discord-card:hover {
  border-color: var(--discord);
  background: rgba(88, 101, 242, 0.05);
}

.youtube-card:hover {
  border-color: var(--danger);
  background: rgba(248, 113, 113, 0.05);
}

.ic-icon {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-card .ic-icon {
  color: var(--discord);
}

.youtube-card .ic-icon {
  color: var(--danger);
}

.ic-text {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.academy-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.academy-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--dur) var(--ease);
}

.academy-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.ac-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.ac-desc {
  font-size: 0.88rem;
  color: var(--text-mute);
  margin-bottom: 20px;
  font-weight: 500;
}

.ac-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac-link {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-s);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}

.ac-link::before {
  content: '→';
  font-size: 1.1rem;
  color: var(--text-mute);
  margin-right: 12px;
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.ac-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ac-link:hover::before {
  color: var(--accent);
  transform: translateX(3px);
}

/* ========================================
   PATCH v9 (Info Tab Icons & Scroll Fix)
   ======================================== */
#app {
  overflow: hidden;
  /* Предотвращаем скролл самого body/app */
}

#content {
  flex: 1;
  min-height: 0;
  /* Позволяет flex-контейнеру корректно сжиматься */
  overflow-y: auto;
  /* Включает правильный скролл внутри контента */
  overflow-x: hidden;
  padding-bottom: 60px;
  /* Отступ снизу для мобилок */
}

.panel {
  display: none;
  width: 100%;
  max-height: calc(100vh - 70px);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 40px 24px 80px;
  animation: fadeIn 0.4s ease forwards;
}

.panel.active {
  display: block;
}

/* Header с иконками */
.info-header-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.info-header-titles {
  flex: 1;
  padding-right: 20px;
}

@media (max-width: 600px) {
  .info-header-box {
    flex-direction: column;
    gap: 20px;
  }
}

/* Иконки соц. сетей */
.social-icons {
  display: flex;
  gap: 12px;
}

.si-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  transition: all var(--dur) var(--ease);
}

.si-discord:hover {
  background: rgba(88, 101, 242, 0.15);
  color: var(--discord);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

.si-youtube:hover {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

/* Список материалов */
.academy-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.academy-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--dur) var(--ease);
}

.academy-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.ac-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.ac-desc {
  font-size: 0.88rem;
  color: var(--text-mute);
  margin-bottom: 20px;
  font-weight: 500;
}

.ac-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac-link {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-s);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}

.ac-link::before {
  content: '→';
  font-size: 1.1rem;
  color: var(--text-mute);
  margin-right: 12px;
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.ac-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ac-link:hover::before {
  color: var(--accent);
  transform: translateX(3px);
}

/* ========================================
   PATCH v10 (Hard Scroll Fix for Information Panel)
   ======================================== */
#panel-info {
  background: transparent;
}

#panel-info .panel-inner {
  /* Дополнительный отступ снизу в 100px, чтобы контент не прилипал к краю экрана */
  padding-bottom: 100px !important;
  margin-bottom: 40px !important;
}

/* Также делаем так, чтобы если контент общий сломался, body сам скроллился как фоллбек */
body {
  overflow: hidden !important;
}

/* ========================================
   LANGUAGE SWITCHER v11
   ======================================== */
.lang-sel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  margin-right: 12px;
  appearance: none;
}

.lang-sel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang-sel option {
  background: var(--surface);
  color: var(--text);
}

/* ========================================
   PATCH v12 (Top Nav Profile Flex Fix)
   ======================================== */
#nav-profile {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Немного отодвигаем селектор языка от профиля */
.lang-sel {
  margin-right: 18px !important;
  padding: 8px 14px !important;
  font-size: 0.85rem !important;
}

/* ========================================
   PATCH v13 (Combobox Profile + Icon Buttons)
   ======================================== */
.nav-profile-combo {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 4px;
  padding-right: 12px;
  border-radius: 30px !important;
  border: 1px solid var(--border) !important;
}

.divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}

/* Язык без явной обводки внутри профиля */
.lang-sel-minimal {
  background: transparent !important;
  border: none !important;
  color: var(--text-s) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: none !important;
  transition: color 0.2s !important;
  margin: 0 !important;
  padding: 0 !important;
}

.lang-sel-minimal:hover {
  color: var(--text) !important;
}

.lang-sel-minimal option {
  background: var(--surface) !important;
  color: var(--text) !important;
}

/* Иконки кнопок (Админка, Выход) */
.nav-icon-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-s) !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.logout-btn:hover {
  background: rgba(248, 113, 113, 0.05) !important;
  color: var(--danger) !important;
  border-color: rgba(248, 113, 113, 0.2) !important;
}

#nav-profile {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* ========================================
   PATCH v14 (Custom Dropdown)
   ======================================== */
.custom-lang {
  position: relative;
  display: inline-block;
  cursor: pointer;
  color: var(--text-s);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 8px;
  user-select: none;
}

.custom-lang:hover .cl-val {
  color: var(--text);
}

.custom-lang:hover .cl-opts {
  display: flex !important;
}

.cl-opts {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #111111;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-direction: column;
  overflow: hidden;
  min-width: 60px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  margin-top: 8px;
}

.cl-opts div {
  padding: 8px 12px;
  text-align: center;
  color: var(--text-s);
  transition: all 0.2s;
}

.cl-opts div:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* ========================================
   PATCH v17 (Custom Language Dropdown UI)
   ======================================== */
.custom-lang {
  position: relative;
  display: inline-block;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 6px;
  user-select: none;
  min-width: 40px;
  text-align: center;
}

.custom-lang:hover .cl-val {
  color: #ffffff;
}

.custom-lang:hover .cl-opts {
  display: flex !important;
}

.cl-opts {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-direction: column;
  overflow: hidden;
  min-width: 60px;
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  margin-top: 6px;
}

.cl-o {
  padding: 8px 12px;
  text-align: center;
  color: var(--text-s);
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.cl-o:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ========================================
   PATCH v37 (Language Dropdown Fixes)
   ======================================== */

/* 1. Выносим родительские элементы шапки на самый верхний слой (Stacking Context), 
      чтобы кнопки сайта (такие как "Создать отряд") не перекрывали меню */
nav,
header,
.top-nav,
.user-profile,
#user-profile-display {
  position: relative;
  z-index: 9999 !important;
}

/* 2. Создаем "невидимый мост" между кнопкой языка и выпадающим меню,
      чтобы мышка не попадала в пустоту (gap) и меню не исчезало мгновенно */
.custom-lang::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -15px;
  right: -15px;
  height: 15px;
  background: transparent;
  z-index: 1;
}

/* 3. Гарантируем, что само меню находится поверх всего */
.cl-opts {
  margin-top: 8px !important;
  z-index: 10000 !important;
}


/* ========================================
   PATCH v38 (Dynamic Background Engine)
   ======================================== */

/* Делаем сам сайт прозрачным, чтобы было видно новый задний слой с фоном */
body {
  background-color: transparent !important;
  background-image: none !important;
}

/* Скрытые элементы фона с 2-секундной плавной анимацией появления */
.dyn-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

/* Активный элемент, который плавно выплывает на экран */
.dyn-bg.active {
  opacity: 1;
}

/* ========================================
   PATCH v39 (Background Tuning)
   ======================================== */

/* 1. Полностью убиваем стандартную старую картинку с размытием,
      которая лежала поверх новых красивых задников и мутила их */
.bg-image {
  display: none !important;
  background-image: none !important;
}

/* 2. Делаем общую темную маску/шум чуть слабее, чтобы картинка была сочнее */
.bg-overlay {
  opacity: 0.2 !important;
}

/* 3. Уменьшаем размытие главного интерфейса на 25% (с 16px до 12px), 
      и делаем сам блок чуть более прозрачным */
.dashboard-content {
  backdrop-filter: blur(8px) !important;
  background: rgba(0, 0, 0, 0.6) !important;
}

/* --- News Action Stickers --- */
.news-admin-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.news-action-btn {
  width: 28px;
  height: 28px;
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #a1a1aa;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.news-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.news-action-btn.active {
  background: #A78BFA;
  color: #000;
  border-color: #A78BFA;
}

.news-action-btn.edit-btn:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.news-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* Custom News Links */
.news-link {
  transition: color 0.2s;
  font-weight: 500;
}

.news-link:hover {
  color: #C4B5FD !important;
  text-decoration: underline !important;
}