/* myfdroid Design System & Stylesheet */
:root {
  --bg-page: #080a0f;
  --bg-surface: #0e121b;
  --bg-card: #141a26;
  --bg-card-hover: #1b2333;
  --border-subtle: #232d42;
  --border-strong: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #38bdf8;
  --accent-blue-hover: #0284c7;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --header-height: 64px;
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-strong: #94a3b8;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-violet: #7c3aed;
  --accent-emerald: #059669;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(14, 18, 27, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.eco-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.eco-back:hover {
  color: var(--accent-blue);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--accent-blue);
  color: #080a0f;
}

.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-btn:hover {
  background: var(--bg-card-hover);
}

/* HERO */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
}

.hero-badge.badge-blue {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border-color: rgba(56, 189, 248, 0.3);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

/* REPO URL BOX */
.repo-box-container {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.repo-box-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.repo-url-bar {
  display: flex;
  background: #040609;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

[data-theme="light"] .repo-url-bar {
  background: #1e293b;
}

.repo-url-text {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.9375rem;
  color: #38bdf8;
  word-break: break-all;
}

.btn-copy {
  background: var(--accent-blue);
  color: #080a0f;
  border: none;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-copy:hover {
  background: var(--accent-blue-hover);
}

.repo-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-fdroid {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-fdroid:hover {
  background: rgba(56, 189, 248, 0.25);
}

/* SECTION */
.section-padding {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-tag {
  color: var(--accent-blue);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* APPS GRID */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.app-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.app-title-group h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.app-pkg {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.app-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.app-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.app-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.app-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-card {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.btn-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.btn-card.highlight {
  background: var(--accent-blue);
  color: #080a0f;
  border-color: transparent;
}

.btn-card.highlight:hover {
  background: var(--accent-blue-hover);
}

/* STEPS GRID */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-card h4 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ABOUT / FOOTER */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.about-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.about-box h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #080a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.6875rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.875rem;
  }
  .repo-url-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
