/* ===================== БАЗА ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Manrope', Arial, sans-serif;
  overflow-x: hidden;
  background-color: #05070a;
  color: #ffffff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===================== АНІМАЦІЇ ===================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes smoothFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 35px, 0) scale(.98);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes smoothFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes softPop {
  0% {
    transform: scale(.94);
  }

  70% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 77, 77, 0);
  }

  50% {
    box-shadow: 0 0 22px rgba(255, 77, 77, .28);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 77, 77, 0);
  }
}

/* ===================== ПРОДУКТИВНІСТЬ АНІМАЦІЙ ===================== */
.bg,
.clock,
.hero-text,
.join-box,
.menu-tabs,
.tab-btn,
.tab-content,
.tab-content h2,
.text-input,
.rule-card,
.role-card,
.review-card,
.join-link,
#copyBtn,
.leave-review-btn,
.license-search-btn,
.review-arrow,
.modal-box {
  backface-visibility: hidden;
}

/* ===================== ФОН ===================== */
.bg {
  position: fixed;
  inset: -40px;
  background-image: url("фото.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(5px) brightness(0.75);
  z-index: -2;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

@supports (-webkit-touch-callout: none) {
  .bg {
    position: absolute;
    background-attachment: scroll;
  }
}

/* ===================== ГОДИННИК ===================== */
.clock {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(10, 14, 22, 0.65);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 16px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.2s forwards;
}

/* ===================== HERO ===================== */
.content {
  width: 100%;
  min-width: 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto clamp(32px, 5vw, 48px);
  padding-top: clamp(60px, 10vw, 90px);
  padding-bottom: clamp(20px, 4vw, 30px);
  padding-left: clamp(16px, 6vw, 80px);
  padding-right: clamp(16px, 6vw, 80px);
  min-width: 0;
}

.hero-text {
  flex: 0 1 560px;
  min-width: 0;
  opacity: 0;
  animation: smoothFadeUp .8s cubic-bezier(.22,1,.36,1) .35s both;
}

.hero-text h1 {
  color: #ffffff;
  font-size: clamp(1.75rem, 5vw, 2.875rem);
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 24px rgba(0,0,0,0.6);
  overflow-wrap: anywhere;
}

.hero-text h1 span {
  color: #ff4d4d;
}

.hero-text p {
  color: #f0f2f5;
  font-size: clamp(0.8125rem, 2vw, 1rem);
  line-height: 1.7;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 18px rgba(0,0,0,0.6);
  overflow-wrap: anywhere;
}

.hero-text p .accent2 {
  color: #4d9fff;
  font-weight: 700;
}

/* ===================== JOIN BOX ===================== */
.join-box {
  flex: 0 1 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
  width: min(100%, 340px);
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(8px);
  opacity: 0;
  animation:
    smoothFadeUp .8s cubic-bezier(.22,1,.36,1) .55s both,
    softPop .55s ease .55s both;
}

.join-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ff4d4d;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.join-row-text {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  line-height: 1.3;
  min-width: 0;
}

.join-label {
  color: #9aa2b1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.join-row-text b {
  color: #ffffff;
  font-size: 15px;
}

#copyBtn {
  background: #ff4d4d;
  border: none;
  color: white;
  padding: 7px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
  flex-shrink: 0;
}

.join-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(77, 159, 255, 0.18);
  border: 1px solid #4d9fff;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition:
    background .25s ease,
    transform .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
  touch-action: manipulation;
}

.join-link.telegram {
  background: rgba(77, 200, 255, 0.15);
  border-color: #4dc8ff;
}

/* ===================== ВКЛАДКИ ===================== */
.menu-tabs {
  display: flex;
  gap: 12px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto 24px;
  padding-left: clamp(16px, 6vw, 80px);
  padding-right: clamp(16px, 6vw, 80px);
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #e5e9f0;
  padding: 10px 22px;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  touch-action: manipulation;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  opacity: 0;
  animation: smoothFadeUp .7s cubic-bezier(.22,1,.36,1) both;
}

.tab-btn:nth-child(1) {
  animation-delay: .75s;
}

.tab-btn:nth-child(2) {
  animation-delay: .87s;
}

.tab-btn:nth-child(3) {
  animation-delay: .99s;
}

