/* --- VARIABLES --- */
:root {
  --slime-green: #ccff00;
  --hot-pink: #ff00cc;
  --purple-haze: #6600ff;
  --munchie-yellow: #ffdd00;
  --sky-blue: #00eeff;

  --font-title: "Shrikhand", cursive;
  --font-body: "Quicksand", sans-serif;

  --shadow-hard: 4px 4px 0px #000;
  --border-thick: 3px solid #000;
}

/* --- BASE --- */
html,
body {
  font-family: var(--font-body);
  color: #000;
  overflow-x: hidden;
  min-height: 100vh;
  /* CHANGE: Set this to transparent so we can see the div behind it */
  background-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- PSYCHEDELIC BACKGROUND --- */
.lava-lamp-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    #ff9a9e,
    #fad0c4,
    #fad0c4,
    #a18cd1,
    #fbc2eb,
    #8fd3f4
  );
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  /* CHANGE: Bring it forward slightly, just behind content */
  z-index: -1;
}

.grain-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.4;
  /* CHANGE: Bring grain slightly in front of the color, but behind content */
  z-index: -1;
  pointer-events: none;
}

/* Add this to ensure your actual content sits on top of the background */
.groovy-nav,
.hero-section,
.section,
.footer {
  position: relative;
  z-index: 1;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* --- NAV --- */
.groovy-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-thick);
  padding: 1rem 0;
}
.brand-logo {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--purple-haze) !important;
  transform: rotate(-2deg);
}
.wobble-icon {
  color: var(--slime-green);
  animation: wobble 3s ease-in-out infinite;
  filter: drop-shadow(2px 2px 0 #000);
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

.groovy-link {
  font-weight: 700;
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.groovy-link:hover {
  color: var(--hot-pink) !important;
  transform: scale(1.1) rotate(2deg);
}

.button.is-trippy {
  background: var(--munchie-yellow);
  color: #000;
  font-weight: 900;
  border: var(--border-thick);
  box-shadow: var(--shadow-hard);
  border-radius: 50px;
  transition: 0.2s;
  font-family: var(--font-body);
}
.button.is-trippy:hover {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px #000;
  background: var(--slime-green);
}

/* --- HERO --- */
.hero-section {
  padding: 4rem 1rem;
}

.mega-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  color: #fff;
  text-shadow: 4px 4px 0px #000, -2px -2px 0px var(--hot-pink);
  transform: rotate(-1deg);
  margin-bottom: 2rem;
}
.highlight-text {
  color: var(--munchie-yellow);
  text-decoration: underline wavy var(--sky-blue);
}

.vibe-check {
  display: inline-block;
  background: #fff;
  border: var(--border-thick);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-hard);
  transform: rotate(2deg);
}
.vibe-text {
  font-weight: 700;
  font-size: 1.2rem;
}
.emoji-spinner {
  display: inline-block;
  animation: spin 5s linear infinite;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* --- CONTROLS --- */
.control-blob {
  background: #fff;
  border: var(--border-thick);
  border-radius: 30px;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto 3rem;
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.2);
  position: relative;
}
.fun-label {
  display: block;
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--purple-haze);
}

.input-box {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.bubble-input {
  flex: 1;
  border: 2px solid #000;
  border-radius: 50px;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  background: #f9f9f9;
  outline: none;
}
.bubble-input:focus {
  background: #fff;
  border-color: var(--hot-pink);
}

.search-btn {
  background: var(--sky-blue);
  border: 2px solid #000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 3px 3px 0 #000;
}
.search-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.sticker-btn {
  background: #fff;
  border: 2px solid #000;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 #ccc;
  transition: 0.2s;
  transform: rotate(-1deg);
}
.sticker-btn:nth-child(even) {
  transform: rotate(1deg);
}
.sticker-btn:hover {
  transform: scale(1.1);
  z-index: 2;
  background: var(--munchie-yellow);
}
.sticker-btn.is-selected {
  background: var(--slime-green);
  box-shadow: 3px 3px 0 #000;
  transform: scale(1.05) rotate(0deg);
}

/* --- GRID --- */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

/* --- CARD --- */
.dope-card {
  background: #fff;
  border: var(--border-thick);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: 0.3s;
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dope-card:hover {
  transform: translateY(-10px) rotate(1deg);
  box-shadow: 8px 8px 0px var(--hot-pink);
}

.card-top {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-bottom: var(--border-thick);
}
.card-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}
.dope-card:hover .card-top img {
  transform: scale(1.1) rotate(-2deg);
}

.status-sticker {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border: 2px solid #000;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  transform: rotate(5deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}
.status-sticker.open {
  background: var(--slime-green);
  color: #000;
}
.status-sticker.closed {
  background: #ff4757;
  color: #fff;
}

.card-guts {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.joint-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--purple-haze);
}
.location-tag {
  font-weight: 700;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.tag-cloud {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.fun-tag {
  font-size: 0.75rem;
  background: #eee;
  border: 1px solid #000;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.card-btn-wrapper {
  padding: 1rem;
  background: var(--munchie-yellow);
  border-top: var(--border-thick);
  text-align: center;
}
.check-it-btn {
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  font-size: 1rem;
}

/* --- FOOTER & EXTRAS --- */
.more-vibes-zone {
  text-align: center;
  margin: 4rem 0;
}
.is-puffy {
  background: var(--hot-pink);
  color: #fff;
  border: var(--border-thick);
  font-size: 1.5rem;
  border-radius: 50px;
  padding: 0.5rem 2rem;
  font-family: var(--font-title);
  transition: 0.2s;
  box-shadow: 5px 5px 0 #000;
}
.is-puffy:hover {
  transform: scale(1.1);
  background: var(--purple-haze);
}

.far-out-msg {
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--purple-haze);
  margin-bottom: 1rem;
}
.bummer-msg {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  font-weight: 700;
  margin-top: 2rem;
}
.bummer-emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.trippy-footer {
  background: #000;
  color: #fff;
  padding: 4rem 1.5rem;
  border-top: 5px solid var(--slime-green);
}
.footer-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--slime-green);
}
.footer-subtitle {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--hot-pink);
  margin-bottom: 1rem;
}
.footer-links li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.footer-links a:hover {
  color: var(--munchie-yellow);
}
.peace-out {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--sky-blue);
  margin-bottom: 1rem;
}
.blob-icon {
  background: #fff;
  color: #000;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: 0.2s;
}
.blob-icon:hover {
  background: var(--slime-green);
  transform: rotate(360deg);
}

