/* ========== БАЗОВІ СТИЛІ ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #131313;
  color: #ffffff;
  line-height: 1.6;
}

/* ========== КОНТЕЙНЕР ПРОЕКТУ ========== */
.project-container {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin: 50px 350px 100px;
  position: relative;
  z-index: 2;
}

/* ========== ВІДЕО ========== */
.video-wrapper {
  width: 100%;
  background: #000000;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #131313;
}

/* ========== ЗАГОЛОВОК ГРИ ========== */
.game-header {
  margin-bottom: 0;
}

.game-title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffd60a;
  line-height: 1.2;
  margin-bottom: 8px;
  word-break: break-word;
}

.short-desc {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 25px;
  line-height: 1.6;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
}

.play-button {
  display: inline-flex;
  align-items: center;
  background: #ffd60a;
  padding: 8px 24px;
  font-weight: 700;
  font-size: 1rem;
  color: #000000;
  text-decoration: none;
  transition: all 0.1s ease;
  border: none;
  cursor: pointer;
}

.play-button:hover {
  background: #ffffff;
}

.windows-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: default;
}

.windows-icon img {
  width: 25px;
  height: 25px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(0.6);
}

/* ========== ОСНОВНИЙ КОНТЕЙНЕР: ДОКУМЕНТАЦІЯ (ЗЛІВА) + ПАНЕЛІ (СПРАВА) ========== */
.main-layout {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

/* Блок з документацією (ліворуч) */
.documentation {
  flex: 2.5;
  min-width: 0;
  width: 100%;
}

/* Блок з картками (праворуч) */
.info-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Стилі карток */
.info-card {
  background: #1a1a1a;
  padding: 24px;
}

.info-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffd60a;
  margin-bottom: 16px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.tool-tag {
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  border: 1.6px solid #ffffff;
  background: transparent;
}

.info-content p {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
}

.info-content .info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #ffd60a;
  display: inline-block;
}

/* ========== ДОКУМЕНТАЦІЯ ========== */
.design-doc {
  width: 100%;
}

.design-doc-title {
  font-size: 2.0rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.design-doc-content {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #ffffff;
  font-weight: 500;
  text-align: justify;
}

.design-doc-content h3 {
  font-size: 2.0rem;
  font-weight: 900;
  margin: 48px 0 16px 0;
  color: #ffd60a;
  text-align: left;
  scroll-margin-top: 80px;
  word-break: break-word;
}

.design-doc-content h3:first-of-type {
  margin-top: 0;
}

/* Зображення - клікабельні, але без жодних ефектів при наведенні */
.design-doc-content .project-screenshot,
.design-doc-content .project-gif,
.design-doc-content .project-analytics,
.design-doc-content .project-diagram {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 25px 0;
}

.design-doc-content .project-diagram {
  max-width: 700px;
}

.design-doc-content .project-analytics {
  max-width: 100%;
}

/* ПОВНІСТЮ ПРИБРАНО БУДЬ-ЯКІ ЕФЕКТИ ПРИ НАВЕДЕННІ НА ЗОБРАЖЕННЯ */

/* ========== МОДАЛЬНЕ ВІКНО ДЛЯ ЗОБРАЖЕНЬ ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.modal-content {
  position: relative;
  margin: auto;
  display: block;
  width: 90%;
  max-width: 90vw;
  max-height: 90vh;
  top: 50%;
  transform: translateY(-50%);
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #ffd60a;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* ========== КНОПКА "НАВЕРХ" ========== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #ffd60a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: scale(1.1);
}

.scroll-top-btn svg {
  width: 24px;
  height: 24px;
  fill: #131313;
}

/* ========== АДАПТИВНІСТЬ ========== */
@media (max-width: 1200px) {
  .project-container {
    margin: 40px 100px;
    gap: 60px;
  }
}

@media (max-width: 992px) {
  .project-container {
    margin: 40px 50px;
  }
  
  .main-layout {
    gap: 30px;
  }
  
  .design-doc-content {
    font-size: 1rem;
  }
  
  .design-doc-title {
    font-size: 1.8rem;
  }
  
  .design-doc-content h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .project-container {
    margin: 20px 15px;
    gap: 30px;
  }
  
  /* ВСЕ ПО ЛІВОМУ КРАЮ */
  .game-title {
    font-size: 2rem;
    text-align: left;
  }
  
  .short-desc {
    font-size: 1rem;
    text-align: left;
  }
  
  .action-links {
    justify-content: flex-start;
  }
  
  /* ОДНА КОЛОНКА: КАРТКИ ЗВЕРХУ, ОПИС ЗНИЗУ */
  .main-layout {
    flex-direction: column;
    gap: 40px;
  }
  
  /* Картки першими */
  .info-sidebar {
    flex: auto;
    width: 100%;
    order: 1;
    gap: 20px;
  }
  
  /* Опис після карток */
  .documentation {
    flex: auto;
    width: 100%;
    order: 2;
  }
  
  .design-doc-title {
    font-size: 1.6rem;
    text-align: left;
    margin-bottom: 20px;
  }
  
  .design-doc-content {
    font-size: 0.95rem;
    text-align: left;
  }
  
  .design-doc-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 12px 0;
  }
  
  .design-doc-content .project-screenshot,
  .design-doc-content .project-gif,
  .design-doc-content .project-diagram {
    max-width: 100%;
    margin: 20px 0;
  }
  
  .info-card {
    padding: 20px;
  }
  
  .info-card h3 {
    font-size: 1.3rem;
  }
  
  .tool-tag {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
  
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
  
  .scroll-top-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .close-modal {
    top: 15px;
    right: 20px;
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .project-container {
    margin: 15px 12px;
    gap: 25px;
  }
  
  .game-title {
    font-size: 1.6rem;
  }
  
  .short-desc {
    font-size: 0.9rem;
  }
  
  .play-button {
    padding: 6px 18px;
    font-size: 0.9rem;
  }
  
  .design-doc-title {
    font-size: 1.4rem;
  }
  
  .design-doc-content {
    font-size: 0.85rem;
  }
  
  .design-doc-content h3 {
    font-size: 1.2rem;
  }
  
  .info-card {
    padding: 15px;
  }
  
  .info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  
  .tools-list {
    gap: 8px;
  }
  
  .tool-tag {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  .info-content p,
  .info-content .info-value {
    font-size: 0.85rem;
  }
  
  .windows-icon img {
    width: 20px;
    height: 20px;
  }
}