/* ==========================================================================
   Google Maps Booster & Reputation Management System
   Design System & Styling
   ========================================================================== */

:root {
  --primary-gold: #D4AF37;
  --primary-gold-hover: #F3E5AB;
  --rose-gold: #E0A96D;
  --accent-emerald: #0A3622;
  --bg-dark: #0F1419;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.12);
  --text-main: #F7FAFC;
  --text-muted: #A0AEC0;
  --star-active: #FFC107;
  --star-glow: rgba(255, 193, 7, 0.4);
  --success-color: #28A745;
  --error-color: #DC3545;
  --radius-lg: 20px;
  --radius-md: 12px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-glow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

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

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at top, #1a2332 0%, var(--bg-dark) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-x: hidden;
}

/* Mobile App Wrapper */
.app-container {
  width: 100%;
  max-width: 440px;
  background: rgba(23, 29, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.1);
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Admin Trigger Button */
.admin-trigger-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  z-index: 10;
}

.admin-trigger-btn:hover {
  background: var(--primary-gold);
  color: #000;
  transform: rotate(45deg);
}

/* Header Section */
.header-section {
  text-align: center;
  margin-bottom: 24px;
}

.business-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-gold);
  padding: 2px;
  box-shadow: var(--shadow-glow);
  margin-bottom: 12px;
}

.business-name {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.business-subtitle {
  font-size: 13px;
  color: var(--primary-gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Step Card Base */
.step-card {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-card.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Star Rating Section */
.rating-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.rating-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.stars-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.star-icon {
  font-size: 38px;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, text-shadow 0.2s ease;
  user-select: none;
}

.star-icon:hover,
.star-icon.active {
  color: var(--star-active);
  text-shadow: 0 0 16px var(--star-glow);
  transform: scale(1.15);
}

.star-icon:active {
  transform: scale(0.95);
}

.rating-feedback-label {
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
  color: var(--primary-gold);
  transition: all 0.2s ease;
}

/* Section: 4-5 Stars Booster Flow */
.booster-box {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 20px;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Tag Chips */
.tag-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-tag:hover {
  background: rgba(255, 255, 255, 0.15);
}

.chip-tag.selected {
  background: linear-gradient(135deg, var(--primary-gold) 0%, var(--rose-gold) 100%);
  color: #000;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Review Text Generator Area */
.review-text-area {
  width: 100%;
  min-height: 90px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 10px;
  transition: border-color 0.2s ease;
}

.review-text-area:focus {
  outline: none;
  border-color: var(--primary-gold);
}

.refresh-text-btn {
  background: transparent;
  border: none;
  color: var(--primary-gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.refresh-text-btn:hover {
  text-decoration: underline;
}

/* Primary CTA Button */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #D4AF37 0%, #AA7C11 100%);
  color: #000;
  border: none;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 100%);
}

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

.btn-secondary {
  width: 100%;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-secondary:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Section: 1-3 Stars Internal Shield Flow */
.shield-box {
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
}

.empathy-card {
  text-align: center;
  margin-bottom: 16px;
}

.empathy-title {
  font-size: 16px;
  font-weight: 700;
  color: #FF8080;
  margin-bottom: 6px;
}

.empathy-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  color: #FFF;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--rose-gold);
}

.btn-shield-submit {
  width: 100%;
  background: linear-gradient(135deg, #E0A96D 0%, #C47B36 100%);
  color: #000;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-shield-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224, 169, 109, 0.3);
}

.google-policy-fallback {
  text-align: center;
  margin-top: 14px;
}

.policy-link {
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.policy-link:hover {
  color: var(--text-main);
}

/* Success Screen */
.success-screen {
  text-align: center;
  padding: 20px 10px;
}

.success-icon {
  font-size: 54px;
  margin-bottom: 12px;
}

.success-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modal Admin Studio */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

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

.modal-content {
  background: #171D26;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-gold);
}

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

.close-modal-btn:hover {
  color: #FFF;
}

.qr-preview-box {
  text-align: center;
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

#qr-code-display {
  display: inline-block;
  background: #FFF;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid var(--primary-gold);
  color: #FFF;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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