/* --- LOADER --- */
.trippy-loader {
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.leaf-spinner {
  font-size: 4rem;
  animation: spin 2s infinite linear;
  display: block;
}
.loader-txt {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-top: 1rem;
  color: var(--purple-haze);
}

/* --- DISPENSARY PAGE SPECIFIC STYLES --- */

/* Vibe Check Status Colors */
.is-open-vibe {
  background: var(--slime-green) !important;
  color: #000;
  border-color: #000;
}
.is-closed-vibe {
  background: #ff4757 !important;
  color: #fff;
  border-color: #000;
}

/* Polaroid Image Frame */
.polaroid-frame {
  background: #fff;
  padding: 15px 15px 40px 15px;
  border: var(--border-thick);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
  transition: 0.3s;
}
.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 10px 10px 0px var(--hot-pink);
  z-index: 5;
}
.polaroid-frame img {
  width: 100%;
  height: auto;
  border: 1px solid #000;
  filter: contrast(1.1) saturate(1.1);
}
.polaroid-frame figcaption {
  font-family: var(--font-title);
  text-align: center;
  margin-top: 15px;
  font-size: 1.5rem;
  color: var(--purple-haze);
}

/* Ratings */
.rating-blob {
  background: #f9f9f9;
  border: 2px dashed #000;
  border-radius: 20px;
  padding: 2rem;
  display: inline-block;
}
.stars {
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}
.star {
  color: #ddd;
  text-shadow: 2px 2px 0 #000;
  transition: 0.2s;
}
.star:hover,
.star.active {
  color: var(--munchie-yellow);
  transform: scale(1.2);
}
.help-text {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
}

/* Map Frame */
.map-frame {
  border: var(--border-thick);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  background: #000;
}

/* Hours Table */
.hours-box {
  background: #fff;
  border: var(--border-thick);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 5px 5px 0 var(--sky-blue);
  height: 100%;
}
.trippy-table {
  background: transparent;
  font-weight: 700;
  font-size: 1.1rem;
}
.trippy-table td {
  border-bottom: 2px solid #eee;
  padding: 0.8rem 0;
}
.trippy-table tr:hover {
  background: #f0fff0; /* Light green hover */
  color: var(--purple-haze);
}
.fun-divider {
  background-color: #000;
  height: 3px;
  border: none;
  margin: 3rem 0;
  opacity: 0.1;
}
/* --- ARTICLE / LEGALITY PAGE STYLES --- */

/* Typography for long-form text */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--purple-haze);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  transform: rotate(-0.5deg);
}

.article-subtitle {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: #000;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-text {
  margin-bottom: 1rem;
  color: #333;
}

.article-text strong {
  color: var(--hot-pink);
  font-weight: 800;
}

/* The "Bummer Alert" (Warning Box) */
.bummer-alert {
  background: var(--munchie-yellow);
  border: var(--border-thick);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 8px 8px 0px #000;
  position: relative;
  overflow: hidden;
}

/* Striped pattern for the warning box */
.bummer-alert::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 10px,
    var(--munchie-yellow) 10px,
    var(--munchie-yellow) 20px
  );
}
.bummer-alert::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 10px,
    var(--munchie-yellow) 10px,
    var(--munchie-yellow) 20px
  );
}

/* Responsive Table Fixes */
.table-container {
  overflow-x: auto;
  border-radius: 10px;
}

/* Dynamic Word Animation */
.highlight-text {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  /* Ensure the text has the groovy underline */
  color: var(--munchie-yellow);
  text-decoration: underline wavy var(--sky-blue);
  /* Fixes jitter if words are vastly different lengths */
  min-width: 150px;
}

/* The state when the text is swapping out */
.highlight-text.changing {
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  filter: blur(4px); /* The "Stoned Vision" effect */
}
