/* ==========================================================================
   MORSE RADIO EXPERIENCE — ZERO-UI PURE PROJECTION STYLESHEET
   ========================================================================== */

:root {
  --bg-dark: #000000;
  --bg-card: rgba(18, 20, 28, 0.92);
  --bg-glass: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.12);
  
  --text-main: #F0F4F8;
  --text-muted: #8A99AD;
  
  --accent-red: #E83935;
  --accent-orange: #F59236;
  --accent-blue: #435CE8;
  --accent-purple: #BE35FF;
  --accent-green: #36B83E;
  --accent-cyan: #00F0FF;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  user-select: none;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   FULLSCREEN CANVAS VISUAL CONTAINER
   -------------------------------------------------------------------------- */
.visual-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 1;
  overflow: hidden;
  cursor: pointer;
}

#visualCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
}

/* Centered Tap to Unmute Text */
.centered-unmute-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: lowercase;
  pointer-events: none;
  transition: opacity 0.6s ease;
  animation: pulseText 2.5s infinite ease-in-out;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.97); }
}

/* --------------------------------------------------------------------------
   START OVERLAY (iOS SAFARI AUTOPLAY COMPLIANCE)
   -------------------------------------------------------------------------- */
.start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: radial-gradient(circle at center, rgba(18, 20, 28, 0.95), var(--bg-dark));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  backdrop-filter: blur(20px);
  cursor: pointer;
}

.start-card {
  text-align: center;
  max-width: 380px;
  width: 100%;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.radio-pulse-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: floatPulse 2s infinite ease-in-out;
}

@keyframes floatPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(0,240,255,0.4)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(0,240,255,0.8)); }
}

.start-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #FFF, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.start-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   SECRET INVISIBLE TOUCH TRIGGER FOR ADMIN
   -------------------------------------------------------------------------- */
.secret-admin-trigger {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  z-index: 20;
  background: transparent;
  cursor: default;
}

/* --------------------------------------------------------------------------
   BUTTON SYSTEM
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00A3FF);
  color: #000;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-icon-round {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   SECRET MODAL ADMIN PANEL
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.admin-section {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
}

.admin-section h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--accent-cyan);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.input-field, .file-input, .color-picker-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #FFF;
  font-family: var(--font-main);
  font-size: 0.85rem;
}

.color-picker-input {
  height: 36px;
  padding: 2px 4px;
  cursor: pointer;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Playlist Queue Items */
.playlist-queue {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.playlist-item.active-item {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.item-title {
  font-weight: 700;
  font-size: 0.85rem;
}

.item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.item-actions {
  display: flex;
  gap: 6px;
}

/* Responsive Overrides */
@media (max-width: 600px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: span 1;
  }
}
