:root {
  --brand-blue: #2c5aa0;
  --brand-blue-dark: #1e3f75;
  --brand-blue-light: #4a7bc4;
  --brand-gold: #f4b942;
  --brand-gold-dark: #e0a428;
  --bg: #f5f8fc;
  --bg-2: #eaf1fa;
  --surface: #ffffff;
  --text: #1a2540;
  --text-muted: #5a6a86;
  --border: #d8e2f0;
  --border-strong: #b8c8e0;
  --success: #16a34a;
  --shadow-sm: 0 2px 8px rgba(28, 60, 120, 0.06);
  --shadow-md: 0 8px 28px rgba(28, 60, 120, 0.10);
  --shadow-lg: 0 20px 60px rgba(28, 60, 120, 0.16);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 100% -10%, rgba(244, 185, 66, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(44, 90, 160, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.brand-text h1 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-blue-dark);
  letter-spacing: 0.2px;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Hero logo (replaces top header) */
.hero-logo {
  text-align: center;
  padding: 28px 20px 4px;
}
.hero-logo img {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(28, 60, 120, 0.12));
}

/* Container */
.container {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* Card */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

/* Intro card */
.intro-card {
  text-align: center;
  padding-top: 40px;
  background: linear-gradient(180deg, #eef4fc 0%, #d6e4f7 55%, #b8ceee 100%);
  border: 1px solid #a9c2e8;
  box-shadow: none;
}

.intro-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--brand-blue-dark);
  letter-spacing: -0.4px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.55;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.sun-decor {
  display: none;
}

/* Stars */
.stars {
  display: inline-flex;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #fff, #f6f9fd);
  border-radius: 100px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.star {
  background: none;
  border: none;
  font-size: 44px;
  color: #d9dde5;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform 0.15s ease, color 0.15s ease, filter 0.2s ease;
  line-height: 1;
}

.star:hover { transform: scale(1.12); }

.star.active,
.star.hover-active {
  color: #3f9a53;
  filter: none;
}

.rating-label {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 20px;
}

/* Reviews section */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reviews-header h3 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  color: var(--brand-blue-dark);
  font-weight: 700;
}

.btn-ghost {
  background: #fff;
  border: 1.5px solid var(--brand-blue);
  color: var(--brand-blue);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--brand-blue);
  color: #fff;
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: wait;
}

.refresh-icon {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
}

.btn-ghost.spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Reviews grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Review card — permanent outline */
.review-item {
  background: #fdfdfd;
  border: 2px solid var(--brand-blue-light);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 0 rgba(74, 123, 196, 0.08);
}

.review-item:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.review-item.selected {
  border-color: var(--brand-gold);
  background: linear-gradient(180deg, #fffbf1, #fff8e6);
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.22), 0 8px 20px rgba(244, 185, 66, 0.18);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.review-item.selected .review-number {
  background: var(--brand-gold-dark);
}

.review-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: #fff;
}

.review-item.selected .review-check {
  background: var(--brand-gold);
  border-color: var(--brand-gold-dark);
  color: #fff;
}

.review-check::after {
  content: '';
  width: 8px;
  height: 4px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.review-item.selected .review-check::after { opacity: 1; }

.review-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  flex: 1;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-blue-dark);
  background: #e8f0fc;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.lang-tag.hinglish {
  color: #7a4a00;
  background: #fff3d6;
}

.copy-btn {
  background: none;
  border: 1.5px solid var(--border-strong);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* Skeleton loader */
.skeleton {
  background: #f0f4fa;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  height: 170px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer { to { left: 100%; } }

.reviews-grid.loading .skeleton-line {
  background: #e2eaf5;
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  color: #fff;
  border: none;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 100px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(44, 90, 160, 0.32);
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(44, 90, 160, 0.4);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
  background: linear-gradient(135deg, #b8c4d8, #98a8c2);
  cursor: not-allowed;
  box-shadow: none;
}

.arrow {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.btn-primary:hover:not(:disabled) .arrow { transform: translateX(4px); }

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  background: var(--text);
  color: #fff;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
}

.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
    gap: 12px;
  }
  .logo { height: 44px; }
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 10px; }
  .container { padding: 20px 14px 40px; }
  .card { padding: 22px 18px; border-radius: 16px; }
  .intro-card h2 { font-size: 24px; }
  .subtitle { font-size: 14px; }
  .star { font-size: 36px; padding: 2px 4px; }
  .stars { gap: 4px; padding: 8px 14px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .btn-primary { padding: 14px 30px; font-size: 15px; width: 100%; justify-content: center; }
  .reviews-header h3 { font-size: 17px; }
}

@media (max-width: 380px) {
  .star { font-size: 32px; }
}
