/* Основные стили для BIM сайта */

/* Сброс стилей и базовые настройки */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Press Start 2P', cursive;
  background-color: #ffffff;
  color: #212121;
  padding: 20px;
  margin: 0;
  overflow-x: hidden;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Контейнеры NES */
.nes-container {
  margin-bottom: 40px;
  text-align: left;
  position: relative;
  padding-top: 3.5em;
}

.section-title {
  position: absolute;
  top: -1.1em;
  left: 1.5em;
  padding: 0.25em 1em;
  font-size: 0.75rem;
  cursor: default;
}

/* Переключатель языков */
.lang-switcher {
  text-align: right;
  margin-bottom: 15px;
}

.lang-switcher button {
  margin-left: 5px;
}

.lang-switcher button[data-lang="uz"] {
  background-color: #92cc41;
  color: #000;
}

.lang-switcher button[data-lang="ru"] {
  background-color: #f7d51d;
  color: #000;
}

.lang-switcher button[data-lang="en"] {
  background-color: #209cee;
  color: #fff;
}

/* Социальные иконки */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.social-btn {
  width: 48px;
  height: 48px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Формы */
form .nes-field {
  margin-bottom: 1.2em;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6366f1;
}

/* Футер */
footer {
  margin-top: 40px;
  text-align: center;
  color: #444;
  font-size: 0.75rem;
}

/* Видео галерея */
.video-container {
  margin-top: 1.5em;
}

.instagram-embed {
  text-align: center;
}

.instagram-embed iframe {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem auto;
  display: block;
}

.instagram-embed .instagram-media {
  margin: 1rem auto !important;
  display: block !important;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 10px;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

/* Галерея видео */
.video-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5em;
}

/* Адаптивность для галереи */
@media (max-width: 768px) {
  .video-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .video-gallery {
    grid-template-columns: 1fr;
  }
}

.video-thumbnail {
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.video-thumbnail:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.video-thumbnail i {
  font-size: 2rem;
  color: #e4405f;
  margin-bottom: 0.5rem;
}

.video-thumbnail h4 {
  margin: 0.5rem 0;
  font-size: 0.8rem;
}

.video-thumbnail p {
  margin: 0;
  font-size: 0.6rem;
  color: #666;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(228, 64, 95, 0.9);
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover .play-button {
  opacity: 1;
}

/* Стили для пустых блоков */
.video-thumbnail.empty-block {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  cursor: default;
  opacity: 0.7;
}

.video-thumbnail.empty-block:hover {
  border-color: #dee2e6;
  transform: none;
  box-shadow: none;
}

.video-thumbnail.empty-block i {
  color: #6c757d;
}

.video-thumbnail.empty-block h4,
.video-thumbnail.empty-block p {
  color: #6c757d;
}

/* Стили для активного видео */
.video-thumbnail.active-video {
  border-color: #6366f1;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.video-thumbnail.active-video:hover {
  border-color: #4f46e5;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.video-thumbnail.active-video i {
  color: #6366f1;
}
