* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 40px 20px;
  z-index: 1;
}

/* ФОН И МАТРИЦА */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(100%) brightness(0.3);
}

.matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ОВЕРЛЕЙ ВХОДА */
.enter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  backdrop-filter: blur(8px);
}

.enter-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-text {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  animation: pulse 2s infinite;
  text-align: center;
}

.enter-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  height: 320%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  animation: glow-breathe 3s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.98); }
}

/* СЕТКА КАРТОЧЕК */
.cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.cards-wrapper.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* КАРТОЧКА */
.card {
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 24px;
  flex: 0 1 320px;
  max-width: 440px;
  height: fit-content;
  min-height: 0;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 255, 255, 0.08);
}

.coming-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
}

.mc-whitelist-text {
  font-size: 0.88rem;
  color: #888888;
  line-height: 1.4;
  display: block;
}

/* КОНТЕЙНЕР ДЛЯ IP И ПАРОЛЕЙ */
.ip-container {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  overflow: hidden;
}

/* ТЕКСТ С IP */
.coming-sub {
  font-family: monospace;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.label-tag {
  font-size: 0.85rem;
  color: #aaaaaa;
  flex-shrink: 0;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: fit-content;
}

.copy-btn:hover {
  background: #ffffff;
  color: #000000;
}

.copy-btn.copied {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

/* СТАТУС СЕРВЕРА */
.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-online { background-color: #ffffff; box-shadow: 0 0 8px #ffffff; }
.status-offline { background-color: #555555; box-shadow: 0 0 4px #555555; }

/* ПОДВАЛ И ЭЛЕМЕНТЫ */
.bottom-footnote {
  margin-top: 24px;
  font-size: 0.85rem;
  color: #777777;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s ease 0.5s;
  text-align: center;
}

.bottom-footnote.reveal { opacity: 1; }

.footer-links {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  transition: opacity 1s ease 0.5s;
}

.footer-links.reveal { opacity: 1; }

.footer-btn {
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s;
}

.footer-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* ПЛЕЕР */
.media-controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  z-index: 100;
  max-width: 440px;
  width: max-content;
  opacity: 0;
  transition: opacity 1s ease 0.5s, max-width 0.3s ease;
}

.media-controls.reveal { opacity: 1; }

.media-controls.collapsed {
  max-width: 52px;
}

.player-toggle-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.media-controls.collapsed .player-toggle-btn {
  transform: rotate(-90deg);
}

.player-body {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  max-width: 500px;
  opacity: 1;
  transition: max-width 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

.media-controls.collapsed .player-body {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

.track-title-container {
  overflow: hidden;
  white-space: nowrap;
  width: 140px;
  font-size: 0.8rem;
  color: #cccccc;
  flex-shrink: 0;
  cursor: default;
}

.track-title-scroll {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

@keyframes scroll-text {
  0% { transform: translateX(0); }
  100% { transform: translateX(var(--scroll-distance, -50%)); }
}

.play-pause-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  fill: #ffffff;
  flex-shrink: 0;
}

.volume-slider {
  width: 65px;
  accent-color: #ffffff;
  flex-shrink: 0;
}

/* КНОПКИ ПЕРЕКЛЮЧЕНИЯ ТРЕКОВ */
.prev-track-btn,
.next-track-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}
.prev-track-btn:hover,
.next-track-btn:hover {
  color: #aaaaaa;
}

/* МОДАЛЬНОЕ ОКНО */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.modal-text {
  font-size: 0.92rem;
  color: #aaaaaa;
  line-height: 1.5;
  margin-bottom: 22px;
}

.modal-close-btn {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.modal-close-btn:hover {
  opacity: 0.85;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 850px) {
  body {
    min-height: 100vh;
    padding: 20px 14px 40px;
    justify-content: center;
  }

  .cards-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .card {
    max-width: 100%;
    padding: 20px;
    flex: none;
  }

  .footer-links {
    position: static;
    width: 100%;
    margin-top: 16px;
    flex-wrap: wrap;
    opacity: 1;
  }

  .footer-btn {
    flex: 1 1 45%;
    text-align: center;
  }

  .media-controls {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    opacity: 1;
  }

  .track-title-container {
    max-width: 150px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding: 20px 14px 100px;
    justify-content: flex-start;
  }

  .cards-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .card {
    flex: 1 1 calc(33.333% - 12px);
    max-width: 400px;
    min-width: 260px;
    padding: 16px;
  }

  .footer-links {
    position: fixed;
    bottom: 10px;
    right: 10px;
    left: auto;
    flex-direction: row;
    gap: 6px;
    margin: 0;
  }

  .media-controls {
    position: fixed;
    bottom: 10px;
    left: 10px;
    max-width: 220px;
    padding: 8px 10px;
    gap: 8px;
  }

  .track-title-container {
    width: 90px;
  }

  .volume-slider {
    width: 45px;
  }
}
