/* CromaPic Modern Single-Screen App Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg-dark: #080b11;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(28, 36, 56, 0.9);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --cyan-glow: #00f2fe;
  --purple-glow: #9d4edd;
  --blue-brand: #2563eb;
  
  --grad-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #9d4edd 100%);
  --grad-card: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 40px rgba(0, 242, 254, 0.15);
}

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

/* Strictly Lock Body & Html Height & Disable Global Body Scroll */
html, body {
  height: 100%;
  height: 100dvh;
  width: 100vw;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: manipulation;
  font-family: 'Inter', sans-serif;
  background-color: #080b11 !important;
  color: #f8fafc !important;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #151d30 0%, #080b11 70%) !important;
}

/* Ambient Lighting Blobs */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.blob-1 { top: -100px; left: 20%; width: 450px; height: 450px; background: var(--cyan-glow); }
.blob-2 { bottom: 10%; right: 10%; width: 400px; height: 400px; background: var(--purple-glow); }

/* Centered Top Logo Header */
.site-header {
  width: 100%;
  backdrop-filter: blur(20px);
  background: rgba(8, 11, 17, 0.95) !important;
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  flex-shrink: 0;
  padding: 12px 16px 10px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.header-logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark, .mark, img.mark, img.brand-mark {
  height: 38px !important;
  max-height: 38px !important;
  width: auto !important;
  object-fit: contain !important;
}

.brand-wordmark, .word, img.word, img.brand-wordmark {
  height: 22px !important;
  max-height: 22px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}

/* Category Navigation Row Directly Below Logo (Icon Only) */
.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.nav-icon-btn:hover, .nav-icon-btn.active {
  color: var(--cyan-glow);
  background: rgba(0, 242, 254, 0.2);
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
  transform: translateY(-2px) scale(1.08);
}

.nav-icon-btn.highlight-game {
  border-color: rgba(0, 242, 254, 0.35);
}

.nav-icon-btn.nav-cta {
  background: rgba(157, 78, 221, 0.15);
  border-color: rgba(157, 78, 221, 0.4);
}

.nav-icon-btn.nav-cta:hover, .nav-icon-btn.nav-cta.active {
  background: rgba(157, 78, 221, 0.3);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* Main App Viewport & Single-Screen Tab Pages */
.app-viewport {
  flex: 1;
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 10;
}

.tab-page {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px;
  -webkit-overflow-scrolling: touch;
}

.tab-page.active {
  display: block;
  animation: tabFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding-bottom: 20px;
}

/* Hero Section inside Home Tab */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 30px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--cyan-glow);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.2px;
  margin-bottom: 16px;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  color: #050811 !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

/* Visual Card */
.hero-visual-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 6px;
  background: var(--grad-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-glow);
}

.hero-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  display: block;
}

.glass-floating-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 12px 16px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-icon {
  width: 36px;
  height: 36px;
  background: rgba(0, 242, 254, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-glow);
  font-size: 16px;
}

.badge-text p { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.badge-text span { font-size: 11.5px; color: var(--text-secondary); }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.stat-label { font-size: 12.5px; color: var(--text-secondary); }

/* Section Header */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 30px;
}

.section-tag {
  color: var(--cyan-glow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.section-subtitle { font-size: 14.5px; color: var(--text-secondary); }

/* Products Grid */
.products-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(157, 78, 221, 0.15);
  color: #c77dff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-name { font-family: 'Outfit', sans-serif; font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.product-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 18px; }
.product-link { font-size: 13px; font-weight: 700; color: var(--cyan-glow); text-decoration: none; }

/* Applications Chips */
.app-tags-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.app-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(157, 78, 221, 0.1) 100%);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
}

.cta-box h2 { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cta-box p { color: var(--text-secondary); font-size: 14px; margin-bottom: 18px; }

/* Contact Card */
.contact-card {
  max-width: 580px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
}

.contact-info p {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.contact-info strong { color: var(--text-primary); }

/* Free-Form 60s Timed Typing Speed Tester Container */
.game-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 100%;
}

.game-dashboard.col-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.game-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-title { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.5px; }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; color: var(--cyan-glow); }

.highlight-timer {
  color: #ff4757 !important;
  text-shadow: 0 0 14px rgba(255, 71, 87, 0.4);
}

/* Expanded Multiline Typing Textarea */
.typing-box-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.typing-textarea {
  width: 100%;
  height: 280px;
  padding: 20px;
  background: #0d1527 !important;
  border: 2px solid rgba(0, 242, 254, 0.5) !important;
  border-radius: var(--radius-md);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.6;
  outline: none;
  resize: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.15);
  transition: all 0.25s ease;
  touch-action: auto !important;
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  user-select: text !important;
}

.typing-textarea:focus {
  border-color: var(--cyan-glow) !important;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 35px rgba(0, 242, 254, 0.35) !important;
  background: #111a30 !important;
}

.typing-textarea:disabled {
  opacity: 0.7;
  border-color: rgba(255, 71, 87, 0.6) !important;
  cursor: not-allowed;
}

.typing-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.typing-hint {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.btn-ghost-sm {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost-sm:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: rgba(0, 242, 254, 0.4);
  color: var(--cyan-glow);
}

/* Mobile Responsive Optimization */
@media (max-width: 768px) {
  .site-header { padding: 10px 12px 8px; }
  .header-nav-row { gap: 12px; }
  
  .nav-icon-btn {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .tab-page {
    padding: 14px 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    margin-bottom: 16px;
  }

  .hero-title { font-size: 24px !important; }
  .hero-copy { font-size: 13.5px; margin-bottom: 16px; }
  
  .hero-actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn-primary, .btn-ghost {
    width: 100%;
    padding: 10px;
    font-size: 13.5px;
  }

  .hero-img { max-height: 160px; }
  
  .stats-grid, .products-grid-3, .app-tags-container {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .section-title { font-size: 20px !important; }
  .section-subtitle { font-size: 12.5px; }

  .game-container { padding: 12px; }
  .game-dashboard.col-3 { padding: 10px 8px; gap: 4px; }
  .stat-title { font-size: 10px; }
  .stat-value { font-size: 17px; }
  .typing-textarea { height: 220px; font-size: 16px !important; padding: 14px; }
  .typing-tools-row { flex-direction: column; gap: 8px; align-items: flex-start; }
}
