:root {
  --c-terracotta: #d97757;
  --c-sky: #5fa8d3;
  --c-sand: #fdf6e3;
  --c-ocean: #0e4361;
  --c-ocean-light: rgba(14, 67, 97, 0.7);
  --c-white: #ffffff;
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --font-hand: 'Caveat', cursive;
  
  --shadow-sm: 0 2px 8px rgba(14, 67, 97, 0.05);
  --shadow-md: 0 8px 24px rgba(14, 67, 97, 0.08);
  --shadow-lg: 0 20px 40px rgba(14, 67, 97, 0.12);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--c-sand);
  color: var(--c-ocean);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-xl { margin-top: 3rem; }
.fw-500 { font-weight: 500; }
.pre-line { white-space: pre-line; }

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 900px) {
  .layout {
    flex-direction: row;
  }
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--c-ocean);
  color: var(--c-sand);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.hero-bg-accent {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at top right, rgba(95, 168, 211, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.brand {
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 3rem;
  color: var(--c-sky);
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-bottom: 2rem;
}

.hand-drawn-badge {
  font-family: var(--font-hand);
  font-size: 2.5rem;
  color: var(--c-terracotta);
  transform: rotate(-5deg);
  display: inline-block;
  margin-bottom: -10px;
  position: relative;
  z-index: 2;
}

.hand-drawn-badge.small {
  font-size: 2rem;
  margin-bottom: 0;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(253, 246, 227, 0.8);
  max-width: 400px;
}

.hero-image-wrapper {
  margin-top: auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 15px rgba(253, 246, 227, 0.05), 0 20px 40px rgba(0,0,0,0.3);
  width: 280px;
  height: 280px;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero {
    flex: 0 0 45%;
    max-width: 500px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 4rem 3rem;
  }
  .hero h1 {
    font-size: 4rem;
  }
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 900px) {
  .main-content {
    padding: 4rem;
    align-items: center;
    justify-content: center;
  }
}

/* Views */
.view {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease forwards;
}

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

/* Postcard Wrapper */
.postcard-wrapper {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  text-align: center;
}

.stamp-accent {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border: 2px dashed var(--c-sky);
  border-radius: 50%;
  opacity: 0.2;
  pointer-events: none;
}

.postcard-wrapper h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--c-ocean);
}

.intro-p, .lead-p {
  font-size: 1.1rem;
  color: var(--c-ocean-light);
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-block;
  background: rgba(217, 119, 87, 0.1);
  color: var(--c-terracotta);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--c-terracotta);
  color: var(--c-white);
  border: none;
  padding: 1.2rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background-color: #c06548;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(217, 119, 87, 0.3);
}

.btn-secondary {
  background-color: rgba(95, 168, 211, 0.1);
  color: var(--c-sky);
  border: none;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: rgba(95, 168, 211, 0.2);
}

.btn-text-only {
  background: none;
  border: none;
  color: var(--c-ocean-light);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s;
}

.btn-text-only:hover {
  color: var(--c-terracotta);
  text-decoration-color: var(--c-terracotta);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Quiz UI */
.quiz-header {
  margin-bottom: 2rem;
}

.progress-bar {
  height: 6px;
  background: rgba(14, 67, 97, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.progress-fill {
  height: 100%;
  background: var(--c-sky);
  width: 0%;
  transition: width 0.4s ease;
}

.question-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-sky);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.question-text {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .answers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.answer-card {
  background: var(--c-white);
  border: 2px solid rgba(14, 67, 97, 0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-ocean);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.answer-card::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border: 1.5px dashed rgba(95, 168, 211, 0.3);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.answer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(217, 119, 87, 0.3);
}

.answer-card:hover::before {
  opacity: 1;
}

.answer-card.selected {
  background: var(--c-terracotta);
  color: var(--c-white);
  border-color: var(--c-terracotta);
  transform: scale(0.98);
}

/* Forms */
.input-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--c-ocean);
}

.input-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid rgba(14, 67, 97, 0.2);
  border-radius: var(--radius-sm);
  background: #faf9f6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--c-sky);
  box-shadow: 0 0 0 3px rgba(95, 168, 211, 0.15);
}

.error-msg {
  color: #e53e3e;
  font-size: 0.9rem;
  margin-top: 1rem;
  background: #fff5f5;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Result View */
.result-header {
  text-align: center;
  margin-bottom: 3rem;
}

.result-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin: 0.5rem 0 1rem;
  color: var(--c-ocean);
}

.result-desc {
  font-size: 1.2rem;
  color: var(--c-ocean-light);
  max-width: 500px;
  margin: 0 auto;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--c-sky);
}

.detail-card:nth-child(2)::before { background: var(--c-terracotta); }
.detail-card:nth-child(3)::before { background: var(--c-ocean); }

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.detail-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--c-ocean);
}

.detail-card p {
  color: var(--c-ocean-light);
}

/* Share Panel */
.share-panel {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid rgba(217, 119, 87, 0.2);
}

.share-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.share-panel p {
  font-size: 0.95rem;
  color: var(--c-ocean-light);
  margin-bottom: 1.5rem;
}

.share-flex {
  display: flex;
  gap: 0.5rem;
}

.share-flex input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(14, 67, 97, 0.2);
  border-radius: var(--radius-sm);
  background: #faf9f6;
  font-family: monospace;
  font-size: 0.9rem;
}

/* SDK Powered By */
#wbx-powered-by-slot {
  margin-top: 3rem;
  padding-bottom: 2rem;
  width: 100%;
}
