:root {
  --bg-color: #080612;
  --panel-bg: rgba(20, 18, 38, 0.55);
  --panel-border: rgba(255, 255, 255, 0.07);
  --panel-shadow: rgba(0, 0, 0, 0.4);
  
  --text-primary: #f3f3fb;
  --text-secondary: #a3a1b8;
  --text-muted: #69677e;
  
  --accent-cyan: #00f0ff;
  --accent-purple: #9c27b0;
  --accent-pink: #ff2a85;
  --accent-green: #39ff14;
  
  --fm-color: #ff3b30;
  --r1-color: #007aff;
  --r2-color: #ff9500;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 2rem;
  line-height: 1.5;
}

/* Ambient Background Glow */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 10% 20%, rgba(156, 39, 176, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(255, 42, 133, 0.05) 0%, transparent 60%);
  filter: blur(50px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Glassmorphism Panel Common Styles */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 var(--panel-shadow);
  transition: var(--transition-smooth);
}

/* Header Styling */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.logo-area h1 {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-area .subtitle {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.icon-pulse {
  font-size: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  stroke-width: 1.75;
}

.neon-text {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-muted);
  box-shadow: 0 0 0 0 rgba(105, 103, 126, 0.4);
}

.status-indicator.online .pulse-dot {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-green 2s infinite;
}

.status-indicator.offline .pulse-dot {
  background-color: var(--accent-pink);
  box-shadow: 0 0 8px var(--accent-pink);
  animation: pulse-red 2s infinite;
}

.status-text {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Card Styling */
.card {
  padding: 2rem;
}

.card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card h2 i {
  color: var(--accent-cyan);
  stroke-width: 2;
}

.description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Form Group */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: var(--transition-smooth);
}

select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.select-arrow {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

select:focus + .select-arrow {
  color: var(--accent-cyan);
  transform: translateY(-50%) rotate(180deg);
}

/* Channel Selection */
.channel-selector label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.channel-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
  font-family: var(--font-main);
  outline: none;
}

.channel-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.channel-btn.active {
  background: rgba(156, 39, 176, 0.15);
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
}

.channel-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: #fff;
}

.channel-badge.fm { background-color: var(--fm-color); }
.channel-badge.r1 { background-color: var(--r1-color); }
.channel-badge.r2 { background-color: var(--r2-color); }

.channel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Game Status List */
.game-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-item.detected {
  border-left: 3px solid var(--accent-green);
}

.game-item.not-detected {
  border-left: 3px solid var(--text-muted);
}

.game-info {
  display: flex;
  flex-direction: column;
}

.game-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.game-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
}

.game-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.game-badge.found {
  background: rgba(57, 255, 20, 0.1);
  color: var(--accent-green);
}

.game-badge.missing {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 42, 133, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Console Log */
.log-console-container {
  margin-top: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-header button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.log-header button:hover {
  color: var(--accent-pink);
}

.log-console {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  padding: 1rem;
  max-height: 180px;
  overflow-y: auto;
  color: var(--accent-cyan);
  line-height: 1.4;
}

.log-line {
  margin-bottom: 0.4rem;
  word-break: break-all;
}

/* Player Card */
.player-card {
  background: linear-gradient(135deg, rgba(20, 18, 38, 0.6) 0%, rgba(30, 15, 45, 0.6) 100%);
  border-color: rgba(156, 39, 176, 0.15);
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.live-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-pink);
  background: rgba(255, 42, 133, 0.12);
  border: 1px solid rgba(255, 42, 133, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.8px;
}

/* Visualizer Area */
.visualizer-container {
  height: 140px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.visualizer-icon {
  position: absolute;
  font-size: 3rem;
  width: 3rem;
  height: 3rem;
  color: rgba(255, 255, 255, 0.05);
  z-index: 1;
}

/* Audio Waves Animation */
.audio-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  z-index: 2;
}

.audio-waves span {
  display: inline-block;
  width: 5px;
  height: 10px;
  background-color: var(--accent-purple);
  border-radius: 3px;
  transition: transform 0.1s ease;
}

/* Play state animates individual bars */
.playing .audio-waves span {
  background-color: var(--accent-pink);
  animation: bounce-wave 1.2s infinite ease-in-out;
}

.playing .audio-waves span:nth-child(2) { animation-delay: 0.15s; background-color: var(--accent-cyan); }
.playing .audio-waves span:nth-child(3) { animation-delay: 0.3s; background-color: var(--accent-purple); }
.playing .audio-waves span:nth-child(4) { animation-delay: 0.45s; background-color: var(--accent-cyan); }
.playing .audio-waves span:nth-child(5) { animation-delay: 0.6s; background-color: var(--accent-pink); }
.playing .audio-waves span:nth-child(6) { animation-delay: 0.2s; background-color: var(--accent-purple); }
.playing .audio-waves span:nth-child(7) { animation-delay: 0.35s; background-color: var(--accent-cyan); }
.playing .audio-waves span:nth-child(8) { animation-delay: 0.5s; background-color: var(--accent-pink); }
.playing .audio-waves span:nth-child(9) { animation-delay: 0.1s; background-color: var(--accent-purple); }
.playing .audio-waves span:nth-child(10) { animation-delay: 0.25s; background-color: var(--accent-cyan); }

/* Play Pause Control button */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.btn-play-pause {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  outline: none;
}

.btn-play-pause:hover {
  transform: scale(1.08);
  background: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
}

.btn-play-pause i {
  width: 1.6rem;
  height: 1.6rem;
  stroke-width: 2.5;
}

/* Volume Slider */
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.volume-control i {
  color: var(--text-secondary);
  width: 1.2rem;
  height: 1.2rem;
}

#volume-slider {
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  appearance: none;
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  transition: var(--transition-smooth);
}

#volume-slider::-webkit-slider-thumb:hover {
  background: var(--accent-cyan);
  transform: scale(1.2);
}

/* Stream Info & Copy url */
.stream-info {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.2rem;
}

.stream-url-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.url-copy-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  padding: 0.2rem 0.2rem 0.2rem 0.8rem;
}

.url-copy-box code {
  flex: 1;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Hide scrollbars */
}

.url-copy-box code::-webkit-scrollbar {
  display: none;
}

.url-copy-box button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.url-copy-box button:hover {
  background: var(--accent-cyan);
  color: var(--bg-color);
}

.url-copy-box button i {
  width: 1rem;
  height: 1rem;
}

/* Instructions card */
.manual-list {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.manual-list li code {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  display: inline-block;
  margin-top: 0.2rem;
  word-break: break-all;
}

/* Footer layout */
.main-footer-info {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Animations */
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(57, 255, 20, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); }
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 133, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 42, 133, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 133, 0); }
}

@keyframes bounce-wave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ==========================================
   Login Page Styles
   ========================================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.login-card {
  padding: 2.5rem;
  text-align: center;
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: var(--text-secondary);
}

.input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.9rem 1.2rem 0.9rem 3rem;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-wrapper input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.error-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 42, 133, 0.1);
  border: 1px solid rgba(255, 42, 133, 0.2);
  color: var(--accent-pink);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.error-message i {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

/* Shake Animation on error */
.shake {
  animation: shake-card 0.5s ease-in-out;
}

@keyframes shake-card {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Extra custom dashboard buttons layout */
.btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

@media (max-width: 480px) {
  .btn-group {
    grid-template-columns: 1fr;
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

