/* ==========================================
   webcore aesthetics, windows, badges & sfx
   ========================================== */

/* ==========================================================================
   1. CRT SCANLINES & PHOSPHOR SHADER
   ========================================================================== */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

body.crt-active .crt-overlay {
  display: block;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.12) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.015),
    rgba(0, 255, 0, 0.008),
    rgba(0, 0, 255, 0.015)
  );
  background-size: 100% 3px, 6px 100%;
  opacity: 0.65;
}

/* Subtle screen vignette */
body.crt-active::after {
  content: " ";
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: radial-gradient(circle at center, transparent 75%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* ==========================================================================
   2. MARQUEE BANNER
   ========================================================================== */
.marquee-container {
  background: var(--purple-deep);
  border: 2px solid var(--purple-primary);
  border-top: none;
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 0;
}

.marquee-content {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--yellow-primary);
  letter-spacing: 1px;
  animation: marquee-scroll 24s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   3. RETRO WINDOW COMPONENT
   ========================================================================== */
.retro-window {
  background: var(--surface-color);
  border: 2px solid var(--purple-primary);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
  position: relative;
  margin-bottom: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.retro-window:hover {
  border-color: var(--yellow-primary);
  box-shadow: 4px 4px 0px var(--purple-glow);
}

.window-header {
  background: linear-gradient(90deg, var(--purple-dark), var(--purple-primary));
  color: var(--yellow-primary);
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  border-bottom: 2px solid var(--purple-dark);
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.window-controls {
  display: flex;
  gap: 4px;
}

.win-btn {
  width: 16px;
  height: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--yellow-primary);
  color: var(--yellow-primary);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.win-btn:hover {
  background: var(--yellow-primary);
  color: #000;
}

.window-body {
  padding: 16px;
}

/* ==========================================================================
   4. HAMBURGER MASCOT CARD & SPEECH BUBBLE
   ========================================================================== */
.mascot-frame {
  text-align: center;
}

.mascot-avatar-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-bottom: 12px;
}

.mascot-avatar {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--yellow-primary);
  background: #000;
  box-shadow: 0 0 16px var(--purple-glow);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  transition: transform 0.2s ease;
}

.mascot-avatar:hover {
  transform: scale(1.03) rotate(-1deg);
  border-color: var(--purple-light);
}

.mascot-wiggle {
  animation: wiggle-anim 0.5s ease;
}

@keyframes wiggle-anim {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.08) rotate(-5deg); }
  50% { transform: scale(1.08) rotate(5deg); }
  75% { transform: scale(1.04) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.mascot-speech-bubble {
  position: relative;
  background: var(--purple-deep);
  border: 2px solid var(--yellow-primary);
  color: var(--yellow-light);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: bold;
  margin: 10px 0 16px 0;
  border-radius: 4px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mascot-speech-bubble::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent var(--yellow-primary) transparent;
}

.mascot-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.quick-specs-list {
  list-style: none;
  margin-top: 14px;
  border-top: 1px dashed var(--purple-primary);
  padding-top: 10px;
  text-align: left;
  font-size: 0.9rem;
}

.quick-specs-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(168, 85, 247, 0.2);
}

.quick-spec-label {
  color: var(--yellow-primary);
  font-weight: bold;
}

.quick-spec-val {
  color: var(--text-main);
}

/* ==========================================================================
   5. ABOUT ME SECTION & TABS
   ========================================================================== */
.about-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--purple-primary);
  margin-bottom: 16px;
}

.about-tab-btn {
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 2px solid var(--purple-primary);
  border-bottom: none;
  padding: 6px 14px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.about-tab-btn:hover {
  color: var(--yellow-primary);
  background: var(--purple-dark);
}

.about-tab-btn.active {
  background: var(--purple-primary);
  color: var(--text-inverse);
  border-color: var(--yellow-primary);
}

.about-tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.about-tab-panel.active {
  display: block;
}

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

.about-lead-text {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.about-lead-text p {
  margin-bottom: 10px;
}

.feature-list {
  list-style: none;
  margin-top: 12px;
}

.feature-list li {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--purple-deep);
  border-left: 3px solid var(--yellow-primary);
  font-size: 0.95rem;
}

.rig-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 500px) {
  .rig-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rig-spec-item {
  background: var(--purple-deep);
  border: 1px solid var(--purple-primary);
  padding: 10px;
}

.rig-spec-title {
  color: var(--yellow-primary);
  font-size: 0.8rem;
  font-family: var(--font-pixel);
  margin-bottom: 4px;
}

/* ==========================================================================
   6. SOCIAL LINKS & CHANNELS
   ========================================================================== */
.socials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .socials-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.social-card {
  background: var(--surface-alt);
  border: 2px solid var(--purple-primary);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.social-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--yellow-primary);
  border-color: var(--yellow-primary) !important;
}

