/* ============================================================
   GAY WHEEL - MEME CHAOS CSS
   A high-energy, nostalgic, early-web arcade & retro casino theme
   ============================================================ */

:root {
  --bg-gradient: radial-gradient(circle at 50% 10%, #2b0b4a, #0d0118 70%);
  --rainbow-1: #ff0055;
  --rainbow-2: #ff7700;
  --rainbow-3: #ffea00;
  --rainbow-4: #00ff66;
  --rainbow-5: #00d4ff;
  --rainbow-6: #9b00ff;
  --win-gray: #c0c0c0;
  --win-blue: #000080;
  --font-display: "Impact", "Arial Black", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-retro: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background: var(--bg-gradient);
  color: #ffffff;
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  text-align: center;
  padding-bottom: 40px;
}

/* Background animated stars & sparkles */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 80px, #ffea00, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 40px, #ff0055, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 260px 150px, #00d4ff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 320px 90px, #00ff66, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 350px 350px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* Top Marquee */
.chaos-marquee {
  width: 100%;
  background: #ffea00;
  color: #000000;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 1px;
  padding: 6px 0;
  border-bottom: 3px solid #ff0055;
  font-weight: 900;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.4);
}

.container {
  width: 100%;
  max-width: 720px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
}

/* Header & Secret Trigger */
.site-header {
  margin-top: 10px;
  margin-bottom: 20px;
}

.badge-cluster {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.retro-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.win98-badge {
  background: #c0c0c0;
  color: #000;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #000;
  border-right: 2px solid #000;
}

.hot-badge {
  background: #ff0055;
  color: #fff;
  animation: pulse 1s infinite alternate;
}

.verified-badge {
  background: #00ff66;
  color: #000;
}

@keyframes pulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.2); }
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff0055, #ff7700, #ffea00, #00ff66, #00d4ff, #9b00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(255, 0, 85, 0.4);
  line-height: 1.1;
  user-select: none;
  position: relative;
}

/* The Secret Trigger: Letter 'G' in GAY WHEEL */
.secret-g {
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease;
}

.secret-g:active {
  transform: scale(0.96);
}

/* Plain Search / AI summary text */
.plain-summary {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e2d9f3;
  margin: 10px auto 6px;
  max-width: 600px;
  font-weight: 500;
}

.sub-headline {
  font-size: 0.82rem;
  color: #a797c4;
  font-family: var(--font-retro);
  font-style: italic;
}

/* Wheel Box Container */
.wheel-box {
  background: rgba(20, 5, 38, 0.85);
  border: 4px solid #ffea00;
  border-radius: 24px;
  padding: 24px 16px;
  width: 100%;
  box-shadow: 0 0 35px rgba(255, 234, 0, 0.25), inset 0 0 20px rgba(155, 0, 255, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

/* Tiny invisible secret status feedback for prankster */
.secret-mode-indicator {
  position: absolute;
  top: 8px;
  left: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s ease;
}

.wheel-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 20px;
  width: 100%;
  max-width: 440px;
}

/* Pointer Arrow at Top of Wheel */
.pointer-wrapper {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
}

.wheel-pointer {
  font-size: 2.8rem;
  color: #ffea00;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 10px #ff0055;
  filter: drop-shadow(0 0 6px #ff0055);
  animation: pointerBob 1.2s infinite ease-in-out;
}

@keyframes pointerBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#wheelCanvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 0, 85, 0.5);
  border: 6px solid #ffea00;
  background: #111;
  display: block;
}

/* Buttons & Controls */
.controls-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
}

.spin-button {
  background: linear-gradient(180deg, #ffea00 0%, #ff7700 50%, #ff0055 100%);
  color: #000000;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 900;
  letter-spacing: 1px;
  border: 3px solid #ffffff;
  border-radius: 50px;
  padding: 16px 32px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 0, 85, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  transition: transform 0.1s ease, filter 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.spin-button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 0, 85, 0.8);
}

.spin-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.4);
}

.spin-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.sound-toggle-wrapper {
  display: flex;
  justify-content: center;
}

.sound-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #d1c4e9;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.sound-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Popup Dialog (Windows 98 meets Chaos Casino) */
.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 16px;
}

.result-modal.hidden {
  display: none;
}

.result-dialog {
  background: #c0c0c0;
  color: #000;
  width: 100%;
  max-width: 440px;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 10px 10px 30px rgba(0,0,0,0.8), 0 0 40px rgba(255, 0, 85, 0.4);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: var(--font-body);
}

@keyframes modalPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.dialog-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.close-x {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.dialog-content {
  padding: 20px 16px;
  text-align: center;
}

.verdict-banner {
  font-family: var(--font-display);
  font-size: 3.5rem;
  letter-spacing: 3px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

.verdict-banner.gay-verdict {
  background: linear-gradient(90deg, #ff0055, #ff7700, #ffea00, #00ff66, #00d4ff, #9b00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.verdict-banner.straight-verdict {
  color: #333333;
  filter: drop-shadow(0 2px 2px rgba(255,255,255,0.7));
}

.verdict-emoji {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.verdict-headline {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #111;
}

.verdict-description {
  font-size: 0.92rem;
  line-height: 1.4;
  color: #222;
  margin-bottom: 20px;
  background: #ffffff;
  border: 2px inset #808080;
  padding: 10px;
  border-radius: 2px;
}

.dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
}

.copy-btn {
  background: #00ff66;
  color: #000000;
}

.retry-btn {
  background: #ffea00;
  color: #000000;
}

.toast-notice {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #006600;
  font-weight: bold;
}

.toast-notice.hidden {
  display: none;
}

/* Editorial & Science Window (Window 98 Style) */
.explanation-section {
  width: 100%;
  margin: 20px 0;
  text-align: left;
}

.retro-window {
  background: #c0c0c0;
  color: #000000;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.5);
}

.window-header {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  padding: 4px 8px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.window-body {
  padding: 14px 12px;
  font-size: 0.92rem;
  line-height: 1.4;
  background: #f8f8f8;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.ig-comment {
  font-size: 0.88rem;
  line-height: 1.35;
  color: #1a1a1a;
  padding: 4px 0;
  border-bottom: 1px solid #ebebeb;
}

.ig-comment.reply {
  padding-left: 20px;
  border-left: 2px solid #ccc;
  border-bottom: none;
  margin-top: -4px;
}

.ig-comment.dev-note {
  background: #fff4d1;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e0c870;
  margin-top: 6px;
}

.user-handle {
  font-weight: 700;
  color: #000000;
  margin-right: 6px;
}

.comment-text {
  color: #222222;
}

.disclaimer-text {
  font-size: 0.78rem;
  color: #777;
  border-top: 1px solid #ddd;
  padding-top: 10px;
  margin-top: 12px;
  text-align: center;
}

/* Footer */
.site-footer {
  font-size: 0.72rem;
  color: #887a9e;
  letter-spacing: 0.5px;
  margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .wheel-box {
    padding: 16px 8px;
    border-radius: 16px;
  }

  .spin-button {
    font-size: 1.1rem;
    padding: 14px 20px;
  }

  .main-title {
    font-size: 2.6rem;
  }
}
