/* ==================== */
/* Reset & Base Styles  */
/* ==================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #e8e8e8;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ==================== */
/* Hero Section         */
/* ==================== */
.hero {
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
}

.hero-content {
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #ff3b3b 0%, #ff6b6b 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(255, 59, 59, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  margin: 0 0 16px 0;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero h1 .subtitle {
  display: block;
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 700;
  margin-top: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  margin: 0 0 32px 0;
  font-size: clamp(16px, 2.5vw, 20px);
  color: #b0b0b0;
  font-weight: 400;
}

.actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.hero-layout {
  margin: 28px auto 20px;
  max-width: clamp(240px, 58vw, 560px);
  width: 100%;
  background: rgba(12, 12, 20, 0.6);
  border: 1px solid rgba(102, 126, 234, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.hero-layout img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-layout figcaption {
  margin: 0;
  padding: 14px 18px;
  font-size: 13px;
  color: #cfd3ff;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.2) 100%);
  text-align: left;
}

#now {
  font-size: 12px;
  color: #707070;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
}

/* ==================== */
/* Buttons              */
/* ==================== */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 14px;
}

/* ==================== */
/* Section Styles       */
/* ==================== */
.section {
  width: 100%;
  margin-top: 60px;
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 8px 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  margin: 0;
  color: #909090;
  font-size: 15px;
}

/* ==================== */
/* Download Section     */
/* ==================== */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dl-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: rgba(30, 30, 45, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dl-card:hover {
  transform: translateY(-4px);
  background: rgba(40, 40, 60, 0.7);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.dl-card img {
  width: 140px;
  height: 79px;
  object-fit: cover;
  border-radius: 10px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.dl-meta h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #e8e8e8;
}

.dl-meta p {
  margin: 0;
  font-size: 13px;
  color: #909090;
}

/* ==================== */
/* README Section       */
/* ==================== */
#readme {
  width: 100%;
}

.readme-content {
  background: rgba(20, 20, 35, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.readme-content h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #f0f0f0;
}

.readme-content h2 {
  margin: 24px 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #e0e0e0;
}

.readme-content h2:first-of-type {
  margin-top: 0;
}

.readme-content h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #d0d0d0;
}

.readme-content p,
.readme-content li {
  line-height: 1.7;
  font-size: 14px;
  color: #b0b0b0;
  margin: 8px 0;
}

.readme-content ul,
.readme-content ol {
  padding-left: 24px;
  margin: 8px 0;
}

.readme-content ul ul,
.readme-content ol ul {
  margin: 4px 0;
}

.readme-content code {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Courier New', Consolas, monospace;
  color: #88c0d0;
}

.readme-content pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 12px 0;
}

.readme-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #88c0d0;
}

.readme-content strong {
  color: #e8e8e8;
  font-weight: 700;
}

/* ==================== */
/* Footer               */
/* ==================== */
.footer {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  color: #707070;
  font-size: 13px;
  margin-top: 60px;
}

.footer-sep {
  margin: 0 12px;
}

.nav-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-loading.visible {
  pointer-events: auto;
  opacity: 1;
}

.nav-loading.hidden {
  opacity: 0;
}

.nav-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 12, 0.75);
  backdrop-filter: blur(8px);
}

.nav-loading-spinner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 40px;
  border-radius: 16px;
  background: rgba(12, 12, 24, 0.85);
  border: 1px solid rgba(102, 126, 234, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #f2f4ff;
  font-size: 15px;
}

.nav-loading-spinner svg {
  width: 80px;
  height: 80px;
}

.nav-loading-spinner .ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 6;
}

.nav-loading-spinner .arc {
  fill: none;
  stroke: #6a8bff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 125;
  stroke-dashoffset: 110;
  transform-origin: 50% 50%;
  animation: nav-spinner 1.2s linear infinite;
}

.nav-loading-text {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #cfd6ff;
}

@keyframes nav-spinner {
  0% {
    stroke-dashoffset: 110;
    transform: rotate(0deg);
  }
  100% {
    stroke-dashoffset: -20;
    transform: rotate(360deg);
  }
}

/* ==================== */
/* Animations           */
/* ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

/* ==================== */
/* Responsive Design    */
/* ==================== */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .hero {
    min-height: 50vh;
    padding: 40px 16px;
  }

  .badge {
    font-size: 10px;
    padding: 5px 12px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
  }

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

  .hero-layout {
    margin: 20px auto 14px;
    border-radius: 12px;
    max-width: clamp(220px, 72vw, 420px);
  }

  .hero-layout figcaption {
    font-size: 12px;
    padding: 12px 14px;
  }

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

  .dl-card {
    flex-direction: column;
    text-align: center;
  }

  .dl-card img {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 16/9;
  }

  .section {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero h1 .subtitle {
    font-size: 18px;
    margin-top: 6px;
  }

  .tagline {
    font-size: 15px;
  }

  .readme-section-title,
  .readme-accordion h2 {
    font-size: 16px;
    padding: 14px 16px;
  }

  .readme-section-content.expanded {
    padding: 16px;
  }
}

/* ==================== */
/* Scrollbar Styling    */
/* ==================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}
