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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: #f5f5f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #333;
}

.container {
  background: white;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 50px 40px;
  max-width: 500px;
  width: 100%;
}

h1 {
  color: #000;
  margin-bottom: 10px;
  font-size: 2.5em;
  text-align: center;
  font-weight: 600;
  letter-spacing: -0.5px;
}

h2 {
  color: #000;
  margin-bottom: 30px;
  font-size: 1.3em;
  text-align: center;
  font-weight: 400;
}

h3 {
  color: #555;
  margin-bottom: 15px;
  font-size: 1.2em;
}

p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.subtitle {
  color: #666;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 35px;
  font-weight: 400;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 4em;
}

/* Status Box */
.status-box {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid #e8e8e8;
}

/* Card Items */
.card-item {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #e8e8e8;
  transition: all 0.2s ease;
}

.card-item:hover {
  background: #f5f5f5;
}

.card-item .icon {
  font-size: 1.8em;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-item .label {
  flex: 1;
  font-size: 1.05em;
  font-weight: 500;
  color: #000;
}

.card-item input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05em;
  font-weight: 400;
  color: #666;
  outline: none;
  padding: 0;
}

.card-item input[type="text"]::placeholder {
  color: #999;
}

.toggle-btn {
  background: #000;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: #333;
}

.toggle-btn.active {
  background: #e8e8e8;
  color: #000;
}

/* Audio Visualizer */
.audio-visualizer {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid #e8e8e8;
}

.audio-visualizer h3 {
  margin-bottom: 15px;
  color: #000;
  font-weight: 600;
  font-size: 1.1em;
}

#visualizer {
  width: 100%;
  height: 100px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
}

/* Room Info */
.room-info {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin: 20px 0;
  color: #000;
  border: 1px solid #e8e8e8;
}

.room-info h3 {
  color: #000;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.room-id-display {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-top: 10px;
}

.room-id-display p {
  color: #666;
  margin-bottom: 10px;
  font-size: 1em;
  text-align: center;
}

.room-id-display strong {
  font-size: 1.3em;
  letter-spacing: 1px;
  color: #000;
}

#listener-url {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  margin: 15px 0;
  font-family: monospace;
  font-size: 0.85em;
  background: #f9f9f9;
  color: #666;
}

#copy-btn {
  width: 100%;
  background: #f5f5f5;
  color: #000;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
  margin-top: 10px;
}

#copy-btn:hover {
  background: #ebebeb;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1em;
  font-weight: 500;
  color: #000;
}

.status-indicator .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #999;
  display: inline-block;
  animation: pulse 2s infinite;
}

.status-success .dot {
  background: #34c759;
}

.status-warning .dot {
  background: #ff9500;
}

.status-error .dot {
  background: #ff3b30;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Buttons */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 30px 0;
}

.controls {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
}

.btn {
  padding: 18px 30px;
  border: none;
  border-radius: 30px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #000;
  color: white;
  width: 100%;
  margin-top: 15px;
}

.btn-primary:hover:not(:disabled) {
  background: #333;
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: #f5f5f5;
  color: #000;
  border: 1px solid #e8e8e8;
}

.btn-secondary:hover:not(:disabled) {
  background: #ebebeb;
}

.btn-danger {
  background: #ff3b30;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #ff2d22;
  transform: translateY(-1px);
}

.btn .icon {
  font-size: 1.3em;
}

/* Info Panel */
.info {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 24px;
  margin-top: 30px;
  border: 1px solid #e8e8e8;
}

.info ul {
  list-style: none;
  padding-left: 0;
}

.info li {
  padding: 8px 0;
  color: #666;
  font-size: 0.95em;
}

.info-panel {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #e8e8e8;
}

.note {
  color: #999;
  font-size: 0.85em;
  font-style: normal;
}

/* Listeners List */
.listeners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.listener-item {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  font-weight: 500;
  color: #000;
}

#listener-count {
  color: #007aff;
  font-weight: 600;
}

/* Audio Player */
.audio-player {
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
}

#remote-audio {
  width: 100%;
  margin-bottom: 15px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.volume-control label {
  font-weight: 500;
  color: #000;
  font-size: 0.95em;
}

.volume-control input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e8e8e8;
  outline: none;
  -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  border: none;
}

#volume-value {
  min-width: 45px;
  font-weight: 600;
  color: #000;
  font-size: 0.9em;
}

/* Audio Info */
.audio-info {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  padding: 20px;
  border-radius: 16px;
  margin: 20px 0;
}

.audio-info p {
  margin: 5px 0;
  color: #666;
  font-size: 0.95em;
}

/* Back Link */
.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #007aff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #0051d5;
  transform: translateX(-3px);
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 1.5em;
  }

  .controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
