/* ===================================================================
   Scratch & Win Game — Frontend Styles
   =================================================================== */

/* ---- Wrapper ---- */
.swg-wrapper {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.swg-heading {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.swg-subheading {
  font-size: 1.15rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.swg-instructions {
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 2rem;
}

/* ---- Cards container ---- */
.swg-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---- Single card ---- */
.swg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swg-card-inner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Prize layer (behind the canvas) */
.swg-card-prize {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.swg-prize-symbol {
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.swg-prize-image {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

/* Canvas overlay */
.swg-scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 12px;
  cursor: crosshair;
}

/* Card status label */
.swg-card-status {
  margin-top: 0.5rem;
}

.swg-status-label {
  font-size: 0.85rem;
  color: #999;
  transition: color 0.3s;
}

.swg-card-revealed .swg-status-label {
  color: #28a745;
  font-weight: 700;
}

/* ---- Progress counter ---- */
.swg-progress {
  font-size: 0.9rem;
  color: #888;
  margin-top: 1rem;
}

/* ---- Win banner ---- */
.swg-win-banner {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255, 183, 0, 0.4);
}

.swg-win-animate {
  animation: swg-pop-in 0.5s ease-out;
}

@keyframes swg-pop-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.swg-win-message {
  font-size: 1.8rem;
  font-weight: 900;
  color: #222;
  margin-bottom: 0.5rem;
}

.swg-redirect-notice {
  font-size: 0.95rem;
  color: #555;
}

/* ---- Confetti ---- */
.swg-confetti {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: swg-confetti-fall linear forwards;
}

@keyframes swg-confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(600px) rotate(720deg);
    opacity: 0;
  }
}

/* ===================================================================
   Landing Page Container
   =================================================================== */

.swg-landing-page {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* ---- Hero Section ---- */
.swg-hero {
  padding: 4rem 2rem;
}

.swg-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.swg-hero-content {
  flex: 1;
}

.swg-hero-heading {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.swg-hero-subheading {
  font-size: 1.25rem;
  opacity: 0.9;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.swg-hero-body {
  font-size: 1.05rem;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.swg-hero-cta {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: background 0.2s, transform 0.1s;
}

.swg-hero-cta:hover {
  background: rgba(255, 255, 255, 0.3);
  color: inherit;
}

.swg-hero-cta:active {
  transform: scale(0.97);
}

.swg-hero-image {
  flex: 0 0 auto;
  max-width: 400px;
}

.swg-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ---- Trust / Stats Bar ---- */
.swg-trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 1.25rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.swg-trust-item {
  padding: 0 2rem;
}

.swg-trust-item + .swg-trust-item {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---- Prize Showcase ---- */
.swg-prize {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.swg-prize-grid {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.swg-prize-image-col {
  flex: 0 0 auto;
  max-width: 360px;
}

.swg-prize-image-col img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.swg-prize-text-col {
  flex: 1;
}

.swg-prize-text-col h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
  color: #222;
}

.swg-prize-text-col p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 1.5rem;
}

.swg-prize-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  border-radius: 12px;
  padding: 1rem 2rem;
  box-shadow: 0 4px 16px rgba(255, 183, 0, 0.3);
}

.swg-prize-badge-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #664d00;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.swg-prize-badge-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #333;
  line-height: 1.1;
}

/* ---- How It Works ---- */
.swg-steps {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.swg-steps > h2 {
  font-size: 2rem;
  color: #222;
  margin: 0 0 2.5rem;
}

.swg-steps-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.swg-step {
  flex: 1;
  max-width: 300px;
  text-align: center;
}

.swg-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #667eea;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.swg-step h3 {
  font-size: 1.15rem;
  color: #222;
  margin: 0 0 0.5rem;
}

.swg-step p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* ---- Game Section ---- */
.swg-game-section {
  padding: 3rem 0;
  scroll-margin-top: 2rem;
}

/* ---- Testimonials ---- */
.swg-testimonials {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.swg-testimonials > h2 {
  font-size: 2rem;
  color: #222;
  margin: 0 0 2.5rem;
}

.swg-testimonials-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.swg-testimonial-card {
  flex: 1;
  max-width: 340px;
  background: #f9f9fb;
  border-radius: 12px;
  padding: 2rem;
  margin: 0;
  text-align: left;
  position: relative;
  border: 1px solid #eee;
}

.swg-testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 3rem;
  color: #ddd;
  line-height: 1;
  font-family: Georgia, serif;
}

.swg-testimonial-quote {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  margin: 0 0 1.25rem;
  padding-top: 1rem;
}

.swg-testimonial-footer {
  display: flex;
  flex-direction: column;
}

.swg-testimonial-name {
  font-style: normal;
  font-weight: 700;
  font-size: 0.95rem;
  color: #222;
}

.swg-testimonial-location {
  font-size: 0.85rem;
  color: #888;
}

/* ---- FAQ ---- */
.swg-faq {
  padding: 4rem 2rem;
  max-width: 750px;
  margin: 0 auto;
}

.swg-faq > h2 {
  font-size: 2rem;
  color: #222;
  text-align: center;
  margin: 0 0 2rem;
}

.swg-faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.swg-faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swg-faq-item summary::-webkit-details-marker {
  display: none;
}

.swg-faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: #999;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.swg-faq-item[open] summary::after {
  content: "\2212";
}

.swg-faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* ---- Footer CTA ---- */
.swg-footer-cta {
  padding: 4rem 2rem;
  text-align: center;
}

.swg-footer-cta h2 {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 1rem;
}

.swg-footer-cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0 0 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.swg-footer-cta-btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: background 0.2s, transform 0.1s;
}

.swg-footer-cta-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: inherit;
}

.swg-footer-cta-btn:active {
  transform: scale(0.97);
}

/* ===================================================================
   Congratulations Page
   =================================================================== */

.swg-congrats-wrapper {
  max-width: 550px;
}

.swg-congrats-image img,
.swg-thankyou-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.swg-congrats-body,
.swg-thankyou-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1.5rem;
}

/* ---- Form ---- */
.swg-form {
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
}

.swg-form-group {
  margin-bottom: 1.25rem;
}

.swg-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #333;
  font-size: 0.95rem;
}

