/* ===================================================================
   Byte & Bit Tech Lab - Modern Cyberpunk / Dark Mode Design System
   =================================================================== */

:root {
  --bg-primary: #080c14;
  --bg-surface: #0f172a;
  --bg-card: #141e33;
  --bg-card-hover: #1a2744;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --cyan: #06b6d4;
  --purple: #a855f7;
  --emerald: #10b981;
  --glow-amber: rgba(245, 158, 11, 0.25);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.15);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Background grid effect */
.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
header.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-main);
}

.mascot-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px var(--glow-amber);
  animation: float 4s ease-in-out infinite;
}

.mascot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #dc2626;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.yt-badge:hover {
  background: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber-light);
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero h2 span.gradient {
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 36px;
}

/* ---------- Search & Filter Bar ---------- */
.filter-bar {
  max-width: 760px;
  margin: 0 auto 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 20px var(--glow-amber);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill-btn {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--amber);
  color: #0f172a;
  border-color: var(--amber);
  font-weight: 700;
  box-shadow: 0 2px 10px var(--glow-amber);
}

/* ---------- Tutorials Grid ---------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.section-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
  margin-bottom: 72px;
}

/* ---------- Tutorial Card ---------- */
.tutorial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  position: relative;
}

.tutorial-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.card-top {
  padding: 24px 24px 16px;
  position: relative;
}

.card-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
}

.category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.highlight-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

/* Title of Short mentioned */
.short-reference {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 12px;
  width: 100%;
  line-height: 1.35;
}

.short-reference svg {
  flex-shrink: 0;
}

.short-reference a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: color 0.2s;
}

.short-reference a:hover {
  color: #fca5a5;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.card-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--amber);
}

.card-highlights li {
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.card-highlights li::before {
  content: "✔";
  color: var(--emerald);
  font-weight: bold;
  font-size: 0.75rem;
}

.card-footer {
  margin-top: auto;
  padding: 16px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tool-chip {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Learn More button with target="_blank" */
.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #080c14;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-learn-more:hover {
  background: linear-gradient(135deg, #fbbf24, var(--amber));
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

/* ---------- Empty State ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-state p {
  color: var(--text-muted);
  margin-top: 10px;
}

/* ---------- Site Footer ---------- */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #060910;
  padding: 36px 0;
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

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

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

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
