:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --surface-3: #e8eaed;
  --text: #202124;
  --text-dim: #5f6368;
  --text-faint: #80868b;
  --accent: #01875f;
  --accent-2: #1a73e8;
  --accent-soft: rgba(1, 135, 95, 0.08);
  --green: #01875f;
  --yellow: #fbbc04;
  --red: #ea4335;
  --border: #e8eaed;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-display: 'Google Sans', 'Roboto', 'Segoe UI', sans-serif;
  --font-body: 'Roboto', 'Segoe UI', sans-serif;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--accent-soft); color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: conic-gradient(from 180deg, var(--accent-2) 0deg 90deg, var(--green) 90deg 180deg, var(--yellow) 180deg 270deg, var(--red) 270deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  height: 42px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-bar:focus-within { border-color: var(--accent-2); background: var(--surface); box-shadow: var(--shadow-soft); }
.search-bar svg { flex-shrink: 0; color: var(--text-faint); }
.search-bar input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.search-bar input::placeholder { color: var(--text-faint); }

.nav-cats { display: flex; gap: 4px; margin-left: auto; }

.nav-cats a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-cats a:hover, .nav-cats a.active { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 860px) {
  .nav-cats { display: none; }
  .topbar-inner { gap: 14px; padding: 0 16px; }
  .brand span.brand-text { display: none; }
}

/* ===== HERO BANNER ===== */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(120deg, #e8f5ee 0%, #e8f0fe 100%);
  padding: 52px 48px;
  margin: 24px auto 0;
  max-width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid var(--border);
}

.hero-text { position: relative; z-index: 1; max-width: 540px; }

.hero-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-text p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 0; }

.hero-visual {
  position: relative;
  z-index: 1;
  font-size: 84px;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .hero { flex-direction: column; text-align: left; padding: 32px 24px; }
  .hero-text h1 { font-size: 26px; }
  .hero-visual { font-size: 52px; }
}

/* ===== SECTIONS ===== */
.section { max-width: 1280px; margin: 0 auto; padding: 40px 32px 0; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }

.section-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}

.section-head .ver-tudo { font-size: 13px; font-weight: 700; color: var(--accent-2); cursor: pointer; }

/* ===== APP GRID / CARDS ===== */
.apps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1100px) { .apps-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.app-card:hover { box-shadow: var(--shadow-soft); border-color: var(--border); }

.app-card-icon { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }

.app-card-info .nome {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.app-card-info .categoria { font-size: 12px; color: var(--text-faint); margin: 0 0 6px; }

.app-card-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.app-card-rating svg { width: 12px; height: 12px; fill: var(--yellow); }

/* ===== APP DETAIL PAGE ===== */
.app-header { display: flex; gap: 24px; padding: 36px 0 24px; border-bottom: 1px solid var(--border); }

.app-header-icon { width: 124px; height: 124px; border-radius: 24px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; box-shadow: var(--shadow-soft); }

.app-header-info { flex: 1; min-width: 0; }

.app-header-info h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.app-header-info .dev { color: var(--accent-2); font-size: 14px; font-weight: 600; margin-bottom: 14px; }

.app-stats { display: flex; gap: 28px; margin-bottom: 20px; flex-wrap: wrap; }
.app-stat { display: flex; flex-direction: column; gap: 2px; }
.app-stat .valor { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 4px; color: var(--text); }
.app-stat .valor svg { width: 14px; height: 14px; fill: var(--yellow); }
.app-stat .label { font-size: 11px; color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: filter 0.15s, background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #016d4c; }
.btn-secondary { background: var(--surface-2); color: var(--accent-2); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.screenshots-row { display: flex; gap: 14px; overflow-x: auto; padding: 24px 0; scrollbar-width: thin; }
.screenshots-row img { height: 360px; border-radius: var(--radius-md); flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); }

.app-section-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 32px 0 14px; color: var(--text); }

.app-description { color: var(--text-dim); font-size: 14.5px; line-height: 1.7; white-space: pre-line; max-width: 760px; }

.rating-summary { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; padding: 20px 0; }
.rating-big { text-align: center; }
.rating-big .num { font-family: var(--font-display); font-size: 48px; font-weight: 700; line-height: 1; color: var(--text); }
.rating-big .stars { margin: 8px 0 4px; }
.rating-big .stars svg { width: 15px; height: 15px; fill: var(--yellow); }
.rating-big .total { font-size: 12px; color: var(--text-faint); }

.rating-bars { flex: 1; min-width: 240px; max-width: 420px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; color: var(--text-dim); }
.rating-bar-track { flex: 1; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--yellow); border-radius: 4px; }

.review-card { border-bottom: 1px solid var(--border); padding: 20px 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.review-meta .nome { font-size: 13.5px; font-weight: 700; color: var(--text); }
.review-meta .data { font-size: 11.5px; color: var(--text-faint); }
.review-stars { margin: 2px 0 8px; display: flex; gap: 2px; }
.review-stars svg { width: 13px; height: 13px; fill: var(--yellow); }
.review-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty-state .icon { font-size: 38px; margin-bottom: 10px; }

footer.site-footer {
  margin-top: 60px;
  padding: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 { font-family: var(--font-display); margin: 0 0 18px; font-size: 18px; color: var(--text); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }

.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-2); }
.field textarea { resize: vertical; min-height: 80px; }

.star-picker { display: flex; gap: 6px; }
.star-picker button { background: none; font-size: 26px; color: var(--surface-3); transition: color 0.1s; padding: 0; }
.star-picker button.ativo { color: var(--yellow); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  border: none;
  color: #fff;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loader-msg { text-align: center; padding: 80px 20px; color: var(--text-faint); }
