body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

/* iOS Safari 100vh fix */
:root {
  --vh: 1vh;
}

body {
  overflow: hidden;
  background-color: #000;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
}

.radio-hint {
  color: rgba(255,255,255,1);
  font-size: 22px;
  line-height: 1.3;
  opacity: 1;
  transition: opacity 0.8s ease-out;
  margin-top: 2px;
  background: rgba(0, 0, 0, 0.9);
  padding: 8px;
  border-radius: 8px;
  white-space: normal;
  overflow-wrap: break-word;
}


.station-info {
  font-size: 12px;
  opacity: 0.95;
  flex: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  min-width: 240px;
  line-height: 1.2;
}

/* Mobile responsive radio UI */
@media (width <= 768px) {
  .radio-ui {
    max-width: calc(100vw - 16px);
    min-width: 120px;
    width: auto;
    padding: 3px 4px;
    gap: 1px;
    border-radius: 6px;
    left: max(8px, env(safe-area-inset-left));
    top: max(4px, env(safe-area-inset-top));
    font-size: 8px;
    box-sizing: border-box;
  }
  
  .radio-controls {
    transform: scale(1);
    gap: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  
  .play-btn {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 8px;
  }
  
  .station-info {
    font-size: 7px;
    min-width: 0;
    max-width: calc(100% - 30px);
    white-space: normal;
    overflow: hidden;
    line-height: 1.1;
    flex: 1;
    overflow-wrap: break-word;
    text-overflow: ellipsis;
  }
  
  .radio-hint {
    font-size: 10px;
    padding: 10px 2px 2px;
    margin-top: 10px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    hyphens: auto;
  }

}

.radio-ui {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 10;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  font-size: 11px;
  backdrop-filter: blur(12px);
  max-width: min(85vw, 500px);
  min-width: 420px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: scale(1.5);
  transform-origin: left top;
}


.radio-hint.fade-out {
  opacity: 0;
}

.fullscreen-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.fullscreen-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

/* Floating fullscreen button in bottom right */
.fullscreen-btn-floating {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: max(12px, env(safe-area-inset-right));
  z-index: 10;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px;
  border-radius: 50%;
  font-size: 18px;
  font-family: system-ui, sans-serif;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  user-select: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-btn-floating:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.05);
}

/* Hide fullscreen button on mobile devices (iOS Fullscreen via PWA or UA chrome only) */
@media (width <= 768px), (hover: none) and (pointer: coarse) {
  .fullscreen-btn-floating {
    display: none;
  }
}

.play-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
  min-width: 24px;
}

.play-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ISS Context Mini-overlay */
.iss-context-overlay {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  transform: none;
  z-index: 20;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  border-radius: 12px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: min(90vw, 320px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.iss-context-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iss-context-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.iss-context-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.iss-context-close:hover {
  color: #fff;
}

.iss-context-content {
  padding: 16px 20px;
}

.iss-context-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}

.iss-context-item:last-child {
  margin-bottom: 0;
}

.iss-context-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.iss-context-value {
  color: #fff;
  font-weight: 400;
  text-align: right;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.iss-context-controls {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.iss-context-toggle {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.iss-context-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.iss-context-toggle.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile responsive adjustments */
@media (width <= 768px) {
  .iss-context-overlay {
    width: min(95vw, 300px);
    font-size: 12px;
  }
  
  .iss-context-header {
    padding: 12px 16px 6px;
  }
  
  .iss-context-header h3 {
    font-size: 14px;
  }
  
  .iss-context-content {
    padding: 12px 16px;
  }
  
  .iss-context-item {
    font-size: 12px;
    margin-bottom: 10px;
  }
  
  .iss-context-toggle {
    font-size: 11px;
    padding: 8px 12px;
  }
}

