/* Windows 95 Web Aesthetic */

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

:root {
  --win95-blue: #000080;
  --win95-gray: #c0c0c0;
  --win95-gray-dark: #808080;
  --win95-white: #ffffff;
  --win95-black: #000000;
  --win95-cyan: #008080;
  --link-blue: #0000ff;
  --link-visited: #800080;
}

@font-face {
  font-family: 'MS Sans Serif';
  src: local('MS Sans Serif'), local('Tahoma'), local('Arial');
}

body, html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
  font-size: 12px;
}

/* Clouds Background - Classic 90s Web */
.netscape-body {
  background: #87CEEB;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Cdefs%3E%3CradialGradient id='cloud' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='white' stop-opacity='0.9'/%3E%3Cstop offset='70%25' stop-color='white' stop-opacity='0.6'/%3E%3Cstop offset='100%25' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='%2387CEEB' width='400' height='300'/%3E%3Cellipse cx='80' cy='100' rx='60' ry='35' fill='url(%23cloud)'/%3E%3Cellipse cx='140' cy='90' rx='50' ry='30' fill='url(%23cloud)'/%3E%3Cellipse cx='110' cy='110' rx='55' ry='32' fill='url(%23cloud)'/%3E%3Cellipse cx='300' cy='180' rx='70' ry='40' fill='url(%23cloud)'/%3E%3Cellipse cx='360' cy='170' rx='55' ry='35' fill='url(%23cloud)'/%3E%3Cellipse cx='330' cy='195' rx='60' ry='35' fill='url(%23cloud)'/%3E%3Cellipse cx='200' cy='250' rx='45' ry='28' fill='url(%23cloud)'/%3E%3Cellipse cx='250' cy='240' rx='50' ry='30' fill='url(%23cloud)'/%3E%3C/svg%3E");
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 3s ease, background-image 3s ease;
}

/* Dark clouds when bajo station is playing */
.netscape-body.dark-clouds {
  background: #2C3E50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Cdefs%3E%3CradialGradient id='darkcloud' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23333' stop-opacity='0.9'/%3E%3Cstop offset='70%25' stop-color='%23333' stop-opacity='0.6'/%3E%3Cstop offset='100%25' stop-color='%23333' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='%232C3E50' width='400' height='300'/%3E%3Cellipse cx='80' cy='100' rx='60' ry='35' fill='url(%23darkcloud)'/%3E%3Cellipse cx='140' cy='90' rx='50' ry='30' fill='url(%23darkcloud)'/%3E%3Cellipse cx='110' cy='110' rx='55' ry='32' fill='url(%23darkcloud)'/%3E%3Cellipse cx='300' cy='180' rx='70' ry='40' fill='url(%23darkcloud)'/%3E%3Cellipse cx='360' cy='170' rx='55' ry='35' fill='url(%23darkcloud)'/%3E%3Cellipse cx='330' cy='195' rx='60' ry='35' fill='url(%23darkcloud)'/%3E%3Cellipse cx='200' cy='250' rx='45' ry='28' fill='url(%23darkcloud)'/%3E%3Cellipse cx='250' cy='240' rx='50' ry='30' fill='url(%23darkcloud)'/%3E%3C/svg%3E");
  transition: background 3s ease, background-image 3s ease;
}

/* Dark mode for all elements when bajo station is playing */
.netscape-body.dark-clouds .netscape-window {
  background: #1a1a1a;
  border-color: #333 #000 #000 #333;
  transition: background 3s ease, border-color 3s ease;
}

.netscape-body.dark-clouds .netscape-titlebar {
  background: linear-gradient(90deg, #000000, #1a1a1a);
  color: #888;
  transition: background 3s ease, color 3s ease;
}

.netscape-body.dark-clouds .netscape-content {
  background: #1a1a1a;
  transition: background 3s ease;
}

.netscape-body.dark-clouds .scroll-container {
  background: #1a1a1a;
  transition: background 3s ease;
}

.netscape-body.dark-clouds .netscape-title-text {
  color: #666;
  transition: color 3s ease;
}

.netscape-body.dark-clouds .welcome-marquee {
  color: #666;
  transition: color 3s ease;
}

.netscape-body.dark-clouds .nav-links a {
  color: #666;
  transition: color 3s ease;
}

.netscape-body.dark-clouds .netscape-card-footer {
  color: #666;
  transition: color 3s ease;
}

.netscape-body.dark-clouds .netscape-card-image {
  background: #2a2a2a;
  border-color: #444 #111 #111 #444;
  transition: background 3s ease, border-color 3s ease;
}

.netscape-body.dark-clouds .netscape-station-card:hover {
  background: rgba(100, 100, 100, 0.2);
  transition: background 3s ease;
}

.netscape-body.dark-clouds .netscape-station-card.active,
.netscape-body.dark-clouds .netscape-station-card.playing {
  background: rgba(100, 100, 100, 0.3);
  transition: background 3s ease;
}

.netscape-body.dark-clouds .footer-text {
  color: #555;
  border-color: #333;
  transition: color 3s ease, border-color 3s ease;
}

.netscape-body.dark-clouds .visitor-counter {
  color: #666;
  transition: color 3s ease;
}

.netscape-body.dark-clouds .netscape-window-btn {
  background: #2a2a2a;
  border-color: #444 #111 #111 #444;
  color: #888;
  transition: background 3s ease, border-color 3s ease, color 3s ease;
}

.netscape-body.dark-clouds .netscape-icon {
  background: #2a2a2a;
  color: #888;
  transition: background 3s ease, color 3s ease;
}

/* Keep silence toggle button bright */
.netscape-body.dark-clouds .silence-toggle-btn {
  background: var(--win95-gray) !important;
  border-color: #dfdfdf #808080 #808080 #dfdfdf !important;
  color: var(--win95-black) !important;
  box-shadow: 1px 1px 0 #000 !important;
  transition: none !important;
}

.netscape-body.dark-clouds .silence-toggle-btn:hover {
  background: #e0e0e0 !important;
}

.netscape-body.dark-clouds .silence-toggle-btn.muted {
  background: #ffcccc !important;
}

/* Main Window - Windows 95 Style */
.netscape-window {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  box-shadow: 1px 1px 0 #000;
  max-width: 700px;
  width: 100%;
  margin: 20px auto;
}

/* Title Bar */
.netscape-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: white;
  padding: 3px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 12px;
}

