:root {
  --bg: #08080f;
  --text: #edf2f7;
  --text-dim: #a0aec0;
  --accent: #39F68F;
  --border: rgba(255, 255, 255, 0.06);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  line-height: 1.6;
}

body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* === BACK BUTTON === */
.back-btn {
  position: fixed;
  left: 24px;
  top: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  transition: all 0.3s ease;
  z-index: 100;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-4px);
}

/* === HEADER === */
.project-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(100px, 15vh, 140px) 24px clamp(60px, 10vh, 80px);
  text-align: center;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.project-logo {
  max-width: clamp(320px, 50vw, 480px);
  height: auto;
}

.project-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-badge {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid;
}

.status-badge.completed {
  background: rgba(57, 246, 143, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.status-badge.progress {
  background: rgba(109, 213, 237, 0.1);
  border-color: #6dd5ed;
  color: #6dd5ed;
}

.progress-badge {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* === INFO GRID === */
.info-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.info-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

/* === GALLERY === */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.gallery-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    background: #181824;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

.gallery-grid img:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* === LIGHTBOX === */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  padding: 24px;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.lightbox.active {
  display: flex;
  pointer-events: auto;
}

.lightbox.show {
  opacity: 1;
}

.gallery-img {
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.3s ease;
}

.gallery-img:hover,
.gallery-img:focus {
  box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0,0,0,0.12);
}

.lightbox-figure {
  position: relative;
  width: min(100%, 1100px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.lightbox-img {
  width: 100%;
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  background: #181824;
}

.lightbox-caption {
  width: min(92vw, 1100px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  font-size: 0.95rem;
}

.lightbox-counter {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.lightbox-caption-text {
  color: rgba(255, 255, 255, 0.82);
  text-align: right;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  background: rgba(24, 24, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  color: var(--accent);
  background: rgba(57, 246, 143, 0.12);
  transform: scale(1.04);
}

.lightbox-prev,
.lightbox-next {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  background: rgba(24,24,36,0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--accent);
  background: rgba(57,246,143,0.12);
  transform: scale(1.04);
}

.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-close:focus-visible,
.gallery-img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* === CONTENT SECTION === */
.content-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.content-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.feature-list li:hover {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: #6dd5ed;
  transform: translateX(4px);
}

/* === PROGRESS === */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.progress-row > span:first-child {
  font-weight: 600;
  color: var(--text-dim);
}

.progress-row .percent {
  text-align: right;
  font-weight: 700;
  color: var(--accent);
}

.bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6dd5ed);
  border-radius: 4px;
  transition: width 1s ease;
}

/* === GUIDE === */
.project-guide {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.project-guide h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.guide-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.guide-tab-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  color: var(--accent);
}

.guide-tab-btn.active {
  background: var(--accent);
  color: #0a0a12;
  border-color: var(--accent);
}

.tab-logo {
  height: 18px;
  width: auto;
  /* opacity: 0.6; */
  filter: grayscale(1) brightness(2);
}

/* Активна вкладка — просто трохи темніше, але все ще світле */
.guide-tab-btn.active .tab-logo[alt="macOS"] {
  filter: grayscale(1) brightness(1.2);
}

.tab-logo[alt="macOS"] {
  filter: invert(100%) brightness(1.2);
  height: 24px;
}

.guide-tab-btn.active .tab-logo {
  /* opacity: 1; */
  filter: brightness(0);
}

.recommended {
  font-size: 0.75rem;
  font-weight: 700;
}

.guide-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.guide-tab-content {
  display: none;
}

.guide-tab-content.active {
  display: block;
}

.guide-tab-content ol {
  padding-left: 20px;
  color: var(--text-dim);
}

.guide-tab-content ol li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.guide-tab-content p {
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.7;
}

.guide-tab-content h4 {
  color: var(--accent);
  margin: 24px 0 12px;
  font-size: 1.1rem;
}

.launcher-download {
  text-align: center;
  margin: 24px 0;
}

.launcher-btn {
  display: inline-block;
  padding: 12px 36px;
  background: var(--accent);
  color: #0a0a12;
  border-radius: 24px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.launcher-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(57, 246, 143, 0.3);
}

.install-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.install-btn {
  padding: 10px 28px;
  background: rgba(57, 246, 143, 0.1);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.install-btn:hover {
  background: var(--accent);
  color: #0a0a12;
  transform: translateY(-2px);
}

.mod-page-link-container {
  text-align: center;
  margin-top: -12px;
}

.mod-page-link {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.mod-page-link:hover {
  color: var(--text);
}

/* === FOOTER === */
.footer {
  padding: clamp(10px, 6vh, 10px) clamp(10px, 5vw, 10px);
  text-align: center;
  color: #a0aec0;
  font-size: 0.95rem;
}

.footer-support {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-direction: row;
}

.footer-link {
  color: #6dd5ed;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(109, 213, 237, 0.08);
  border: 1px solid rgba(109, 213, 237, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.footer-link:hover {
  background: rgba(57, 246, 143, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-icon {
  width: 24px;
  height: 24px;
}

.footer-emoji {
  font-size: 24px;
  line-height: 1;
}

.footer-icon-round {
  border-radius: 50%;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.2);
}

.footer p {
  margin-top: 16px;
}

.footer a {
  color: var(--accent);
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #6dd5ed;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .back-btn {
    left: 16px;
    top: 16px;
    width: 40px;
    height: 40px;
  }

  .project-header {
    padding: 80px 20px 50px;
  }

  .project-logo {
    max-width: 90%;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .progress-row {
    grid-template-columns: 100px 1fr 50px;
    gap: 12px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .guide-tabs {
    flex-direction: column;
  }

  .guide-tab-btn {
    width: 100%;
    justify-content: center;
  }

  .lightbox-close {
    right: 12px;
    top: 12px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .lightbox {
    padding: 16px 12px 24px;
    flex-direction: column;
    gap: 14px;
  }

  .lightbox-figure {
    width: 100%;
    gap: 12px;
  }

  .lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 190px);
  }

  .lightbox-caption {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 0 4px;
  }

  .lightbox-caption-text {
    text-align: left;
  }

  .lightbox-prev,
  .lightbox-next {
    position: fixed;
    bottom: 20px;
    width: 48px;
    height: 48px;
    font-size: 28px;
    padding-bottom: 2px;
  }

  .lightbox-prev {
    left: calc(50% - 58px);
  }

  .lightbox-next {
    right: calc(50% - 58px);
  }
  .tab-logo[alt="macOS"] {
    filter: invert(100%)  brightness(1.2);
  }

  .guide-tab-btn.active .tab-logo[alt="macOS"] {
    filter: invert(100%)  brightness(1.2);
  }
  }
  
  /* Активна вкладка — трохи менше яскравості, але все ще світле */
  .guide-tab-btn.active .tab-logo[alt="macOS"] {
    filter: grayscale(1) brightness(1.2);
  }

  .footer-divider {
    font-size: 0.9rem;
  }

  .footer-icon,
  .footer-emoji {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }

@media (max-width: 480px) {
  .lightbox {
    padding: 12px 10px 20px;
  }

  .lightbox-img {
    max-height: calc(100vh - 210px);
    border-radius: 12px;
  }

  .lightbox-close {
    right: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    padding-bottom: 0px;
  }

  .lightbox-prev,
  .lightbox-next {
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 24px;
    padding-bottom: 0px;
  }

  .lightbox-prev {
    left: calc(50% - 52px);
  }

  .lightbox-next {
    right: calc(50% - 52px);
  }

  .lightbox-caption {
    font-size: 0.9rem;
  }

  .install-buttons {
    flex-direction: column;
  }

  .install-btn,
  .launcher-btn {
    width: 100%;
  }
}

