@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Outfit:wght@100..900&display=swap');

:root {
  --primary: #6c5ce7;
  --primary-rgb: 108, 92, 231;
  --primary-light: #f3f0ff;
  --primary-dark: #5243c2;
  --accent: #fdcb6e;
  --accent-orange: #ff7675;
  --secondary: #00b894;
  --bg-gradient: linear-gradient(135deg, #fff9f5 0%, #f1e9ff 100%);
  --text-main: #2d3436;
  --text-light: #636e72;
  --card-shadow: 0 15px 35px rgba(108, 92, 231, 0.12);
  --btn-shadow: 0 8px 25px rgba(253, 203, 110, 0.3);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Wavy background decoration */
.bg-decor {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-decor .shape {
  position: absolute;
  opacity: 0.15;
  filter: blur(40px);
  border-radius: 50%;
}

.bg-decor .shape-1 {
  background: var(--accent);
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.bg-decor .shape-2 {
  background: var(--primary);
  width: 500px;
  height: 500px;
  top: 60%;
  left: -200px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.2rem;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 3rem;
}

h2 span {
  color: var(--primary);
}

p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

/* Header */
header {
  padding: 24px 0;
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
  background: var(--accent);
  color: #2d3436;
  box-shadow: var(--btn-shadow);
  animation: pulse-btn 2.5s infinite;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(253, 203, 110, 0.5);
  background: #f1be5c;
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.price-box {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 2rem 0;
}

.price-old {
  font-size: 1.4rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.price-new {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-orange);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-subtext {
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-wrapper {
  position: relative;
  max-width: 420px;
  animation: float 6s ease-in-out infinite;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  border: 8px solid #fff;
}

/* Floating elements in Hero */
.floating-badge {
  position: absolute;
  background: #fff;
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
}

.fb-1 {
  top: 10%;
  left: -40px;
  transform: rotate(-8deg);
}

.fb-2 {
  bottom: 15%;
  right: -30px;
  transform: rotate(6deg);
}

/* Features Section */
.features {
  background: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--bg-gradient);
  padding: 40px 30px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(108, 92, 231, 0.05);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 20px auto;
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.08);
}

.feature-card h3 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 15px;
}

.feature-card p {
  font-size: 0.95rem;
}

/* Content Breakdown Section (Book sections) */
.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.content-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
}

.content-number {
  background: var(--primary);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.content-details h3 {
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-size: 1.25rem;
}

.content-details span {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: 12px;
}

.content-details p {
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Previews (Gallery) */
.gallery {
  background: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  cursor: pointer;
  background: #fff;
  border: 6px solid #fff;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: var(--card-shadow);
  border-color: var(--primary-light);
}

.gallery-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(108, 92, 231, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  text-align: center;
  color: #fff;
  padding: 20px;
}

.gallery-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.gallery-info span {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
}

/* FAQ Section */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.02);
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.05);
}

.faq-question {
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary-dark);
  font-weight: 600;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #faf8ff;
}

.faq-answer p {
  padding: 20px 25px;
  font-size: 1rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 60px 0 30px 0;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
}

footer .logo {
  color: #fff;
}

footer .logo-icon {
  background: #fff;
  color: var(--primary-dark);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: #b5afff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.85rem;
  color: #8b80e8;
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  width: 100%;
  padding-top: 20px;
}

/* Modal Windows Base */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 52, 54, 0.4);
  backdrop-filter: blur(8px);
}

.modal-wrapper {
  position: relative;
  background: #fff;
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  z-index: 101;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-wrapper {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-light);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-orange);
  color: #fff;
}

/* Image preview modal override */
.modal-preview-img {
  width: 100%;
  display: block;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-preview-content {
  padding: 30px;
}

/* Checkout Modal Styles */
.checkout-header {
  background: var(--primary);
  color: #fff;
  padding: 30px;
  text-align: center;
}

.checkout-header h3 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.checkout-body {
  padding: 30px;
}

/* Checkout steps */
.checkout-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  position: relative;
}

.checkout-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-light);
  z-index: 1;
  transform: translateY(-50%);
}

.step-indicator {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step-indicator.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
}

.step-indicator.completed {
  background: var(--secondary);
  color: #fff;
}

/* Form inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--primary-light);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Checkout panels */
.checkout-panel {
  display: none;
}

.checkout-panel.active {
  display: block;
}

/* Card details subform */
.card-wrapper-mock {
  background: linear-gradient(135deg, #74b9ff, #0984e3);
  padding: 20px;
  border-radius: var(--border-radius-md);
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(9, 132, 227, 0.2);
}

.card-wrapper-mock::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: -50px;
  right: -50px;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: #ffeaa7;
  border-radius: 6px;
  margin-bottom: 25px;
}

.card-number-mock {
  font-family: monospace;
  font-size: 1.4rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.card-bottom-mock {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* Processing animation */
.loader-wrapper {
  text-align: center;
  padding: 40px 0;
}

.loader {
  border: 6px solid var(--primary-light);
  border-top: 6px solid var(--primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

/* Success panel */
.success-panel {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  margin: 0 auto 20px auto;
  box-shadow: 0 10px 25px rgba(0, 184, 148, 0.3);
}

.success-panel h4 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.success-panel p {
  margin-bottom: 25px;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-btn {
  0% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(253, 203, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsiveness */
@media (max-width: 992px) {
  h1 { font-size: 2.5rem; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .price-box {
    justify-content: center;
  }
  .fb-1 { left: 0; }
  .fb-2 { right: 0; }
}

@media (max-width: 576px) {
  section { padding: 60px 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  .hero { padding-top: 120px; }
  .price-new { font-size: 2rem; }
  .content-card {
    flex-direction: column;
    text-align: center;
  }
  .checkout-steps {
    padding: 0 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