.netscape-titlebar-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.netscape-icon {
  width: 16px;
  height: 16px;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000;
}

.netscape-titlebar-right {
  display: flex;
  gap: 2px;
}

.netscape-window-btn {
  width: 16px;
  height: 14px;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.netscape-window-btn:active {
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

/* Hide menu/toolbar/location - use simpler layout */
.netscape-menubar,
.netscape-toolbar,
.netscape-locationbar,
.netscape-nav-buttons {
  display: none;
}

/* Content Area */
.netscape-content {
  background: var(--win95-gray);
  padding: 10px;
}

.scroll-container {
  background: var(--win95-gray);
  max-height: none;
  overflow: visible;
}

.netscape-main {
  text-align: center;
}

/* Title Text */
.netscape-title-text {
  font-size: 28px;
  font-weight: bold;
  color: var(--win95-black);
  margin: 15px 0 25px 0;
  font-family: "Times New Roman", serif;
  text-shadow: none;
  background: none;
  border: none;
  padding: 0;
}

/* Desktop Icons Grid */
.netscape-stations-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

/* Station Cards as Desktop Icons */
.netscape-station-card {
  width: 90px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  text-align: center;
}

.netscape-station-card:hover {
  background: rgba(0, 0, 128, 0.2);
  border: none;
}

.netscape-station-card.active,
.netscape-station-card.playing {
  background: rgba(0, 0, 128, 0.3);
  border: none;
}

.netscape-card-header {
  display: none;
}

.netscape-card-image {
  width: 48px;
  height: 48px;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}

.station-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.netscape-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--win95-gray-dark);
  background: linear-gradient(135deg, #c0c0c0 25%, #a0a0a0 50%, #c0c0c0 75%);
}

.netscape-card-footer {
  font-size: 10px;
  color: var(--win95-black);
  word-wrap: break-word;
  line-height: 1.2;
  max-width: 90px;
  border: none;
  background: none;
  padding: 2px;
  text-transform: none;
}

/* Icon Labels */
.netscape-station-card::after {
  content: attr(data-station-name);
}

/* Play indicator */
.play-icon {
  display: none;
}

.music-bars {
  position: absolute;
  bottom: 2px;
  right: 2px;
  display: flex;
  gap: 1px;
  align-items: flex-end;
  height: 10px;
  background: rgba(255,255,255,0.8);
  padding: 1px;
}

.music-bars span {
  width: 2px;
  background: #008000;
}

.music-bars span:nth-child(1) {
  animation: bar1 0.5s ease-in-out infinite;
}
.music-bars span:nth-child(2) {
  animation: bar2 0.5s ease-in-out infinite 0.1s;
}
.music-bars span:nth-child(3) {
  animation: bar3 0.5s ease-in-out infinite 0.2s;
}

@keyframes bar1 { 0%, 100% { height: 3px; } 50% { height: 8px; } }
@keyframes bar2 { 0%, 100% { height: 6px; } 50% { height: 3px; } }
@keyframes bar3 { 0%, 100% { height: 4px; } 50% { height: 9px; } }

.live-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff0000;
  color: white;
  font-size: 6px;
  padding: 1px 3px;
  font-weight: bold;
  display: none;
}

.netscape-station-card.playing .live-pill {
  display: block;
}

.recognize-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--win95-gray);
  border: 1px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recognition-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  padding: 10px;
  font-size: 11px;
  max-width: 300px;
  z-index: 1000;
  box-shadow: 2px 2px 0 #000;
}

.recognition-panel a {
  color: var(--link-blue);
}

.recognition-panel a:visited {
  color: var(--link-visited);
}

.recognition-loading::after {
  content: "⌛";
  animation: hourglass 1s steps(2) infinite;
}

