@font-face {
  font-family: 'CustomFont';
  src: url('../fonts/1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
:root {
  --bg: #07111f;
  --page-bg: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(86, 200, 255, 0.03) 2px,
      rgba(86, 200, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(86, 200, 255, 0.02) 2px,
      rgba(86, 200, 255, 0.02) 4px
    ),
    linear-gradient(180deg, rgba(3, 11, 25, 0.96), rgba(6, 16, 33, 0.94)), 
    url('../images/back.jfif') center/cover fixed no-repeat;
  --panel: rgba(8, 17, 32, 0.92);
  --panel-soft: rgba(10, 22, 44, 0.78);
  --panel-strong: rgba(6, 13, 24, 0.96);
  --text: #eef6ff;
  --muted: #a9bfda;
  --accent: #56c8ff;
  --accent-dark: #2f8eff;
  --border: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.06);
  --nav-bg-hover: rgba(255, 255, 255, 0.14);
  --toggle-bg: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.28);
  --snowflake: rgba(255, 255, 255, 0.92);
  --snowflake-shadow: 0 0 12px rgba(86, 200, 255, 0.35);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  font-family: 'CustomFont', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  position: relative;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.4s ease, color 0.4s ease;
}
body.page-visible {
  opacity: 1;
  transform: translateY(0);
}
body.page-exit {
  opacity: 0;
  transform: translateY(10px);
}
body, .site-header, .page-hero, .card, .gallery-card, .button, .site-nav a, .theme-toggle, .highlight-box, footer.site-footer {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(86, 200, 255, 0.03) 2px,
      rgba(86, 200, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(86, 200, 255, 0.02) 2px,
      rgba(86, 200, 255, 0.02) 4px
    ),
    radial-gradient(circle at top, rgba(86, 200, 255, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(86, 200, 255, 0.08), transparent 20%);
}
body.light-theme::before {
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(49, 120, 244, 0.02) 2px,
      rgba(49, 120, 244, 0.02) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(49, 120, 244, 0.015) 2px,
      rgba(49, 120, 244, 0.015) 4px
    ),
    radial-gradient(circle at top, rgba(49, 120, 244, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(49, 120, 244, 0.06), transparent 20%);
}
body.light-theme {
  --bg: #f7f8fb;
  --page-bg: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(49, 120, 244, 0.02) 2px,
      rgba(49, 120, 244, 0.02) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(49, 120, 244, 0.015) 2px,
      rgba(49, 120, 244, 0.015) 4px
    ),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(235, 239, 245, 0.94)), 
    url('../images/back.jfif') center/cover fixed no-repeat;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(245, 245, 248, 0.95);
  --text: #1c293e;
  --muted: #5f6d86;
  --accent: #3178f4;
  --accent-dark: #1753c7;
  --border: rgba(0, 0, 0, 0.12);
  --border-soft: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(0, 0, 0, 0.06);
  --nav-bg-hover: rgba(0, 0, 0, 0.12);
  --toggle-bg: rgba(0, 0, 0, 0.08);
  --shadow: rgba(21, 34, 54, 0.14);
  --snowflake: rgba(28, 41, 62, 0.92);
  --snowflake-shadow: 0 0 12px rgba(49, 120, 244, 0.26);
}
body.on-dark {
  background-color: var(--bg);
}
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 10px;
}
.site-logo {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 22px rgba(86, 200, 255, 0.16);
}
.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.site-nav::-webkit-scrollbar {
  display: none;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--nav-bg);
  transition: background 0.35s ease, transform 0.35s ease, color 0.35s ease;
  white-space: nowrap;
  font-size: clamp(0.9rem, 0.95vw, 1rem);
}
.site-nav a:hover {
  background: var(--nav-bg-hover);
  transform: translateY(-1px);
}
.theme-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--toggle-bg);
  color: var(--text);
  min-width: 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: transform 0.25s ease, background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
}
.site-nav .nav-cta {
  color: var(--text);
  background: linear-gradient(135deg, rgba(86, 200, 255, 0.18), rgba(86, 200, 255, 0.08));
  border: 1px solid rgba(86, 200, 255, 0.22);
  box-shadow: 0 14px 32px rgba(86, 200, 255, 0.12);
}
.site-nav .nav-cta:hover {
  background: linear-gradient(135deg, rgba(86, 200, 255, 0.28), rgba(86, 200, 255, 0.14));
}
.chat-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(86, 200, 255, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 48px;
  font-size: 1.4rem;
}
.chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(86, 200, 255, 0.24);
}
.music-button {
  position: fixed;
  right: 18px;
  bottom: 80px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(86, 200, 255, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 48px;
  font-size: 1.4rem;
}
.music-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(86, 200, 255, 0.24);
}
.music-button.playing {
  animation: spin 2s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: min(360px, calc(100% - 32px));
  max-height: 520px;
  display: none;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 30px 80px var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.chat-widget.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInChat 0.3s ease forwards;
}
@keyframes fadeInChat {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}
.chat-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font-size: 1.4rem;
  transition: background 0.25s ease, transform 0.25s ease;
  line-height: 1;
  min-width: 36px;
}
.chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 0.95rem;
}
.chat-message.bot {
  align-self: flex-start;
  background: rgba(86, 200, 255, 0.12);
  border: 1px solid rgba(86, 200, 255, 0.28);
  color: var(--text);
}
.chat-message.user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 18px;
  background: var(--panel-soft);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.chat-form button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
  line-height: 1;
  min-width: 44px;
}
.chat-form button:hover {
  transform: scale(1.08);
}

