/* ==========================================================================
   PLAYGROUND.DHANI.TECH — BENTO GRID & LAB DASHBOARD STYLESHEET
   Aesthetics: Cyber-Bento, Obsidian Dark Mode, Neon Glow Accents, 60fps
   ========================================================================== */

/* --- 1. DESIGN TOKENS & PALETTE --- */
:root {
  --bg-space: #06090f;
  --bg-surface: #0b101c;
  --bg-card: rgba(15, 22, 38, 0.7);
  --bg-card-hover: rgba(22, 32, 54, 0.85);
  --bg-header: rgba(9, 13, 23, 0.82);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 229, 255, 0.35);
  --border-lime: rgba(0, 255, 136, 0.35);

  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00e5ff;
  --accent-lime: #00ff88;
  --accent-amber: #ffb300;
  --accent-purple: #b388ff;
  --accent-rose: #ff3366;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. BASE RESET & GLOBAL --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Container */
.lab-container {
  width: 92%;
  max-width: 1240px;
  margin: 0 auto;
}

/* --- 3. AMBIENT MESH BACKGROUND --- */
.mesh-bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: blob-float 18s ease-in-out infinite alternate;
}

.blob-cyan {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  top: -100px;
  left: 10%;
}

.blob-lime {
  width: 450px;
  height: 450px;
  background: var(--accent-lime);
  bottom: 5%;
  right: 15%;
  animation-delay: -5s;
}

.blob-purple {
  width: 400px;
  height: 400px;
  background: var(--accent-purple);
  top: 40%;
  right: -80px;
  animation-delay: -10s;
}

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}

/* --- 4. NAVIGATION / TELEMETRY HEADER --- */
.lab-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lab-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-flask {
  font-size: 20px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6));
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
}

.brand-text .dot {
  color: var(--accent-lime);
}

.brand-text .tld {
  color: var(--accent-cyan);
}

.brand-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
  letter-spacing: 0.05em;
}

/* Telemetry Stats */
.nav-telemetry {
  display: none;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

@media (min-width: 900px) {
  .nav-telemetry {
    display: flex;
  }
}

.telemetry-node {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.node-label {
  color: var(--text-dim);
}

.node-val {
  color: var(--text-primary);
  font-weight: 700;
}

.node-val.online { color: var(--accent-lime); }
.node-val.lime { color: var(--accent-cyan); }

/* Right Buttons */
.nav-links-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lab-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 8px;
  transition: all 0.2s var(--ease-spring);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lab-btn-cli {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--accent-cyan);
}

.lab-btn-cli:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.lab-btn-portfolio {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.lab-btn-portfolio:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

/* --- 5. HERO & FILTER DOCK --- */
.lab-main {
  position: relative;
  z-index: 10;
  padding: 48px 0 80px;
}

.lab-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 44px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-lime);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.22);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.65;
  margin-bottom: 32px;
}

/* Filter Dock */
.lab-filter-dock {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(15, 22, 38, 0.5);
  backdrop-filter: blur(12px);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 42px 12px 40px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.shortcut-pill {
  position: absolute;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.filter-pill:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.filter-pill.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* --- 6. BENTO GRID SECTION --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

/* Bento Card Base */
.bento-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  overflow: hidden;
}

.bento-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 229, 255, 0.15);
}

/* Featured Span Modifiers */
@media (min-width: 768px) {
  .bento-card.col-span-2 {
    grid-column: span 2;
  }
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
}

.status-badge.live {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-lime);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge.beta {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.status-badge.prototype {
  background: rgba(255, 179, 0, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 179, 0, 0.3);
}

.card-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.card-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 4px;
}

.launch-arrow {
  color: var(--accent-cyan);
  font-size: 16px;
  transition: transform 0.2s ease;
}

.bento-card:hover .launch-arrow {
  transform: translate(3px, -3px);
}

/* --- 7. SLEEK EMPTY STATE CARD --- */
.bento-empty-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px dashed var(--border-glow);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
}

.empty-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-subtitle {
  color: var(--text-secondary);
  max-width: 620px;
  font-size: 15px;
  line-height: 1.6;
}

/* Quick Code Snippet Guide in Empty State */
.empty-code-card {
  width: 100%;
  max-width: 680px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.empty-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 11.5px;
  font-weight: 700;
}

.empty-code-card pre {
  overflow-x: auto;
  color: var(--text-primary);
  line-height: 1.5;
}

.empty-code-card pre code {
  color: var(--accent-lime);
}

/* --- 8. MODAL DRAWER --- */
.lab-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lab-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 229, 255, 0.2);
  animation: modal-enter 0.25s var(--ease-spring);
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.94) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--text-primary);
}

.modal-header {
  margin-bottom: 18px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.modal-category {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan);
}

.modal-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.specs-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.specs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-btn-launch {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-lime));
  color: #06090f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease-spring);
}

.modal-btn-launch:hover {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
}

/* --- 9. FOOTER --- */
.lab-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13px;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
  }
}

.footer-right {
  display: flex;
  gap: 16px;
}

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

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