/* VCTKIT Modern Design System */
:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --play-green: #047857;
  --badge-bg: #f1f5f9;
  --badge-text: #475569;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Background Subtle Grid Pattern */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language Switcher */
.lang-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 4px 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.lang-select-wrapper:hover {
  border-color: var(--border-hover);
}

.lang-select {
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  padding-right: 4px;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #fff;
  transition: all 0.2s ease;
}

.btn-admin:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: #f8fafc;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-main);
  max-width: 860px;
  margin: 0 auto 1.25rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Search & Filter Bar */
.search-filter-wrapper {
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-input-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-main);
  padding: 8px 10px;
  background: transparent;
}

.search-shortcut {
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.cat-tab {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
}

.cat-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Quick Metrics Banner */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-sm);
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-lbl {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* App Showcase Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

@media (max-width: 640px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* App Card */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

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

.app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.app-title-area {
  flex: 1;
  min-width: 0;
}

.app-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.app-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 2px 8px;
  border-radius: 6px;
}

.special-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #fde68a;
}

.app-summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* App Card Actions */
.app-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}

.action-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-row-stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-open-web {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  text-align: center;
}

.btn-open-web:hover {
  background: var(--primary-hover);
}

.btn-play-store,
.btn-app-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-play-store:hover,
.btn-app-store:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.btn-play-store img,
.btn-play-store svg,
.btn-app-store img,
.btn-app-store svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.btn-play-store:hover img,
.btn-play-store:hover svg,
.btn-app-store:hover img,
.btn-app-store:hover svg {
  transform: scale(1.08);
}

.btn-qr-trigger {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-qr-trigger:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: #f8fafc;
}

/* Empty State */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  background: #fff;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}

/* Modal QR Code */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.show {
  display: flex;
}

.qr-modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

.qr-tabs-wrapper {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1rem;
}

.qr-tab-btn {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.qr-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.qr-canvas-wrapper {
  background: #f8fafc;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.25rem 0 1rem;
  display: inline-block;
  border: 1px solid var(--border-subtle);
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