.tab-btn:nth-child(4) {
  animation-delay: 1.11s;
}

.tab-btn:nth-child(5) {
  animation-delay: 1.23s;
}

.tab-btn.active {
  background: #ff4d4d;
  border-color: #ff4d4d;
  color: #ffffff;
}

.tab-content {
  display: none;
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  max-width: 1400px;
  margin: 0 auto clamp(60px, 8vw, 100px);
  margin-left: max(clamp(12px, 6vw, 80px), calc((100% - 1400px) / 2));
  margin-right: max(clamp(12px, 6vw, 80px), calc((100% - 1400px) / 2));
  padding: clamp(18px, 4vw, 40px);
  backdrop-filter: blur(10px);
}

.tab-content.active {
  display: block;
  animation: smoothFade .35s ease both;
}

.tab-content h2 {
  color: #ffffff;
  font-size: clamp(1.375rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  border-bottom: 3px solid #ff4d4d;
  display: inline-block;
  padding-bottom: 6px;
}

.placeholder-text {
  color: #9aa2b1;
  font-size: 15px;
  margin-top: 16px;
  text-align: center;
}

/* ===================== ПОШУК ===================== */
.text-input {
  display: block;
  width: 100%;
  padding: 13px 16px;
  margin: 16px 0 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: white;
  font: inherit;
  font-size: 15px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform .25s ease,
    opacity .25s ease;
}

.text-input:focus {
  outline: none;
  border-color: rgba(255, 77, 77, 0.5);
  background: rgba(255,255,255,0.09);
}

.text-input::placeholder {
  color: #9aa2b1;
}

.search-results {
  margin-bottom: 20px;
}

.search-result-item {
  background: rgba(255, 77, 77, 0.12);
  border: 1px solid rgba(255, 77, 77, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffdada;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    border-color 0.2s ease;
}

.search-result-item.no-results {
  cursor: default;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: #9aa2b1;
}

/* ===================== СІТКИ: ПРАВИЛА І РОЛІ ===================== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 14px;
}

.rule-card {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 20px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(35px) scale(.98);
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity .7s cubic-bezier(.22,1,.36,1);
}

.rule-card.flash {
  border-color: #ff4d4d;
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.35);
}

.rule-num {
  color: #ff4d4d;
  font-weight: 800;
  margin-right: 8px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 20px;
}

.role-card {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-left: 4px solid #ff4d4d;
  border-radius: 14px;
  padding: 28px;
  color: #ffffff;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(35px) scale(.98);
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity .7s cubic-bezier(.22,1,.36,1);
}

.role-card-text h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.role-card-text p {
  font-size: 13px;
  color: #9aa2b1;
}
/* ===================== МОДАЛКИ ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.modal-box {
  background: rgba(18, 21, 30, 0.97);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  width: min(92vw, 640px);
  max-height: min(85vh, 85dvh);
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  animation: fadeInUp 0.3s ease-out;
}

.modal-box::-webkit-scrollbar {
  display: none;
}

.modal-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(18, 21, 30, 0.99);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1;
}

.modal-header span {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

#modalClose,
#staffModalClose {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #9aa2b1;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.modal-body {
  padding: 24px;
  touch-action: pan-y;
}

.article-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 20px;
}

.article-title:first-child {
  margin-top: 0;
}

.article-text {
  color: #dfe3ea;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.article-paragraph {
  margin-bottom: 12px;
}

.article-paragraph:last-child {
  margin-bottom: 0;
}

.article-punishment {
  background: rgba(255, 77, 77, 0.12);
  border-left: 3px solid #ff4d4d;
  color: #ffb3b3;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
}

.article-image {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  margin: 12px 0;
  display: block;
  cursor: zoom-in;
  touch-action: manipulation;
  transition: transform 0.2s ease;
}

.highlight {
  background: rgba(255, 220, 0, 0.55);
  color: #1a1a1a;
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.4s ease;
}

.highlight.fade-out {
  background: transparent;
  color: inherit;
}

/* ===================== СПІВРОБІТНИКИ ===================== */
.staff-member {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  min-width: 0;
  transition: background 0.2s ease;
}

.staff-member img {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.staff-member-text {
  min-width: 0;
}

.staff-member-text b {
  color: #ffffff;
  font-size: 16px;
  display: block;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}

.staff-member-text span {
  color: #9aa2b1;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.staff-member-text a {
  color: #4d9fff;
  text-decoration: none;
}

/* ===================== ЛІЦЕНЗІЇ ===================== */
.license-check-box {
  max-width: 700px;
  margin: 20px auto 30px;
  text-align: center;
}

.license-check-label {
  color: #9aa2b1;
  font-size: 14px;
  margin-bottom: 16px;
}

.license-check-row {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.license-select,
.license-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.license-select:focus,
.license-input:focus {
  outline: none;
  border-color: rgba(255, 77, 77, 0.5);
  background: rgba(255,255,255,0.09);
}

.license-select {
  cursor: pointer;
  text-overflow: ellipsis;
}

.license-select option {
  background: #14161e;
  color: #ffffff;
}

.license-input::placeholder {
  color: #9aa2b1;
}

.license-search-btn {
  background: #ff4d4d;
  border: none;
  color: white;
  padding: 0 24px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.license-result-card {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(77, 255, 140, 0.4);
  border-radius: 14px;
  padding: 24px;
  animation: fadeInUp 0.3s ease-out;
}

.license-result-card.invalid {
  border-color: rgba(255, 77, 77, 0.5);
}

.license-result-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(77, 255, 140, 0.15);
  color: #7dffb0;
}

.license-result-status.invalid {
  background: rgba(255, 77, 77, 0.15);
  color: #ff9a9a;
}

.license-result-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.license-result-row:last-child {
  border-bottom: none;
}

.license-result-label {
  color: #9aa2b1;
  font-size: 13px;
}

.license-result-value {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.license-result-warning {
  margin-top: 16px;
  color: #ffb3b3;
  font-size: 13px;
  line-height: 1.5;
}

/* ===================== ВІДГУКИ ===================== */

.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.reviews-header h2 {
  margin-bottom: 0;
}

.leave-review-btn {
  background: rgba(77, 159, 255, 0.18);
  border: 1px solid #4d9fff;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: .25s;
}

.leave-review-btn:hover {
  background: rgba(77, 159, 255, 0.28);
}

.reviews-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

/* ===== КАРТКА ===== */

.review-card {
  width: min(100%, 600px);
  min-height: 300px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  animation: fadeInUp .35s ease-out;
  transition: .25s;
}

.review-content {
  width: 100%;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding-bottom: 16px;
  margin-bottom: 10px;

  border-bottom: 1px solid rgba(255,255,255,.08);
}

.review-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.review-avatar {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.18);
  flex-shrink: 0;
}

.review-meta {
  display: flex;
  align-items: center;
  height: 64px;
}

.review-nick {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin: 0;
}

.review-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.review-stars {
  color: #FFD54A;
  font-size: 18px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.review-date {
  margin-top: 6px;
  color: #9aa2b1;
  font-size: 13px;
}

.review-text {
  max-width: 82%;
  margin-top: 8px;
  color: #dfe3ea;
  font-size: 16x;
  line-height: 1.8;
  white-space: pre-line;
}

/* ===== СТРІЛКИ (НЕ ЗМІНЕНО) ===== */

.review-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background .25s,
    border-color .25s,
    transform .25s;
}

.review-arrow:hover {
  background: rgba(77,159,255,.18);
  border-color: #4d9fff;
  transform: scale(1.08);
}

.review-card:hover {
  border-color: rgba(77,159,255,.4);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
/* ===================== IMAGE LIGHTBOX ===================== */
.image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-lightbox.active {
  display: flex;
  animation: fadeIn .2s ease-out;
}

.image-lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 86vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

/* ===================== SCROLL ANIMATION ITEMS ===================== */
.animate-item {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .7s cubic-bezier(.22,1,.36,1),
    transform .7s cubic-bezier(.22,1,.36,1);
}

.animate-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* Правила і ролі НЕ повинні керуватись scroll-анімацією.
   Їх анімує script.js через animateCardsIn(). */
.rule-card.animate-item,
.role-card.animate-item,
.rules-grid.animate-item,
.roles-grid.animate-item {
  opacity: inherit;
  transform: inherit;
}
