/* ============================================================
   ReviewCompare - Main Stylesheet
   Dark glassmorphism + vibrant accent design
   ============================================================ */

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --glass:         rgba(255,255,255,0.06);
  --glass-border:  rgba(255,255,255,0.10);

  --accent:        #6c63ff;
  --accent-light:  #8b83ff;
  --accent-glow:   rgba(108,99,255,0.35);
  --teal:          #06b6d4;
  --emerald:       #22c55e;
  --amber:         #f59e0b;
  --rose:          #ef4444;

  --text-primary:  #f1f0ff;
  --text-secondary:#a8a3c9;
  --text-muted:    #6b6880;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-glow: 0 0 40px rgba(108,99,255,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(108,99,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(6,182,212,0.10) 0%, transparent 60%);
}

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-primary); text-decoration: none;
  letter-spacing: -0.5px;
}
.logo-icon { font-size: 1.5rem; }
.nav-links {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--glass); }
.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
}
.btn-nav:hover { background: var(--accent-light) !important; box-shadow: 0 0 20px var(--accent-glow); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ---- Hero ---- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; border-radius: 100px;
  background: var(--glass); border: 1px solid var(--glass-border);
  font-size: 0.8rem; color: var(--accent-light); font-weight: 600;
  margin-bottom: 28px; letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -1.5px; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--teal) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 48px;
}

/* ---- Search Form Card ---- */
.search-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 780px;
  margin: 0 auto;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}
.search-card h2 {
  font-size: 1.35rem; font-weight: 700; margin-bottom: 28px;
  color: var(--text-primary);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(108,99,255,0.07);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group select option { background: #1a1a28; color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* Star rating input */
.star-input { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { display: none; }
.star-input label {
  font-size: 1.8rem; cursor: pointer; color: var(--text-muted);
  transition: var(--transition); line-height: 1;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--amber); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary {
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---- Section ---- */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; }

/* ---- Stats Strip ---- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--glass-border);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin: 60px 0;
}
.stat-item {
  background: var(--bg-secondary);
  padding: 32px 24px; text-align: center;
}
.stat-item .num { font-size: 2.5rem; font-weight: 800; color: var(--accent-light); }
.stat-item .lbl { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ---- Feature Cards ---- */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: var(--transition);
}
.feature-card:hover { background: var(--bg-card-hover); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* ---- Results Page ---- */
.results-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 40px;
}
.results-meta { color: var(--text-secondary); font-size: 0.9rem; margin-top: 8px; }
.results-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.filters-panel {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 24px;
  position: sticky; top: 90px;
}
.filters-panel h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.filter-group { margin-bottom: 24px; }
.filter-group label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: var(--transition);
}
.chip:hover, .chip.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.sort-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--text-primary);
  font-family: inherit; font-size: 0.88rem;
}

/* ---- Business Cards (results) ---- */
.business-list { display: flex; flex-direction: column; gap: 24px; }
.business-card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition);
}
.business-card:hover { border-color: rgba(108,99,255,0.4); box-shadow: var(--shadow-glow); }
.business-card-header {
  padding: 24px 28px; display: flex;
  justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid var(--glass-border);
}
.business-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.business-address { color: var(--text-secondary); font-size: 0.88rem; }
.business-overall {
  text-align: right; flex-shrink: 0; margin-left: 20px;
}
.overall-score {
  font-size: 2.8rem; font-weight: 800; line-height: 1;
}
.overall-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; }
.review-count { font-size: 0.82rem; color: var(--text-muted); }

/* ---- Highlight Bars ---- */
.highlights-grid {
  display: grid; grid-template-columns: repeat(5,1fr);
  gap: 0; border-bottom: 1px solid var(--glass-border);
}
.highlight-item {
  padding: 18px 20px; text-align: center;
  border-right: 1px solid var(--glass-border);
}
.highlight-item:last-child { border-right: none; }
.highlight-icon { font-size: 1.4rem; margin-bottom: 6px; }
.highlight-label { font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.highlight-score { font-size: 1.1rem; font-weight: 700; }
.bar-wrap { height: 5px; background: rgba(255,255,255,0.08); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

/* ---- Reviews List ---- */
.reviews-list { padding: 24px 28px; }
.reviews-list-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.reviews-list-header h4 { font-size: 1rem; font-weight: 700; }
.review-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.review-item:last-child { border-bottom: none; padding-bottom: 0; }
.review-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 10px;
}
.reviewer-info { display: flex; align-items: center; gap: 12px; }
.reviewer-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.reviewer-name { font-weight: 600; font-size: 0.92rem; }
.review-date { font-size: 0.78rem; color: var(--text-muted); }
.review-title { font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.review-body { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
}
.badge-good     { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-average  { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.badge-bad      { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

/* ---- Star display ---- */
.stars { display: inline-flex; gap: 2px; }
.star { font-style: normal; font-size: 0.9rem; }
.star-full  { color: var(--amber); }
.star-half  { color: var(--amber); }
.star-empty { color: var(--text-muted); }
.rating-num { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); vertical-align: middle; }

/* ---- Rating Donut Mini ---- */
.rating-ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.rating-ring-label { position: absolute; font-size: 1.1rem; font-weight: 800; }

/* ---- Add Business / Add Review Forms ---- */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
}
.page-hero h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.page-hero p { color: var(--text-secondary); max-width: 500px; margin: 0 auto; }
.form-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 44px;
  max-width: 820px; margin: 0 auto 80px;
  backdrop-filter: blur(20px); box-shadow: var(--shadow-card);
}
.form-section-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent-light);
  margin: 32px 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.form-section-title:first-child { margin-top: 0; }

/* ---- Alert / Toast ---- */
.alert {
  padding: 14px 20px; border-radius: var(--radius-sm);
  margin-bottom: 24px; font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.alert-info    { background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.3); color: var(--accent-light); }

/* ---- No results ---- */
.empty-state {
  text-align: center; padding: 80px 40px;
  border: 1px dashed var(--glass-border); border-radius: var(--radius-lg);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 20px; }
.empty-state h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 28px; }

/* ---- Footer ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 0;
  margin-top: 80px;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
}
.footer-brand .logo-icon { font-size: 2rem; }
.footer-name { font-size: 1.2rem; font-weight: 800; margin-left: 8px; }
.footer-brand p { color: var(--text-secondary); margin-top: 12px; font-size: 0.9rem; }
.footer-links h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; color: var(--text-muted); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding: 20px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.82rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
  .highlights-grid { grid-template-columns: repeat(3,1fr); }
  .highlight-item:nth-child(3) { border-right: none; }
  .highlight-item:nth-child(4),
  .highlight-item:nth-child(5) { border-top: 1px solid var(--glass-border); }
  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(10,10,15,0.97); padding: 20px; gap: 4px; border-bottom: 1px solid var(--glass-border); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .search-card { padding: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: repeat(2,1fr); }
  .highlight-item:nth-child(2) { border-right: none; }
  .business-card-header { flex-direction: column; gap: 16px; }
  .business-overall { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 24px; }
}
