/* Theme tokens */
:root {
  --bg: #0b0c10;
  --panel: #0f1117;
  --card: #11131a;
  --text: #e6e9ef;
  --muted: #b3b9c6;
  --brand: #4f7cff;
  --brand-2: #7f56d9;
  --stroke: #1c2030;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --panel: #f7f8fb;
    --card: #ffffff;
    --text: #0b0c10;
    --muted: #4b5563;
    --brand: #335cff;
    --brand-2: #6e59f2;
    --stroke: #e5e7eb;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
  }
}

[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f7f8fb;
  --card: #ffffff;
  --text: #0b0c10;
  --muted: #4b5563;
  --brand: #335cff;
  --brand-2: #6e59f2;
  --stroke: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.site-header {
  position: relative;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(79,124,255,0.25), transparent 60%),
              radial-gradient(900px 400px at 80% -20%, rgba(127,86,217,0.22), transparent 60%);
  border-bottom: 1px solid var(--stroke);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.logo {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.brand-text { letter-spacing: 0.1px; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.hero {
  position: relative;
  overflow: hidden;
}
.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 20px 56px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px 0;
}
.subtitle {
  margin: 0 0 22px 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
}
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art .orb {
  position: absolute;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}
.orb-a { width: 260px; height: 260px; left: -80px; top: -60px; background: #4f7cff; }
.orb-b { width: 220px; height: 220px; right: -60px; top: -40px; background: #7f56d9; }
.orb-c { width: 280px; height: 280px; right: 10%; top: 40%; background: #4f7cff; opacity: 0.18; }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 20px;
}
.section.alt {
  background: linear-gradient(0deg, transparent, transparent), var(--panel);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.section-title {
  font-size: 22px;
  margin: 0 0 18px 0;
}
.lead { color: var(--muted); max-width: 900px; }
.benefits {
  margin: 14px 0 0;
  padding-left: 16px;
  color: var(--muted);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
  will-change: transform;
}
.card:hover { transform: translateY(-2px); border-color: rgba(79,124,255,0.35); }
.card-icon { font-size: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.card .docker-explanation { 
  margin-top: 1rem; 
  padding: 1rem; 
  background: var(--panel); 
  border-left: 3px solid var(--brand); 
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.card .docker-explanation strong { color: var(--text); }
.card .docker-explanation a { 
  color: #60a5fa; 
  text-decoration: underline;
  font-weight: 600;
}
.card-actions { margin-top: 10px; }

/* Steps */
.steps { display: grid; gap: 12px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--brand);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 700;
}
.step h4 { margin: 2px 0 4px; font-size: 16px; }
.step p { 
  margin: 0; 
  color: var(--muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.step:hover p {
  max-height: 500px;
  opacity: 1;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--stroke);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 28px;
  color: var(--muted);
}
.sep { opacity: 0.6; }

/* Buttons/Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--stroke);
}
.btn-link {
  background: transparent;
  color: var(--brand);
  padding: 0;
  border: none;
  font-weight: 600;
}

/* Code tags */
code {
  background: var(--panel);
  border: 1px solid var(--stroke);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

/* Bubbles (big circle feature icons) */
.bubbles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-items: center;
  gap: 18px;
  margin-top: 8px;
}
.bubble {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(120px 70px at 50% 20%, rgba(79,124,255,0.15), transparent 60%), var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  padding: 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.bubble:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(79,124,255,0.45);
  box-shadow: 0 16px 40px rgba(79,124,255,0.15), var(--shadow);
}
.bubble-icon {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 8px;
}
.bubble-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
@media (max-width: 420px) {
  .bubble {
    width: 150px;
    height: 150px;
    padding: 16px;
  }
  .bubble-icon { font-size: 32px; }
  .bubble-label { font-size: 13px; }
}

/* App pages */
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}
@media (min-width: 600px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-item {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(79,124,255,0.35);
}
.feature-icon {
  font-size: 24px;
  color: var(--brand);
  margin-bottom: 10px;
}
.feature-item h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Vertical steps */
.vertical-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vertical-steps .step {
  grid-template-columns: 44px 1fr;
}
@media (min-width: 720px) {
  .vertical-steps { grid-template-columns: 1fr; }
}

/* Code blocks */
.code-block {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 0;
  overflow-x: auto;
}
.code-block code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  display: block;
}

/* Info tables */
.info-table {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  align-items: center;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  font-weight: 600;
  min-width: 140px;
}
.info-value {
  color: var(--muted);
  flex: 1;
}

/* Links in footer */
.foot-left a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.foot-left a:hover {
  text-decoration: underline;
}
.foot-right a {
  color: var(--muted);
  text-decoration: none;
}
.foot-right a:hover {
  color: var(--text);
}

/* Step links */
.step a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.step a:hover {
  text-decoration: underline;
}

/* Use case section */
.use-case {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.use-case-icon {
  font-size: 48px;
  color: var(--brand);
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(79,124,255,0.15), rgba(127,86,217,0.1));
  border-radius: 14px;
}
.use-case-content {
  flex: 1;
}
.use-case-content .lead {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--text);
}
.use-case-content .benefits {
  margin: 0 0 16px;
  padding-left: 20px;
}
.use-case-content .benefits li {
  margin-bottom: 6px;
}
.use-case-content > p:last-child {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 600px) {
  .use-case {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .use-case-content .benefits {
    text-align: left;
  }
}

/* App screenshot styling */
.app-screenshot {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.app-screenshot img {
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* README content styling */
.readme-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem;
  background: #ffffff !important;
  color: #0b0c10 !important;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.readme-content h1,
.readme-content h2,
.readme-content h3,
.readme-content h4 {
  color: #0b0c10;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.readme-content h1 { font-size: 2rem; }
.readme-content h2 { font-size: 1.5rem; }
.readme-content h3 { font-size: 1.25rem; }

.readme-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: #374151;
}

.readme-content code {
  background: #f3f4f6;
  color: #1f2937;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.readme-content pre {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #e5e7eb;
}

.readme-content pre code {
  background: none;
  padding: 0;
  color: #1f2937;
}

.readme-content ul,
.readme-content ol {
  margin: 1rem 0 1rem 2rem;
  color: #374151;
}

.readme-content li {
  margin-bottom: 0.5rem;
}

.readme-content a {
  color: #335cff;
  text-decoration: none;
  font-weight: 500;
}

.readme-content a:hover {
  text-decoration: underline;
}

.readme-content blockquote {
  border-left: 4px solid #335cff;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #6b7280;
  font-style: italic;
}

.readme-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.readme-content th,
.readme-content td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.readme-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #111827;
}

.readme-content td {
  color: #374151;
}

.readme-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* =========================================
   RESOURCE FINDER
   ========================================= */
.resource-finder-section {
  background: var(--panel);
  border-radius: 12px;
  padding: 3rem 2rem;
}

.subtitle-text {
  text-align: center;
  color: var(--muted);
  margin-top: -1rem;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.finder-container {
  max-width: 800px;
  margin: 0 auto;
}

.finder-selections {
  margin-bottom: 2rem;
}

.finder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.finder-compact {
  display: block;
}

.finder-group-full {
  width: 100%;
}

.finder-group-compact {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 1.25rem;
}

.finder-label-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--stroke);
}

.finder-label-compact i {
  color: var(--brand);
}

.finder-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.finder-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  position: relative;
}

.finder-item:hover {
  background: var(--panel);
}

.finder-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.finder-check {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--stroke);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.finder-check i {
  font-size: 0.75rem;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.finder-item.selected .finder-check {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: var(--brand);
}

.finder-item.selected .finder-check i {
  opacity: 1;
}

.finder-text {
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
}

.finder-compact > button {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

#showResourcesBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Results section */
.finder-results {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--stroke);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.5rem;
  color: var(--brand);
}

.results-context {
  flex: 1 0 100%;
  color: var(--muted);
  margin: 0.5rem 0 0 0;
  font-size: 0.95rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.results-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.resource-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.resource-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.resource-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
}

.resource-content {
  flex: 1;
}

.resource-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.resource-header i {
  font-size: 1.5rem;
  color: var(--brand);
}

.resource-header h4 {
  margin: 0;
  font-size: 1.2rem;
  flex: 1;
}

.resource-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--panel);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
}

.resource-time i {
  font-size: 0.85rem;
}

.resource-description {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.resource-card .btn {
  display: inline-flex;
}

.results-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-footer p {
  margin: 0;
  font-size: 1.05rem;
}

.results-footer strong {
  color: var(--brand);
}

/* Responsive */
@media (max-width: 768px) {
  .finder-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .resource-card {
    flex-direction: column;
  }
  
  .resource-number {
    align-self: flex-start;
  }
  
  .results-header {
    flex-direction: column;
  }
  
  .results-footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Print styles */
@media print {
  .finder-selections,
  .results-header button {
    display: none !important;
  }
  
  .resource-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
