/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-card: rgba(30, 33, 48, 0.7);
  --bg-card-hover: rgba(40, 44, 64, 0.8);
  --border-card: rgba(255, 255, 255, 0.06);
  --accent: #3ddc84;
  --accent-glow: rgba(61, 220, 132, 0.25);
  --accent-secondary: #4fc3f7;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;
  --code-bg: rgba(61, 220, 132, 0.08);
  --code-border: rgba(61, 220, 132, 0.2);
  --font-sans: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Background Effects ===== */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(61, 220, 132, 0.08) 0%, transparent 70%);
  animation: float-glow 15s ease-in-out infinite;
}

.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(79, 195, 247, 0.06) 0%, transparent 70%);
  animation: float-glow 18s ease-in-out infinite reverse;
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ===== Layout ===== */
.wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main {
  flex: 1;
  padding: 60px 0 80px;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  margin-bottom: 56px;
  animation: fade-up 0.8s ease-out;
}

.hero-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 24px rgba(61, 220, 132, 0.3));
  animation: subtle-float 4s ease-in-out infinite;
}

@keyframes subtle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-subtitle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.hero-subtitle a:hover {
  color: var(--accent-secondary);
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  animation: fade-up 0.8s ease-out both;
}

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

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 220, 132, 0.15);
  background: var(--bg-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.card-icon.green {
  background: rgba(61, 220, 132, 0.12);
  color: var(--accent);
}

.card-icon.blue {
  background: rgba(79, 195, 247, 0.12);
  color: var(--accent-secondary);
}

.card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Code Blocks ===== */
.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--accent);
  overflow-x: auto;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.code-block:hover {
  border-color: rgba(61, 220, 132, 0.4);
  background: rgba(61, 220, 132, 0.1);
}

.code-block .prompt {
  color: var(--text-muted);
  user-select: none;
  margin-right: 8px;
}

.code-block a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(79, 195, 247, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.code-block a:hover {
  text-decoration-color: var(--accent-secondary);
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  padding: 5px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.code-block:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== Note ===== */
.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.note-icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== Debian Section ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 195, 247, 0.1);
  color: var(--accent-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(79, 195, 247, 0.2);
}

/* ===== Links Row ===== */
.links-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  animation: fade-up 0.8s ease-out 0.4s both;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-sans);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.link-btn.primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.link-btn.primary:hover {
  background: #4de894;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.link-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border-card);
  padding: 28px 0;
  animation: fade-up 0.8s ease-out 0.5s both;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-credits {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-credits a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-legal {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ===== Animations ===== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media screen and (max-width: 640px) {
  main {
    padding: 40px 0 60px;
  }

  .hero {
    margin-bottom: 36px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
  }

  .card {
    padding: 20px;
  }

  .code-block {
    font-size: 0.78rem;
    padding: 14px 16px;
  }

  .links-row {
    flex-direction: column;
  }

  .link-btn {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
