/* Fresh CSS for aicodeprep-gui with black background and proper padding */

* {
  box-sizing: border-box;
}

:root {
  --primary-text: #e6edf3;
  --secondary-text: #8b949e;
  --border-color: #30363d;
  --card-bg: #161b22;
  --accent-color: #58a6ff;
  --accent-hover: #79c0ff;
  --green-accent: #3fb950;
  --font-primary: "Quicksand", "Inter", sans-serif;
  --font-mono: "Roboto Mono", monospace;
}

body {
  background-color: #000000;
  color: var(--primary-text);
  font-family: var(--font-primary);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--primary-text);
  margin-top: 0;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero .logo {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.75rem;
  color: var(--secondary-text);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero .subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  color: var(--secondary-text);
}

.cta-section {
  margin: 2rem 0;
}

.cta-section p {
  margin-bottom: 0.5rem;
  color: var(--secondary-text);
}

.cta-note {
  color: var(--secondary-text);
  margin: 0.5rem 0 1rem 0;
  font-size: 1rem;
  text-align: center;
}

.code-block {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  max-width: 680px;
  width: 100%;
  margin: 0 auto 1rem auto;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.code-block pre {
  margin: 0;
  padding: 0.25rem 0;
  overflow: visible;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1 1 auto;
}

.copy-button {
  background: var(--border-color);
  color: var(--primary-text);
  border: 1px solid #484f58;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.copy-button:hover {
  background-color: #484f58;
}

.copy-button:active {
  background-color: var(--green-accent);
  color: #fff;
}

.social-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Showcase Section */
.showcase {
  margin: 3rem 0 38px 0;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.thumbnail-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.3s;
  cursor: pointer;
}

.thumbnail-grid img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Gumroad Section */
.gumroad-section {
  text-align: center;
  margin: 2rem 0 38px 0;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.gumroad-link {
  display: inline-block;
  background: linear-gradient(135deg, #00ee0cff, #e0fe1aff);
  color: black !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(176, 145, 255, 0.3);
}

.gumroad-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 255, 238, 0.4);
  color: white !important;
}

/* Sections */
section,
.gumroad-section,
footer {
  margin-bottom: 38px;
  padding: 18px 0;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: -1rem auto 3rem auto;
  color: var(--secondary-text);
  font-size: 1.1rem;
}

.section-intro code {
  background-color: var(--card-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--primary-text);
}

/* Workflow Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.step h3 {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--secondary-text);
  margin: 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--secondary-text);
  margin: 0;
}

/* Installation Section */
.installation pre {
  background: #000;
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  overflow-x: auto;
}

.os-instructions details {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.os-instructions summary {
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1.1rem;
  list-style-position: inside;
}

.os-instructions details[open] summary {
  border-bottom: 1px solid var(--border-color);
}

.os-instructions .instructions-content {
  padding: 0 1rem 1rem 1rem;
}

/* Wave Link Animations */
.wave-link {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: inherit;
  display: inline;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.wave-link span {
  position: relative;
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

.wave-link-simple {
  font-size: 1rem;
  font-weight: normal;
  text-decoration: none;
  color: inherit;
  display: inline;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.wave-link-simple span {
  position: relative;
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--secondary-text);
}

footer p {
  margin: 0.5rem 0;
}

/* Coffee Section */
.coffee-section {
  background: linear-gradient(180deg, #000000 0%, #1a1f2e 50%, #2d3748 100%);
  padding: 3rem 0;
  margin-top: 4rem;
}

.coffee-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.coffee-container h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-text);
}

.coffee-container p {
  font-size: 1.1rem;
  color: var(--secondary-text);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Modal/Lightbox */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: var(--accent-color);
  text-decoration: none;
}

.modal-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 6px;
  max-width: 80%;
}

.showcase img {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(88, 166, 255, 0.2);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  user-select: none;
}

.modal-nav:hover {
  background: rgba(88, 166, 255, 0.7);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  h2 {
    font-size: 2rem;
  }

  .hero .logo {
    font-size: 2.8rem;
  }

  .hero .tagline {
    font-size: 1.5rem;
  }

  .code-block {
    flex-direction: column;
    gap: 0.5rem;
  }

  .gumroad-section {
    margin: 1.5rem 0;
    padding: 1rem;
  }

  .gumroad-link {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .coffee-container h3 {
    font-size: 1.5rem;
  }

  .coffee-container p {
    font-size: 1rem;
  }

  .modal-content {
    padding: 10px;
  }

  .close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }

  .modal-nav {
    font-size: 20px;
    padding: 8px 12px;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }
}
