/* Base Reset & Typography */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: 'Segoe UI', sans-serif;
  color: white;
  background-color: #0e0b1f;
  line-height: 1.6;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

a {
  color: #a388ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Background Video Fix */
.video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.4;
}

/* Overlay Hero */
.overlay {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  animation: fadeIn 1.5s ease-out;
}
.overlay h1 {
  font-size: 3rem;
  margin: 0;
  line-height: 1.2;
}
.overlay p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 1rem 0 2rem;
}

/* Call-to-Action Button */
.cta-button {
  background-color: #fc4c02;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.cta-button:hover {
  background-color: #FFA500;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(14,11,31,0.8);
  backdrop-filter: blur(10px);
  padding: 1rem;
  display: flex;
  align-items: center;
  z-index: 10;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  margin: 0 auto;
}
.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #fff;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s;
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(14,11,31,0.95);
    padding: 1rem;
  }
  .nav-links.show {
    display: flex;
  }
  .hamburger {
    display: flex;
    margin-left: auto;
  }
}

/* Sections Reveal */
.content section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.content section.reveal {
  opacity: 1;
  transform: translateY(0);
}
section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Tile Grid & Cards */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.tile {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 1.5rem;
  min-height: 180px;
  text-align: left;
  transition: transform 0.3s, background 0.3s;
}
.tile:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.25);
}
.tile i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: #a388ff;
}
.tile h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
  color: #fff;
}
.tile p {
  margin: 0.5rem 0 0;
  color: #ddd;
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: #aaa;
  font-size: 0.9rem;
  background: rgba(14,11,31,0.6);
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
}
footer a {
  color: #a388ff;
  margin: 0 0.25rem;
}
footer a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.modal.hidden {
  display: none;
}
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.auth-box {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
.auth-tabs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.auth-tabs button {
  flex: 1;
  padding: 0.5rem;
  cursor: pointer;
  background: #eee;
  border: none;
}
.auth-tabs .active {
  background: #ddd;
  font-weight: bold;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-form input,
.auth-form button {
  padding: 0.5rem;
  font-size: 1rem;
}
/* Utility hidden class for forms & modal */
.hidden {
  display: none !important;
}

/* Push the login link to the right on desktop, top on mobile */
.nav-links a.login-link {
  margin-left: auto;
}
@media (max-width: 768px) {
  .nav-links a.login-link {
    order: -1;
    margin-left: 0;
  }
}
/* Inline error messages */
.error-message {
  color: #f87171;    /* soft red */
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* Forgot-password link style */
.forgot-password {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: right;
  color: #a388ff;
  cursor: pointer;
}
.forgot-password:hover {
  text-decoration: underline;
}
#message {
  max-width: 600px;
  margin: 5rem auto;
  padding: 2rem;
  background: rgba(14,11,31,0.8);
  border-radius: 10px;
  text-align: center;
  font-size: 1.25rem;
}
.verification-header {
  background: rgba(14,11,31,0.8);
  padding: 1rem;
  text-align: center;
}
.verification-header .logo {
  font-size: 1.5rem;
  color: #a388ff;
  text-decoration: none;
}

.verification-message {
  max-width: 600px;
  margin: 5rem auto;
  padding: 2rem;
  background: rgba(14,11,31,0.8);
  border-radius: 10px;
  text-align: center;
  font-size: 1.25rem;
  color: #fff;
}
/* Dashboard styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14,11,31,0.8);
  padding: 1rem;
}
.dashboard-header .logo {
  color: #a388ff;
  font-size: 1.5rem;
  text-decoration: none;
}
.dashboard-header .dashboard-logo {
  height: 50px;
  width: auto;
  max-height: none;
}
.dashboard-header button {
  background: transparent;
  border: 1px solid #a388ff;
  color: #a388ff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}
.dashboard-main {
  max-width: 600px;
  margin: 4rem auto;
  padding: 2rem;
  background: rgba(14,11,31,0.8);
  border-radius: 10px;
  text-align: center;
  color: #fff;
}
/* Dashboard Settings */
.settings-panel {
  margin-top: 2rem;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(14,11,31,0.6);
  padding: 1.5rem;
  border-radius: 8px;
}
.settings-panel .form-group {
  margin-bottom: 1rem;

}

.checkbox-list label {
  display: inline-block;
  margin-right: 1rem;
  font-size: 0.9rem;
  color: #eee;
}
/* Make dropdowns & search input visible */
.settings-panel select,
.settings-panel input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  margin: 0.25rem 0 1rem;
  background: rgba(14,11,31,0.8);
  border: 1px solid #a388ff;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
}

/* Theme UI containers */
.theme-ui {
  margin-bottom: 1.5rem;
}

/* Pills container for selected items and options */
.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #1a1a2e;
  border: 2px solid #6e57ff;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}

/* Individual option pill */
.checkbox-list .option {
  padding: 0.4rem 0.75rem;
  background: #2a2a3e;
  border: 1px solid #555;
  border-radius: 4px;
  color: #ccc;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
}

/* Selected pill state */
.checkbox-list .option.selected {
  background: #6e57ff;
  border-color: #a388ff;
  color: #fff;
  font-weight: 600;
  position: relative;
}

/* Checkmark for selected pill */
.checkbox-list .option.selected::before {
  content: none;
}

/* Add an “×” remove button inside each pill */
.checkbox-list .option {
  position: relative; /* ensure absolute child positions properly */
  padding-right: 1.5rem; /* room for the × */
}
/* Remove button inside each pill */
.checkbox-list .option .remove {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  cursor: pointer;
  color: #fff;
}

/* Selected items area styling */
#selected-items {
  min-height: 2.5rem;
  margin-bottom: 1rem;
}
#plan {
  font-weight: bold;
  color: #a388ff;
}