.page-hero {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  border-radius: 26px;
  padding: 48px 36px;
  box-shadow: 0 28px 90px var(--shadow);
  margin-top: 18px;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  line-height: 1.8;
  margin-bottom: 28px;
}
.section-title {
  font-size: clamp(1.6rem, 2vw, 2rem);
  margin-top: 48px;
  color: var(--text);
}
.card h2,
.team-card h2,
.section-title {
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}
.page-actions::-webkit-scrollbar {
  display: none;
}
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 32px;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  min-width: 220px;
  border-radius: 999px;
  border: 1px solid transparent;
  position: relative;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 18px 54px rgba(86, 200, 255, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.button::before,
button::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(86, 200, 255, 0.35), transparent 55%);
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.92);
  pointer-events: none;
}
.button:hover::before,
button:hover::before {
  opacity: 1;
  transform: scale(1);
}
.button:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 90px rgba(86, 200, 255, 0.35);
  border-color: rgba(86, 200, 255, 0.55);
}
.button:active,
button:active {
  transform: translateY(0);
}
.card-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 34px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 34px;
}
.card {
  background: rgba(8, 15, 28, 0.96);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  background: var(--panel);
  box-shadow: 0 20px 50px var(--shadow);
}
.card h2,
.card h3,
.section-title,
.team-card h2 {
  margin-bottom: 14px;
}
.card h2,
.team-card h2,
.section-title {
  font-size: 1.4rem;
}
.card p,
.card li,
.team-card p,
.gallery-caption,
.highlight-box p {
  color: var(--muted);
  line-height: 1.85;
}
.card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
}
.card li:before {
  content: '▹';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}
.section-title {
  font-size: 2rem;
  margin-top: 48px;
  color: var(--text);
}
.avatar {
  width: 100%;
  max-width: 160px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  border-color: rgba(86, 200, 255, 0.3);
}
.team-card h2 {
  margin-top: 14px;
}
.team-card p {
  margin: 10px 0;
}
.team-tip {
  color: var(--muted);
  margin-top: 12px;
  font-size: 1rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.gallery-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px var(--shadow);
  cursor: pointer;
  background: var(--panel-soft);
  padding: 0;
}
.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 24px;
  transition: transform 0.35s ease;
}
.gallery-card:hover img {
  transform: scale(1.02);
}
.gallery-caption {
  padding: 14px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--panel-strong);
  z-index: 9999;
  padding: 24px;
}
.modal.active {
  display: flex;
}
.modal-content {
  position: relative;
  max-width: 96vw;
  max-height: 96vh;
  width: min(960px, 100%);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;
  will-change: transform, opacity;
}
.modal.active .modal-content {
  opacity: 1;
  transform: scale(1);
  animation: pop-up 0.28s ease forwards;
}
.modal-content img {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 120px);
  border-radius: 24px;
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.38);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@keyframes pop-up {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}
.highlight-box {
  background: rgba(86, 200, 255, 0.12);
  border: 1px solid rgba(86, 200, 255, 0.18);
  border-radius: 22px;
  padding: 24px;
  margin-top: 20px;
}
.footer-note {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 12px;
}
footer.site-footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
footer.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}
.snowflake {
  position: fixed;
  color: var(--snowflake);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: drift 1s ease-out forwards;
  text-shadow: var(--snowflake-shadow);
}
@keyframes drift {
  0% {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) translateY(-24px) scale(1.2);
    opacity: 0;
  }
}
@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}
@media (max-width: 1200px) {
  .container {
    width: calc(100% - 28px);
  }
  .page-hero {
    padding: 38px 28px;
  }
  .page-hero p {
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .site-header {
    justify-content: center;
  }
  .site-nav {
    justify-content: center;
  }
  .page-hero {
    padding: 34px 24px;
  }
  .page-actions {
    justify-content: center;
  }
  .card-grid,
  .team-grid,
  .feature-grid,
  .gallery {
    grid-template-columns: 1fr;
  }
  .team-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .team-card .avatar {
    margin: 0 auto;
    max-width: 180px;
  }
  .gallery-card {
    min-height: auto;
    padding: 18px;
  }
  .gallery-card img {
    height: auto;
  }
  .theme-toggle {
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }
  .site-header .site-logo,
  .site-header .site-nav,
  .site-header .theme-toggle {
    width: 100%;
  }
  .site-header .theme-toggle {
    justify-self: flex-end;
    margin-top: 10px;
    width: 42px;
    align-self: flex-end;
  }
  .page-hero {
    padding: 24px 16px;
  }
  .page-hero h1 {
    font-size: 2.2rem;
  }
  .page-hero p {
    font-size: 1rem;
    max-width: 100%;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .page-actions {
    width: 100%;
    justify-content: stretch;
    gap: 14px;
  }
  .page-actions .button,
  .button,
  button {
    width: 100%;
    justify-content: center;
    min-width: unset;
    padding: 16px 20px;
  }
  .card-grid,
  .team-grid,
  .feature-grid,
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery-card {
    min-height: auto;
    padding: 14px;
  }
  .gallery-card img {
    height: auto;
  }
  .site-nav {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .site-nav a {
    flex: 0 0 auto;
    text-align: center;
  }
  body {
    background-attachment: scroll;
  }
}