.swg-form-group input[type="text"],
.swg-form-group input[type="email"],
.swg-form-group input[type="tel"],
.swg-form-group input[type="url"],
.swg-form-group select,
.swg-form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.swg-form-group input:focus,
.swg-form-group select:focus,
.swg-form-group textarea:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.swg-form-submit {
  text-align: center;
}

.swg-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.swg-btn:hover {
  opacity: 0.9;
}

.swg-btn:active {
  transform: scale(0.97);
}

.swg-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Form messages ---- */
.swg-form-message {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.95rem;
  text-align: center;
}

.swg-form-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.swg-form-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ---- Extra fields ---- */
.swg-extra-fields {
  margin-bottom: 1rem;
}

.swg-extra-fields label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #333;
  font-size: 0.95rem;
}

.swg-extra-fields input,
.swg-extra-fields select,
.swg-extra-fields textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

/* ===================================================================
   Thank You Page
   =================================================================== */

.swg-thankyou-wrapper {
  max-width: 550px;
}

/* ===================================================================
   Already Played Page
   =================================================================== */

.swg-already-played-wrapper {
  max-width: 550px;
}

.swg-already-played-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.swg-already-played-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1.5rem;
}

/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 768px) {
  /* Hero */
  .swg-hero {
    padding: 3rem 1.5rem;
  }

  .swg-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .swg-hero-heading {
    font-size: 2rem;
  }

  .swg-hero-image {
    max-width: 280px;
  }

  /* Trust bar */
  .swg-trust-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .swg-trust-item + .swg-trust-item {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.5rem;
  }

  /* Prize */
  .swg-prize {
    padding: 2.5rem 1.5rem;
  }

  .swg-prize-grid {
    flex-direction: column;
    text-align: center;
  }

  .swg-prize-image-col {
    max-width: 260px;
    margin: 0 auto;
  }

  /* Steps */
  .swg-steps {
    padding: 2.5rem 1.5rem;
  }

  .swg-steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .swg-step {
    max-width: 100%;
  }

  /* Testimonials */
  .swg-testimonials {
    padding: 2.5rem 1.5rem;
  }

  .swg-testimonials-grid {
    flex-direction: column;
    align-items: center;
  }

  .swg-testimonial-card {
    max-width: 100%;
  }

  /* FAQ */
  .swg-faq {
    padding: 2.5rem 1.5rem;
  }

  /* Footer CTA */
  .swg-footer-cta {
    padding: 3rem 1.5rem;
  }

  .swg-footer-cta h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .swg-wrapper {
    padding: 1rem;
  }

  .swg-heading {
    font-size: 1.5rem;
  }

  .swg-cards-container {
    gap: 1rem;
  }

  .swg-win-message {
    font-size: 1.3rem;
  }
}
