:root {
  --accent: #00BCFF;
  --bg: #00000A;
  --text: #E8EAF0;
  --border: #1a1a2a;
  --surface: #0a0a14;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent);
}

.container {
  max-width: 60%;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 900px) {
  .container {
    max-width: 100%;
  }
}

.hero {
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-hero {
  aspect-ratio: 4096 / 1958.4;
}

.app-hero {
  aspect-ratio: 1024 / 500;
  max-height: 360px;
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 64px;
}

.section:first-of-type {
  border-top: none;
}

.section:target::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -16px;
  width: 4px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: target-marker 2.4s ease-out forwards;
}

@keyframes target-marker {
  0%, 60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.section h2 {
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.section-heading {
  display: block;
  height: 30px;
  width: auto;
  margin-bottom: 20px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: #555;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.nav-brand {
  font-weight: bold;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  list-style: none;
  padding: 8px 0;
  z-index: 10;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
  }

  .nav-dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown-menu {
    position: static;
    border: none;
    background: var(--bg);
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .nav-inner {
    flex-wrap: wrap;
  }
}

/* App pages */
.app-header {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.app-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
}

.app-header-info {
  flex: 1;
  min-width: 200px;
}

.cta-button {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 20px;
  text-decoration: none;
  font-size: 14px;
}

.screenshots-wrap {
  position: relative;
}

.screenshots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screenshots::-webkit-scrollbar {
  display: none;
}

.screenshots img {
  height: 280px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
}

.screenshots-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.screenshots-wrap:hover .screenshots-nav,
.screenshots-nav:focus-visible {
  opacity: 1;
  visibility: visible;
}

.screenshots-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.screenshots-nav::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.screenshots-nav-prev {
  left: 8px;
}

.screenshots-nav-prev::before {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.screenshots-nav-next {
  right: 8px;
}

.screenshots-nav-next::before {
  transform: rotate(45deg) translate(-1px, -1px);
}

.screenshots-nav.is-hidden {
  display: none;
}

.lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  cursor: default;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.open img {
  transform: scale(1);
}

/* Timeline */
.timeline-item {
  display: flex;
  gap: 16px;
}

.timeline-marker {
  width: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.timeline-dot.outline {
  background: var(--bg);
  border: 1px solid var(--accent);
}

.timeline-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
}

.timeline-content {
  flex: 1;
  padding-bottom: 16px;
}

.timeline-date {
  font-size: 12px;
  color: #888;
}

.timeline-title {
  font-weight: bold;
}

.timeline-version {
  font-size: 0.75em;
  font-weight: normal;
  color: #888;
}

.timeline-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid;
}

.badge-released {
  color: #0f8;
  border-color: #0f8;
}

.badge-internal {
  color: #aaa;
  border-color: #555;
}

.badge-developing {
  color: #666;
  border-color: #444;
}

@media (max-width: 600px) {
  .nav-links {
    gap: 12px;
    font-size: 12px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .screenshots img {
    height: 200px;
  }

  .screenshots-nav {
    display: none;
  }
}

/* Contact */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-icon {
  width: 35px;
  height: 35px;
}
