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

:root {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --text: #333;
  --text-light: #666;
  --text-lighter: #999;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.logo img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--text);
  color: white !important;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.github-link:hover {
  background: #000;
  transform: translateY(-2px);
}

.github-link::after {
  display: none;
}

.github-icon {
  width: 18px;
  height: 18px;
}

/* Hero Section */
.hero {
  margin-top: 68px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 80px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease;
}

.hero .tagline {
  font-size: clamp(18px, 3vw, 24px);
  opacity: 0.95;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero .description {
  font-size: clamp(16px, 2vw, 18px);
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-button {
  display: inline-block;
  padding: 18px 48px;
  background: white;
  color: var(--primary);
  text-decoration: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

/* Sections */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 32px;
}

section.alt-bg {
  background: var(--bg-alt);
  max-width: 100%;
}

section.alt-bg > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  color: var(--text);
}

.section-intro {
  text-align: center;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 15px;
}

/* Updates Section */
.updates-container {
  max-width: 900px;
  margin: 0 auto;
}

.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-lighter);
  font-size: 18px;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.version-block {
  background: white;
  border-left: 4px solid var(--primary);
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.version-block:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.version-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 26px;
}

.version-date {
  color: var(--text-lighter);
  font-size: 14px;
  font-weight: 500;
}

.change-category {
  margin-bottom: 16px;
}

.change-category:last-child {
  margin-bottom: 0;
}

.change-category h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-list {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 15px;
}

/* Tech Stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.tech-tag {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Download Section */
.download-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  max-width: 100%;
  padding: 70px 32px;
}

.download-section h2 {
  color: white;
}

.download-section .section-intro {
  color: rgba(255, 255, 255, 0.95);
}

.download-content {
  max-width: 600px;
  margin: 0 auto;
}

.auth-form {
  margin: 40px 0;
}

input[type="password"] {
  width: 100%;
  padding: 18px 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

input[type="password"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
}

.download-button {
  width: 100%;
  padding: 18px;
  background: white;
  color: var(--primary);
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.download-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.download-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.15);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.error-message.visible {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.downloads-list {
  display: none;
}

.downloads-list.visible {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.download-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.download-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.platform-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.platform-icon {
  font-size: 32px;
}

.platform-details h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.platform-details p {
  font-size: 14px;
  opacity: 0.8;
}

.download-link {
  padding: 12px 24px;
  background: white;
  color: var(--primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.download-link:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.version-info {
  text-align: center;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

/* Footer */
footer {
  background: var(--text);
  color: white;
  padding: 40px 32px;
  text-align: center;
}

footer p {
  opacity: 0.8;
}

footer a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s ease;
}

footer a:hover {
  border-color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.github-link) {
    display: none;
  }

  .hero {
    padding: 60px 20px;
  }

  section {
    padding: 50px 20px;
  }

  section.alt-bg > div {
    padding: 0 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .tech-stack {
    gap: 12px;
  }

  .tech-tag {
    font-size: 14px;
    padding: 10px 20px;
  }

  .download-section {
    padding: 50px 20px;
  }

  .download-item {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .platform-info {
    flex-direction: column;
    gap: 12px;
  }

  .download-link {
    width: 100%;
    text-align: center;
  }
}
