:root {
  --primary-color: #ff4444;
  --secondary-color: #ffaa00;
  --dark-bg: #0a0a0a;
  --dark-secondary: #1a1a1a;
  --dark-tertiary: #2a2a2a;
  --text-light: #ffffff;
  --text-gray: #b0b0b0;
  --accent-gradient: linear-gradient(135deg, #ff4444, #ffaa00);
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  touch-action: manipulation;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
}

.logo {
  font-size: 30px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.btn-register {
  background: var(--accent-gradient);
  padding: 10px 25px;
  border-radius: 25px;
  color: white !important;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.btn-register:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  transition: all 0.3s ease;
}

.hero-section {
  margin-top: 70px;
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.6) 60%);
}

.hero-video {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  pointer-events: none;
  padding-top: 24px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 10px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-gray);
  animation: fadeInUp 0.8s ease 0.2s;
  animation-fill-mode: both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  padding: 60px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.groups-section {
  background: var(--dark-secondary);
}

.groups-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: var(--dark-tertiary);
  height: 200px;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 68, 68, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.view-icon {
  font-size: 2rem;
}

.closing-section {
  background: var(--dark-bg);
}

.video-wrapper {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.closing-section .video-wrapper {
  max-width: 500px;
  margin: 0 auto;
}

.opening-block {
  margin-top: 90px;
  padding: 40px 0 10px;
  background: var(--dark-bg);
}

.opening-title {
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.opening-subtitle {
  text-align: center;
  color: var(--text-gray);
  margin-bottom: 18px;
}

.opening-video-wrap {
  display: flex;
  justify-content: center;
}

.opening-video {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.closing-video {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.sponsors-section {
  background: var(--dark-secondary);
}

.sponsors-content {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.sponsor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: var(--card-shadow, 0 8px 28px rgba(0, 0, 0, 0.25));
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.16);
}

.sponsor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.sponsor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sponsor-info {
  flex: 1 1 auto;
  min-width: 0;
}

.sponsor-name {
  margin: 0 0 6px 0;
  font-weight: 800;
  font-size: 1.05rem;
}

.sponsor-social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-btn.ig {
  color: #E4405F;
}

.social-btn.vk {
  color: #4680C2;
}

.sponsors-section {
  --card-bg: rgba(255, 255, 255, 0.03);
  padding-top: 12px;
}

.rules-section {
  background: var(--dark-bg);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.rule-card {
  background: var(--dark-secondary);
  padding: 30px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid var(--dark-tertiary);
}

.rule-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.rule-number {
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 4rem;
  font-weight: 900;
  color: var(--dark-tertiary);
  opacity: 0.3;
}

.rule-card h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.rule-card ul {
  list-style: none;
}

.rule-card li {
  padding: 8px 0;
  color: var(--text-gray);
  padding-left: 20px;
  position: relative;
}

.rule-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.register-section {
  background: linear-gradient(135deg, var(--dark-secondary), var(--dark-tertiary));
  padding: 80px 0;
}

.register-content {
  text-align: center;
}

.register-content h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.register-content p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 40px;
}

.btn-register-large {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 18px 50px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-register-large:hover {
  transform: translateY(-3px);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--dark-secondary);
  margin: 50px auto;
  padding: 40px;
  border: 1px solid var(--dark-tertiary);
  width: 90%;
  max-width: 600px;
  border-radius: 15px;
  animation: slideDown 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  color: var(--text-gray);
  float: right;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-color);
}

.rules-reminder {
  background: var(--dark-tertiary);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid var(--secondary-color);
}

.rules-reminder h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.rules-link {
  color: var(--primary-color);
  text-decoration: underline;
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-top: 15px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.registration-form {
  margin-top: 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-gray);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  background: var(--dark-tertiary);
  border: 1px solid var(--dark-bg);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group input::placeholder {
  color: #666;
}

.btn-submit {
  width: 100%;
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--primary-color);
}

.lightbox-nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
}

.prev-btn, .next-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 15px 25px;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
  background: rgba(255, 68, 68, 0.5);
}

@media (max-width: 1024px) {
  .hero-section {
    height: 50vh;
    min-height: 350px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .sponsors-content {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--dark-secondary);
    width: 100%;
    padding: 30px 0;
    transition: left 0.3s ease;
    border-top: 1px solid var(--dark-tertiary);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-section {
    height: 40vh;
    min-height: 300px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    padding: 0 20px;
  }

  section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  .groups-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .gallery-item {
    height: 150px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rule-card {
    padding: 20px;
  }

  .rule-number {
    font-size: 3rem;
    top: -10px;
    right: 15px;
  }

  .register-content h2 {
    font-size: 2rem;
  }

  .register-content p {
    font-size: 1rem;
  }

  .btn-register-large {
    padding: 15px 40px;
    font-size: 1.1rem;
  }

  .modal-content {
    width: 95%;
    margin: 20px auto;
    padding: 25px;
  }

  .lightbox-nav {
    padding: 0 10px;
  }

  .prev-btn, .next-btn {
    padding: 10px 15px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 35vh;
    min-height: 250px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .groups-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .gallery-item {
    height: 120px;
  }

  .btn-register-large {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--dark-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.social-btn.ig {
  color: #E4405F;
}

.social-btn.tg {
  color: #0088cc;
}

.social-btn.vk {
  color: #4680C2;
}

.collab-intro {
  text-align: center;
  margin-bottom: 35px;
  padding: 25px 20px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(
          -45deg,
          #1a1a1a,
          #2a1f1f,
          #1f1a2e,
          #0f0e1a,
          #1a1a1a
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(255, 68, 68, 0.1),
  inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.collab-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
  transparent,
  var(--primary-color),
  var(--secondary-color),
  transparent
  );
  animation: lineGlow 3s ease infinite;
}

.collab-intro::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
  transparent,
  var(--secondary-color),
  var(--primary-color),
  transparent
  );
  animation: lineGlow 3s ease infinite reverse;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes lineGlow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.collab-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-gray);
  margin-bottom: 15px;
  font-weight: 500;
  opacity: 0.8;
}

.collab-groups {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 1.2rem;
  font-weight: 700;
}

.group-item {
  color: var(--text-light);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.group-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.3), transparent);
  transition: left 0.6s ease;
}

.group-item:hover::before {
  left: 100%;
}

.group-item:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(255, 68, 68, 0.2);
}

.group-divider {
  color: var(--secondary-color);
  font-size: 1.5rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .collab-intro {
    padding: 20px 15px;
    margin-bottom: 25px;
  }

  .collab-groups {
    font-size: 1rem;
    gap: 10px;
  }

  .group-item {
    padding: 6px 12px;
  }

  .collab-label {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
  }

  .group-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .collab-groups {
    flex-direction: column;
    gap: 8px;
  }

  .group-item {
    width: 100%;
    text-align: center;
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.category-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 48px;
}

.category-option:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.category-option.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.25) inset;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.18), rgba(255, 170, 0, 0.12));
}

.category-hint {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

@media (max-width: 480px) {
  .category-grid {
    gap: 10px;
  }

  .category-option {
    padding: 12px 10px;
  }
}