.social-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.social-details {
  flex: 1;
  overflow: hidden;
}

.social-label {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  margin-bottom: 2px;
}

.social-value {
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ==========================================================================
   7. REAL SPOTIFY WINAMP JUKEBOX
   ========================================================================== */
.jukebox-container {
  background: #0d0a14;
  border: 2px solid var(--purple-primary);
  padding: 14px;
  color: var(--text-main);
}

.jukebox-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.jukebox-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 2px;
}

.jukebox-badge.live {
  background: #14532d;
  color: #4ade80;
  border: 1px solid #22c55e;
}

.jukebox-badge.idle {
  background: #2e1065;
  color: var(--yellow-primary);
  border: 1px solid var(--purple-primary);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 1.4s infinite;
}

.idle-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow-primary);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.jukebox-player-layout {
  display: flex;
  gap: 14px;
  align-items: center;
}

.jukebox-art-box {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border: 2px solid var(--yellow-primary);
  background: #000;
  overflow: hidden;
}

.jukebox-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jukebox-track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--yellow-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.track-artist {
  font-size: 0.95rem;
  color: var(--purple-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Animated Equalizer Bars */
.jukebox-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  margin: 10px 0;
}

.eq-bar {
  flex: 1;
  background: var(--purple-primary);
  height: 6px;
  transition: height 0.15s ease;
}

.is-live .eq-bar:nth-child(1) { animation: eq-anim 0.8s infinite ease-in-out; }
.is-live .eq-bar:nth-child(2) { animation: eq-anim 0.5s infinite ease-in-out 0.1s; }
.is-live .eq-bar:nth-child(3) { animation: eq-anim 0.9s infinite ease-in-out 0.2s; }
.is-live .eq-bar:nth-child(4) { animation: eq-anim 0.6s infinite ease-in-out 0.3s; }
.is-live .eq-bar:nth-child(5) { animation: eq-anim 1.1s infinite ease-in-out 0.15s; }
.is-live .eq-bar:nth-child(6) { animation: eq-anim 0.7s infinite ease-in-out 0.25s; }
.is-live .eq-bar:nth-child(7) { animation: eq-anim 0.85s infinite ease-in-out 0.05s; }
.is-live .eq-bar:nth-child(8) { animation: eq-anim 0.65s infinite ease-in-out 0.35s; }

.is-live .eq-bar {
  background: linear-gradient(to top, var(--purple-primary), var(--yellow-primary));
}

@keyframes eq-anim {
  0%, 100% { height: 4px; }
  50% { height: 22px; }
}

/* Playback Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.progress-track {
  flex: 1;
  height: 6px;
  background: #24163b;
  border: 1px solid var(--purple-dark);
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--yellow-primary);
  box-shadow: 0 0 6px var(--yellow-glow);
  transition: width 0.3s linear;
}

.jukebox-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   8. REAL VISITOR COUNTER (MECHANICAL ODOMETER)
   ========================================================================== */
.counter-box {
  background: #000;
  border: 3px inset #3b1d60;
  padding: 16px;
  text-align: center;
  position: relative;
}

.odometer-wrapper {
  display: inline-flex;
  gap: 4px;
  background: #110d1a;
  padding: 8px 12px;
  border: 2px solid var(--yellow-primary);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), 0 0 10px var(--yellow-glow);
  margin: 10px 0;
}

