:root {
  --primary-teal: #006666;
  --dark-teal: #004d4d;
  --accent-orange: #e0793a;
  --bg-color: #fdfbf7;
  --card-bg: #ffffff;
  --text-color: #333333;
  --light-gray: #e0e0e0;
  --font-family-sans: "Outfit", sans-serif;
  --font-family-serif: "Georgia", serif;
}

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

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background-color: white;
  padding: 0.8rem 2rem;
  position: relative;
  border-bottom: none;
}

.header-container {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-family-serif);
  text-decoration: none;
}

.logo img {
  height: 50px;
  width: auto;
}

.desktop-nav a {
  text-decoration: none;
  color: #666;
  margin-left: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.desktop-nav a.active {
  color: var(--accent-orange);
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-teal);
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: white;
  z-index: 999;
  padding: 0;
  border-top: 1px solid #f0f0f0;
  display: block;
}

.mobile-menu.hidden {
  display: none !important;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
}

.mobile-nav-links a {
  text-decoration: none;
  color: #444;
  font-size: 1.1rem;
  font-weight: 600;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-left: 17px;
  border-bottom: 1px solid #eee;
  display: block;
  font-family: inherit;
  transition: all 0.2s;
}

.mobile-nav-links a:hover {
  background-color: #f9f9f9;
  color: var(--primary-teal);
}

.mobile-nav-links a.active {
  color: var(--accent-orange);
  background-color: transparent;
}

.mobile-nav-links a:last-child {
  border-bottom: none;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-family-serif);
  color: var(--text-color);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.progress-indicator {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
}

/* Question Cards */
.card-container {
  background-color: var(--card-bg);
  width: 100%;
  max-width: 550px;
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  text-align: center;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.question-card-icon {
  width: 80px;
  height: auto;
  margin: 0 auto 1.5rem auto;
  display: block;
}

/* Answer Choices */
#answer-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.choice-btn {
  background-color: white;
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  padding: 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
}

.choice-btn:hover {
  border-color: var(--primary-teal);
  background-color: #f0f7f7;
}

.choice-btn.selected {
  border: 2px solid var(--primary-teal);
  background-color: #e6f0f0;
  font-weight: 600;
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary {
  background-color: var(--primary-teal);
  color: white;
  padding: 0.8rem 2.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  min-width: 120px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-text {
  background: none;
  border: none;
  color: #666;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

/* Results Section */
#results-section {
  width: 100%;
  max-width: 700px;
  text-align: center;
}

.badge-capsule {
  display: inline-block;
  background-color: var(--primary-teal);
  color: white;
  padding: 0.5rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.result-hero-icon {
  width: 120px;
  height: auto;
  margin: 0 auto 2rem auto;
  display: block;
}

.insight-text {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: #444;
}

.sleep-quote {
  font-family: var(--font-family-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--primary-teal);
  margin: 2rem 0;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.btn-share {
  background-color: var(--primary-teal);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-restart {
  background-color: white;
  border: 1px solid #ccc;
  color: #333;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* Ad Container Rule 12 */
.ad-container {
  width: 100%;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0;
  overflow: hidden;
}

/* Share Modal */
.modal {
  display: flex;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background-color: white;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: black;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  border: 1px solid #eee;
}

.social-icon:hover {
  background-color: #f9f9f9;
  transform: translateY(-2px);
}

.social-icon i,
.social-img-icon {
  font-size: 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: 0.5rem;
  object-fit: contain;
}

.social-icon span {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Social Network Colors */
.social-icon.facebook i { color: #1877F2; }
.social-icon.threads i { color: #000000; }
.social-icon.reddit i { color: #FF4500; }
.social-icon.linkedin i { color: #0A66C2; }
.social-icon.twitter i { color: #000000; }
.social-icon.bluesky i { color: #0085FF; }

.social-icon:hover {
  opacity: 0.8;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Footer */
footer {
  background-color: var(--primary-teal);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: white;
  margin-top: auto;
}

footer p {
  color: white;
  margin: 0;
  opacity: 0.9;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .card-container {
    padding: 2rem 1.5rem;
    border-radius: 0;
    box-shadow: none;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .desktop-nav {
    display: none;
  }

  .result-actions {
    flex-direction: column;
  }
}

.hidden {
  display: none !important;
}

.spinner-small {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

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

/* Personalization Step Icons */
.step-icon-img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.text-input-container {
  margin: 2rem 0;
}

.text-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  outline: none;
  text-align: center;
}

.text-input:focus {
  border-color: var(--primary-teal);
}
