:root {
  --bg-primary: #f0f4f9;
  --bg-card: #ffffff;
  --bg-card-inner: #f8fafc;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-subtle: #eff6ff;
  --accent-blue-border: #bfdbfe;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --btn-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --shadow-card: 0 20px 45px -12px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: radial-gradient(circle at 50% 0%, #dbeafe 0%, transparent 65%);
  padding: 16px;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header */
.header {
  text-align: center;
  position: relative;
}

.cafe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-blue-subtle);
  border: 1px solid var(--accent-blue-border);
  color: var(--accent-blue);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.cafe-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.2;
}

.cafe-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}

/* Settings Gear */
.settings-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  color: var(--accent-blue);
  background: var(--accent-blue-subtle);
  border-color: var(--accent-blue-border);
}

/* Star Rating Section */
.rating-section {
  text-align: center;
}

.rating-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stars-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.star-btn {
  background: transparent;
  border: none;
  font-size: 36px;
  color: #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  user-select: none;
  line-height: 1;
}

.star-btn:active {
  transform: scale(1.3);
}

.star-btn.active {
  color: var(--accent-gold);
  filter: drop-shadow(0 2px 8px var(--accent-gold-glow));
}

.rating-badge-label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-blue);
  height: 20px;
}

/* Swipeable Card Area */
.card-wrapper {
  position: relative;
  min-height: 180px;
  perspective: 1000px;
}

.review-card {
  background: var(--bg-card-inner);
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px 20px;
  position: relative;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.2s ease;
}

.review-card:active {
  cursor: grabbing;
}

.card-top-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 12px;
}

.quote-icon {
  font-size: 28px;
  color: #93c5fd;
  line-height: 1;
  font-weight: 800;
}

.review-text-display {
  font-size: 16px;
  line-height: 1.6;
  color: #1e293b;
  min-height: 75px;
  font-weight: 500;
}

.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  font-weight: 600;
}

.swipe-hint span {
  animation: pulse-horizontal 1.8s infinite;
}

@keyframes pulse-horizontal {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* Card Swipe Animations */
.slide-out-left {
  transform: translateX(-120%) rotate(-10deg) !important;
  opacity: 0 !important;
}

.slide-out-right {
  transform: translateX(120%) rotate(10deg) !important;
  opacity: 0 !important;
}

.slide-in-right {
  animation: slideInRight 0.25s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.25s ease-out forwards;
}

@keyframes slideInRight {
  from { transform: translateX(70px) rotate(4deg); opacity: 0; }
  to { transform: translateX(0) rotate(0deg); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-70px) rotate(-4deg); opacity: 0; }
  to { transform: translateX(0) rotate(0deg); opacity: 1; }
}

/* Navigation Arrow Buttons */
.nav-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: -4px;
}

.nav-arrow-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav-arrow-btn:active {
  background: #f1f5f9;
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: scale(0.97);
}

/* Proceed Button */
.proceed-btn {
  background: var(--btn-gradient);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  border: none;
  padding: 16px 20px;
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, filter 0.2s ease;
  letter-spacing: 0.3px;
}

.proceed-btn:active {
  transform: scale(0.98);
  filter: brightness(1.08);
}

.google-icon-wrapper {
  background: #ffffff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.google-icon {
  width: 17px;
  height: 17px;
}

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

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.form-input {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  font-weight: 500;
}

.form-input:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
}

.save-config-btn {
  background: var(--btn-gradient);
  border: none;
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