.odometer-drum {
  width: 30px;
  height: 44px;
  overflow: hidden;
  background: linear-gradient(180deg, #1f1f1f 0%, #000000 50%, #1f1f1f 100%);
  border: 1px solid #4c1d95;
  border-radius: 2px;
  position: relative;
}

.odometer-inner {
  display: flex;
  flex-direction: column;
  transition: transform 1.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.odometer-num {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--yellow-primary);
  text-shadow: 0 0 8px var(--yellow-glow);
  user-select: none;
}

.counter-stats-bar {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  font-size: 0.8rem;
  border-top: 1px dashed var(--purple-dark);
  padding-top: 8px;
}

/* ==========================================================================
   WINAMP & VISITOR COUNTER LIGHT MODE OVERRIDES
   ========================================================================== */
body.light-mode .jukebox-container {
  background: #fbf9f4;
  border-color: #7e22ce;
  color: #1e1329;
}

body.light-mode .jukebox-badge.idle {
  background: #ede6d8;
  color: #6b21a8;
  border-color: #a855f7;
}

body.light-mode .jukebox-badge.live {
  background: #dcfce7;
  color: #15803d;
  border-color: #22c55e;
}

body.light-mode .jukebox-art-box {
  background: #ede6d8;
  border-color: #7e22ce;
}

body.light-mode .track-title {
  color: #581c87;
}

body.light-mode .track-artist {
  color: #7e22ce;
}

body.light-mode .track-album {
  color: #8b7ca6;
}

body.light-mode .eq-bar {
  background: #9333ea;
}

body.light-mode .progress-track {
  background: #e9e1d1;
  border: 1px solid #c4b5a0;
}

body.light-mode .progress-bar {
  background: #7e22ce;
  box-shadow: 0 0 4px rgba(126, 34, 206, 0.4);
}

body.light-mode .counter-box {
  background: #fbf9f4;
  border: 3px inset #d1c5b2;
}

body.light-mode .odometer-wrapper {
  background: #ede6d8;
  border-color: #7e22ce;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.08), 0 0 6px rgba(126, 34, 206, 0.2);
}

body.light-mode .odometer-drum {
  background: linear-gradient(180deg, #ffffff 0%, #f4ede1 50%, #e2d7c5 100%);
  border-color: #c4b5a0;
}

body.light-mode .odometer-num {
  color: #581c87;
  text-shadow: none;
}

body.light-mode .counter-stats-bar {
  border-top-color: #d1c5b2;
}

body.light-mode .mascot-avatar {
  background: #f5f0fa;
}

body.light-mode .mascot-speech-bubble {
  color: #581c87;
  border-color: #7e22ce;
  background: #ded2f3;
}

body.light-mode .about-tab-btn {
  background: #ded2f3;
  color: #581c87;
  border-color: #7e22ce;
}

body.light-mode .about-tab-btn:hover {
  background: #7e22ce;
  color: #fef08a;
}

body.light-mode .about-tab-btn.active {
  background: #7e22ce;
  color: #ffffff;
  border-color: #ca8a04;
}

body.light-mode .social-card {
  background: #ded2f3;
  border-color: #7e22ce;
}

body.light-mode .webring-box {
  background: #ded2f3;
  border-color: #7e22ce;
  color: #1e1329;
}

body.light-mode .webring-nav a {
  color: #581c87;
}

body.light-mode .webring-nav a:hover {
  color: #ca8a04;
  border-color: #ca8a04;
}

/* ==========================================================================
   9. 88x31 BADGES & WEBRING
   ========================================================================== */
.badges-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.pixel-badge {
  width: 88px;
  height: 31px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 8px;
  text-align: center;
  padding: 2px;
  text-transform: uppercase;
  border: 1px solid #fff;
  border-top-color: #dfdfdf;
  border-left-color: #dfdfdf;
  border-right-color: #404040;
  border-bottom-color: #404040;
  user-select: none;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.pixel-badge:hover {
  transform: scale(1.05);
}

/* Badge Variations */
.badge-paw {
  background: #581c87;
  color: #facc15;
  border-color: #facc15;
}

.badge-netscape {
  background: #003366;
  color: #ffffff;
}

.badge-html {
  background: #d97706;
  color: #ffffff;
}

.badge-kibble {
  background: #1e1b4b;
  color: #c084fc;
}

.badge-undercon {
  background: repeating-linear-gradient(
    -45deg,
    #facc15,
    #facc15 6px,
    #000000 6px,
    #000000 12px
  );
  color: #ffffff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
  font-weight: bold;
}

.badge-winamp {
  background: #0f172a;
  color: #38bdf8;
  border-color: #38bdf8;
}

/* Webring Box */
.webring-box {
  margin-top: 16px;
  background: var(--purple-deep);
  border: 2px dashed var(--yellow-primary);
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
}

.webring-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
}

/* Footer Section */
.retro-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--purple-primary);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS TWEAKS
   ========================================================================== */
@media (max-width: 600px) {
  .window-body {
    padding: 12px;
  }

  .window-header {
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .marquee-content {
    font-size: 0.58rem;
  }

  .counter-box {
    padding: 12px 8px;
  }

  .odometer-drum {
    width: 26px;
    height: 38px;
  }

  .odometer-num {
    height: 38px;
    font-size: 1.2rem;
  }

  .odometer-wrapper {
    padding: 6px 8px;
    gap: 3px;
  }
}

@media (max-width: 520px) {
  .about-tabs-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    border-bottom: none;
  }

  .about-tab-btn {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.6rem;
    border-bottom: 2px solid var(--purple-primary) !important;
  }

  .about-tab-btn.active {
    border-bottom: 2px solid var(--yellow-primary) !important;
  }
}

@media (max-width: 420px) {
  .jukebox-art-box {
    width: 64px;
    height: 64px;
  }

  .track-title {
    font-size: 1.15rem;
  }

  .track-artist {
    font-size: 0.85rem;
  }

  .track-album {
    font-size: 0.75rem;
  }

  .jukebox-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
