/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #000000;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --accent-color: #ffffff;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

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

.glow-spot {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(80px);
  opacity: 0.8;
  pointer-events: none;
}

/* Typography Helpers (Lowercase preference) */
h1, h2, h3, p, a, span, button, code, summary, li {
  text-transform: lowercase;
}

/* Container (Fixed Block Width) */
.container {
  width: 100%;
  max-width: 340px; /* Fixed block column width */
  margin: 0 auto;
  padding: 80px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* 1. Logo */
.logo-wrapper {
  display: flex;
  justify-content: center;
}

.app-logo {
  width: 80px;
  height: 80px;
  display: block;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo-wrapper:hover .app-logo {
  transform: scale(1.08) rotate(3deg);
}

/* 2. Brand Section */
.brand-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-title {
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.app-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: -0.02em;
}

/* 3. Buttons (Stacked Block Style) */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-color);
  border: 1px solid var(--accent-color);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  background-color: var(--glass-bg);
}

/* 4. MacBook Mockup CSS */
.demo-section {
  width: 100%;
}

.macbook-container {
  width: 100%;
  position: relative;
  padding-bottom: 16px;
}

.macbook-screen {
  position: relative;
  background: #000;
  border: 10px solid #161616; /* Screen bezel */
  border-radius: 16px 16px 0 0;
  aspect-ratio: 16 / 10;
  width: 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Camera Notch */
.macbook-screen::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 10px;
  background: #161616;
  border-radius: 0 0 4px 4px;
}

.macbook-display {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

.demo-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

/* Glass Reflection */
.macbook-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
}

/* Keyboard Base */
.macbook-base {
  height: 10px;
  background: linear-gradient(to bottom, #3a3a3a 0%, #1c1c1c 100%);
  width: 114%;
  margin-left: -7%;
  border-radius: 0 0 10px 10px;
  border-bottom: 2px solid #0d0d0d;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Lid opening indentation */
.macbook-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #0d0d0d;
  border-radius: 0 0 3px 3px;
}

/* 5. Expandable Installation Guide */
.install-section {
  width: 100%;
}

.install-details {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(12px);
}

.install-details:hover, .install-details[open] {
  border-color: var(--border-color-hover);
  background: var(--glass-bg-hover);
}

.install-summary {
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none; /* Hide default triangle on chrome/firefox */
}

/* Hide default triangle on safari */
.install-summary::-webkit-details-marker {
  display: none;
}

.chevron-icon {
  color: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.install-details[open] .chevron-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

/* Content inside expander */
.install-content {
  padding: 0 20px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
}

.step-item {
  position: relative;
  padding-left: 28px;
}

/* Custom step counter */
.step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 500;
}

.steps-list {
  counter-reset: step-counter;
}

.step-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 300;
  text-align: left; /* Keep instructions left-aligned for readability */
}

.highlight {
  color: var(--text-primary);
  font-weight: 400;
}

.step-flex {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Command Block & Copy */
.code-block-wrapper {
  display: flex;
  flex-direction: column; /* Stacked layout to prevent horizontal scroll issues on narrow width */
  align-items: flex-start;
  background: #080808;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  gap: 10px;
  width: 100%;
}

#terminalCommand {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  text-transform: none;
  white-space: pre-wrap; /* Wrap command to fit inside fixed block width */
  word-break: break-all;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  align-self: flex-end; /* Align copy button to the right */
}

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

.copy-btn.copied {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.copy-icon {
  transition: transform 0.2s ease;
}

.copy-btn:active .copy-icon {
  transform: scale(0.9);
}
