/* =========================================================================
 *  VX Review – "Liquid Glass" UI
 *  Glassmorphism 2.0 · Aurora-Mesh-Background · weiche Tiefe · Micro-Interactions
 * ========================================================================= */

:root {
  --bg: #08090d;
  --text: #eef0f5;
  --muted: #99a1b3;
  --faint: #6f7686;

  --accent: #6e8bff;
  --accent-2: #a472ff;
  --gold: #ffd24a;
  --google: #2ecc71;

  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --glass-brd: rgba(255, 255, 255, 0.10);
  --glass-brd-hi: rgba(255, 255, 255, 0.22);

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.75);
  --ease: cubic-bezier(0.22, 0.85, 0.26, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 640px at 12% -8%, rgba(110, 139, 255, 0.22), transparent 60%),
    radial-gradient(820px 620px at 92% 4%, rgba(164, 114, 255, 0.20), transparent 58%),
    radial-gradient(760px 700px at 50% 116%, rgba(46, 220, 180, 0.12), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

/* feine Körnung über allem – nimmt dem Verlauf das "Banding" und wirkt edel */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  position: relative; z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 96px;
}

.view.hidden { display: none; }
.view { animation: fadeUp 0.5s var(--ease) both; }

/* ---------- Hero ---------- */
.hero { text-align: center; margin-bottom: 44px; }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #c7cede);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  color: var(--muted);
  margin-top: 14px;
  font-size: clamp(1rem, 2.5vw, 1.12rem);
  font-weight: 450;
}

/* ---------- Gruppen ---------- */
.company-group { margin-bottom: 40px; }
.company-group:last-child { margin-bottom: 0; }
.group-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
  padding-left: 4px;
}
.group-title::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(110, 139, 255, 0.8);
}
.group-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--glass-brd), transparent);
}

/* ---------- Unternehmens-Grid (Bento-artig) ---------- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px;
}

.company-card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 26px 16px 22px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 10px 26px -18px rgba(0, 0, 0, 0.8);
  transition: transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
  animation: fadeUp 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
/* Lichtkante oben – "refraction" des Glas-Looks */
.company-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.7; transition: opacity 0.3s ease;
}
/* sanfter Akzent-Glow, der bei Hover aufleuchtet */
.company-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2;
  background: radial-gradient(120% 90% at 50% 0%, rgba(110, 139, 255, 0.22), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
}
.company-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-brd-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--shadow),
    0 0 0 1px rgba(110, 139, 255, 0.15);
}
.company-card:hover::after { opacity: 1; }
.company-card:active { transform: translateY(-2px) scale(0.985); }

/* ---------- Label (Titel / Stadt / Tag) ---------- */
.company-label { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.c-title { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; line-height: 1.2; }
.c-city { color: var(--muted); font-size: 0.84rem; font-weight: 450; }
.c-note {
  margin-top: 3px;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: #cdd6ff;
  background: rgba(110, 139, 255, 0.16);
  border: 1px solid rgba(110, 139, 255, 0.30);
  padding: 2px 9px; border-radius: 999px;
}

/* ---------- Logo / Initialen ---------- */
.company-logo {
  width: 66px; height: 66px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.45rem;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.4s var(--ease);
}
/* Echte Logos auf heller Kachel (Favicons sind für helle Hintergründe gemacht) */
.company-logo:has(img) {
  background: linear-gradient(160deg, #ffffff, #eaecf3);
  padding: 11px;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.company-logo img { width: 100%; height: 100%; object-fit: contain; }
.company-card:hover .company-logo { transform: translateY(-2px) scale(1.05); }
.company-logo.lg { width: 84px; height: 84px; font-size: 1.8rem; border-radius: 22px; }
.company-logo.lg:has(img) { padding: 13px; }

/* ---------- Review-Ansicht ---------- */
.back-btn {
  background: var(--glass); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--muted); font-size: 0.95rem; font-weight: 500; cursor: pointer;
  margin-bottom: 20px; padding: 9px 16px; border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.back-btn:hover { color: var(--text); border-color: var(--glass-brd-hi); transform: translateX(-2px); }

.review-card {
  position: relative; isolation: isolate;
  background: linear-gradient(160deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-brd);
  border-radius: 28px;
  padding: 32px 30px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow);
}
/* Kompakte, horizontale Kopfzeile: Logo links, Firma + Standort rechts */
.review-head { text-align: left; display: flex; flex-direction: row; align-items: center; gap: 16px; }
.review-head .company-logo.lg { width: 58px; height: 58px; font-size: 1.35rem; border-radius: 16px; }
.review-head .company-logo.lg:has(img) { padding: 9px; }
#review-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-weight: 700; }
.review-head .c-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.review-head .c-city { font-size: 0.95rem; }
#review-name .c-note { display: none; }  /* Wäscherei/Reinigung-Tag auf der Text-Seite ausblenden */

.review-text {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  padding: 22px;
  margin: 24px 0;
  font-size: 1.1rem;
  line-height: 1.65;
  min-height: 116px;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---------- Buttons ---------- */
.actions { display: flex; gap: 12px; margin-bottom: 14px; }
.btn {
  border: none; border-radius: 15px; padding: 15px 18px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; width: 100%;
  letter-spacing: -0.01em;
  transition: transform 0.18s var(--ease), box-shadow 0.25s ease, filter 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 26px -10px rgba(110, 139, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(110, 139, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.btn-ghost {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-ghost:hover { border-color: var(--glass-brd-hi); background: var(--glass-strong); transform: translateY(-2px); }

.btn-google {
  color: #fff; margin-top: 6px;
  background: linear-gradient(135deg, #34c76a, #1faa56);
  box-shadow: 0 12px 26px -10px rgba(46, 220, 130, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(46, 220, 130, 0.75); }

.hint { text-align: center; color: var(--faint); font-size: 0.88rem; margin-top: 16px; }

/* ---------- Loader ---------- */
.loader { display: flex; gap: 9px; justify-content: center; align-items: center; height: 72px; }
.loader span {
  width: 11px; height: 11px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  animation: bounce 1s infinite ease-in-out;
}
.loader span:nth-child(2) { animation-delay: 0.15s; }
.loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.5); opacity: 0.45; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 50;
  transform: translateX(-50%) translateY(24px);
  background: rgba(20, 22, 30, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-brd-hi);
  color: #fff; padding: 13px 22px; border-radius: 14px;
  font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Animationen ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
  .app { padding: 40px 16px 80px; }
  .company-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 13px; }
  .actions { flex-direction: column; }
  .review-card { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