.potion-bar {
  display: inline-flex;       /* stay on the same line as the text */
  align-items: baseline;        /* align to text baseline*/
  gap: 0.5rem;                /* tighten bottles together */
  margin-left: 0.5rem;        /* small separation from the label */
}

.potion {
  width: 32px;                /* size */
  height: auto;
  transform: translateY(0.1em) /* shift down about 10% of font-height */ 
             scale(1.1);         
  vertical-align: middle;
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* 1) Generic “content box” for each Lorebook entry */
.content-box {
  max-width: 800px;
  margin: 60px auto;
  padding: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  position: relative;
  color: white;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.content-box.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* 2 first .content-box inside #lorebook to get extra top-margin: */
#lorebook .content-box:first-of-type {
  margin-top: 20px;
}

/* 3) “Meet the Architect” box needs extra top-padding so image can overlap */
.architect-box {
  /* Inherits everything from .content-box, plus: */
  padding-top: 80px;   /* leave room for Veilstride image (adjust as needed) */
}

/* 4) Veilstride image, positioned above/overlapping the top edge of the architect box */
.architect-img {
  position: absolute;
  top: 0;                   /* flush with the top of .architect-box */
  left: 50%;
  transform: translate(-50%, -50%); /* pull image upward by half its own height */
  max-width: 140px;         /* adjust size to taste */
  border-radius: 0;       /* optional: set for mask/crop */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  background: #fff;         /* optional white background around the masked image */
  padding: 1px;             /* optional stroke‐like padding */
  z-index: 5;               /* ensure it floats above the box */
}

/* 5) Reduce vertical margin if user scrolls too far (optional) */
.content-box + .content-box {
  margin-top: 80px;
}

/*   “Powered by Strava” sits at the bottom of page content  */
 .powered-by-strava {
   display: block;
   margin: 40px auto 0;     /* 40px top margin (adjust as desired), horizontally centered */
   max-width: 180px;        /* same width you prefer */
   /* no position: fixed;   ← remove any fixed/absolute rules */
 }

 .history-hero {
  text-align: center;
  color: white;
  margin: 140px auto 60px; 
  max-width: 800px;
  z-index: 1;
  position: relative;
}
.history-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.history-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}
/* Contact Modal close button */
.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  background: none;
  border: none;
}

.close-button:hover {
  color: #fff;
}

/* ── Contact Modal Pop-Out ── */
#contact-modal .auth-box {
  position: relative;           /* positioning context for close button */
  max-width: 400px;
  margin: auto;                 /* center within backdrop */
  background: rgba(14, 11, 31, 0.95);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
}

/* ── Close “×” Button ── */
#contact-modal .auth-box .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  z-index: 10;
}
#contact-modal .auth-box .close-button:hover {
  color: #fff;
}

/* ── Inputs & Textarea ── */
#contact-modal .auth-box input,
#contact-modal .auth-box textarea {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #a388ff;
  color: #fff;
  border-radius: 6px;
}

/* ── Submit Button ── */
#contact-modal .auth-box button[type="submit"] {
  background-color: #fc4c02;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#contact-modal .auth-box button[type="submit"]:hover {
  background-color: #ff7a00;
}

.hero-logo {
  max-width: 360px;
  width: 80%;
  height: auto;
  margin-bottom: 1.5rem;
  animation: fadeIn 1.5s ease-out;
}

#faq-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #a388ff;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 999;
  cursor: pointer;
  transition: background 0.3s;
}
#faq-button:hover {
  background: #8a6dfc;
}

#faq-modal .auth-box {
  max-width: 960px;      
  height: 90vh;           
  overflow: hidden;
  background: rgba(14,11,31,0.95);
  padding: 2rem;
  border-radius: 10px;
  width: 95%;
}

#faq-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}
/* Container: unify width so both states line up */
.strava-status-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  width: 200px;      /* adjust as needed */
}

/* Button: pure image hit-area */
.strava-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
  cursor: pointer;
}
.strava-btn.connected {
  cursor: default;   /* no pointer for the “connected” state */
}

/* Image: fill the container width exactly */
.strava-btn-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Label base styling */
.strava-btn-label {
  font-weight: bold;
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
  margin: 0;
}

/* Two modifier classes for color */
.label-connected {
  color: #6ee7b7;    /* green */
}
.label-disconnected {
  color: #fc4c02;    /* orange */
}