@keyframes hourglass {
  0%, 50% { content: "⌛"; }
  51%, 100% { content: "⏳"; }
}

/* Section Titles */
.netscape-section {
  margin: 20px 0;
}

.netscape-section-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--win95-black);
  margin-bottom: 10px;
  font-family: "Times New Roman", serif;
}

.favorite-star {
  color: #FFD700;
  font-size: 10px;
  position: absolute;
  top: -4px;
  left: -4px;
}

/* Load All Button - 90s Web Button Style */
.netscape-link-btn {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  padding: 5px 15px;
  font-size: 12px;
  cursor: pointer;
  color: var(--win95-black);
  text-decoration: none;
  display: inline-block;
  margin: 10px;
}

.netscape-link-btn:hover {
  background: #d4d4d4;
}

.netscape-link-btn:active {
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

/* Navigation Links Row - 90s Style */
.nav-links {
  margin: 15px 0;
  padding: 5px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #808080;
}

.nav-links a {
  color: var(--link-blue);
  text-decoration: underline;
  margin: 0 10px;
  font-size: 11px;
}

.nav-links a:visited {
  color: var(--link-visited);
}

/* Banner Style */
.banner-ad {
  margin: 10px auto;
  display: flex;
  justify-content: center;
}

/* Silence Toggle Button */
.silence-toggle-btn {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  padding: 6px 12px;
  font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  color: var(--win95-black);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 1px 1px 0 #000;
}

.silence-toggle-btn:hover {
  background: #e0e0e0;
}

.silence-toggle-btn:active {
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  box-shadow: inset 1px 1px 0 #000;
}

.silence-toggle-btn.muted {
  background: #ffcccc;
}

.silence-toggle-btn.muted #silence-toggle-text::before {
  content: "🔇 ";
}

.silence-toggle-btn:not(.muted) #silence-toggle-text::before {
  content: "🔊 ";
}

/* Footer Text */
.footer-text {
  font-size: 10px;
  color: var(--win95-gray-dark);
  margin-top: 20px;
  border-top: 1px solid #a0a0a0;
  padding-top: 10px;
}

/* Get Started Modal */
.get-started-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 128, 128, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.get-started-modal.hidden {
  display: none;
}

.get-started-content {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  padding: 30px 50px;
  text-align: center;
  box-shadow: 3px 3px 0 #000;
}

.get-started-button {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  padding: 8px 25px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  color: var(--win95-black);
}

.get-started-button:hover {
  background: #d0d0d0;
}

.get-started-button:active {
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.hidden {
  display: none !important;
}

/* Marquee style welcome text */
.welcome-marquee {
  font-size: 16px;
  font-style: italic;
  color: #800000;
  margin: 10px 0;
  font-family: "Times New Roman", serif;
}

/* Counter badge */
.visitor-counter {
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  padding: 3px 8px;
  font-size: 11px;
  display: inline-block;
  margin: 10px;
}

/* Lobster overlay for Taiwan Lounge Radio */
.lobster-overlay {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lobster-overlay img {
  width: 200px;
  height: auto;
  display: block;
}

.lobster-overlay.hidden {
  display: none;
}

/* Animation states for rotation */
.lobster-overlay.position-top-right {
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
}

.lobster-overlay.position-top-left {
  top: 20px;
  left: 20px;
  right: auto;
  bottom: auto;
}

.lobster-overlay.position-bottom-left {
  bottom: 20px;
  left: 20px;
  top: auto;
  right: auto;
}

.lobster-overlay.position-bottom-right {
  bottom: 20px;
  right: 20px;
  top: auto;
  left: auto;
}

/* Dual position states - images are already fixed positioned via parent */
.lobster-overlay.dual-top-left-bottom-right .lobster-top-left,
.lobster-overlay.dual-top-left-bottom-right .lobster-bottom-right,
.lobster-overlay.dual-top-right-bottom-left .lobster-top-right,
.lobster-overlay.dual-top-right-bottom-left .lobster-bottom-left {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
}

.lobster-overlay.dual-top-left-bottom-right .lobster-top-left {
  top: 20px;
  left: 20px;
}

.lobster-overlay.dual-top-left-bottom-right .lobster-bottom-right {
  bottom: 20px;
  right: 20px;
}

.lobster-overlay.dual-top-right-bottom-left .lobster-top-right {
  top: 20px;
  right: 20px;
}

.lobster-overlay.dual-top-right-bottom-left .lobster-bottom-left {
  bottom: 20px;
  left: 20px;
}

/* Emoji Rain */
#emoji-rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.emoji-rain-item {
  position: absolute;
  top: -50px;
  animation: emoji-fall linear forwards;
  user-select: none;
  pointer-events: none;
}

@keyframes emoji-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .netscape-body {
    padding: 10px;
  }
  
  .netscape-window {
    margin: 10px;
  }
  
  .netscape-station-card {
    width: 70px;
  }
  
  .netscape-card-image {
    width: 40px;
    height: 40px;
  }
  
  .netscape-card-footer {
    font-size: 9px;
  }
  
  .netscape-title-text {
    font-size: 20px;
  }
}
