:root {
  --bg: #0a1116;
  --panel: #0f1620;
  --accent: #00ffd1;
  --accent-2: #00b3ff;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter,Roboto,'Segoe UI',Helvetica,Arial,sans-serif;
  background: var(--bg);
  color: #eaf6f6;
}

.wrap { 
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 35px;
  min-height: 100vh;
  box-sizing: border-box;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 18px;
}

.brand { 
  display: flex; 
  gap: 13px; 
  align-items: center; 
  min-width: 0; 
}

.logo { 
  width: 56px; 
  height: 56px; 
  border-radius: 8px; 
  box-shadow: 0 8px 30px rgba(0,179,255,0.08); 
  flex-shrink: 0; 
}

.brand h1 { 
  margin: 0; 
  font-size: 2em; 
  color: var(--accent); 
  white-space:nowrap;
}

.player-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stream-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: linear-gradient(90deg, #00ffd1 30%, #00b3ff 100%);
  color: #002b29;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  font-size: 1em;
  padding: 10px 24px;
  box-shadow: 0 3px 16px rgba(0,255,209,0.2);
  transition: box-shadow .15s, transform .15s;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,255,209,0.3);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,255,209,0.25);
}

.btn-ghost {
  background: #0f1d27;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
  padding: 10px 14px;
}
.btn-ghost:hover {
  box-shadow: 0 5px 20px rgba(0,255,209,0.2);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border-radius: 9px;
}
.btn-icon svg {
  display: none;
}
.btn-icon .icon-play {
  display: block;
}
.btn-icon.playing .icon-play {
  display: none;
}
.btn-icon.playing .icon-pause {
  display: block;
}

select, input, textarea { 
  font-family: inherit; 
  background: #182631; 
  color: #eaf6f6; 
  border-radius: 7px; 
  border: 1.3px solid var(--accent); 
  font-size: 1em; 
  padding: 7px 11px;
  box-sizing: border-box;
}

.hidden { display: none !important; }

.volume-bar {
  position: relative;
  width: 220px;
  height: 32px;
  --thumb-size: 18px;
  --track-height: 12px;
  --volume: 1;
}

.volume-bar__track {
  position: absolute;
  left: calc(var(--thumb-size) / 2);
  right: calc(var(--thumb-size) / 2);
  top: 50%;
  transform: translateY(-50%);
  height: var(--track-height);
  border-radius: 999px;
  background: rgba(8,18,26,0.9);
  border: 1px solid rgba(0,255,209,0.22);
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.45);
}

.volume-bar__fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,255,209,0.8), rgba(0,166,255,0.85));
  transform-origin: left center;
  transform: scaleX(var(--volume));
}

.volume-bar__thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb-size) / 2 + var(--volume) * (100% - var(--thumb-size)));
  transform: translate(-50%, -50%);
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #1de9b6, #00b3ff);
  border: 2px solid rgba(10,17,22,0.85);
  box-shadow: 0 3px 8px rgba(0,179,255,0.35);
  pointer-events: none;
}

.volume-bar__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.lang-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#langSelect {
  min-width: 110px;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: rgba(10, 17, 22, 0.92);
  border: 1px solid rgba(0, 255, 209, 0.4);
  color: #eaf6f6;
  padding: 14px 18px;
  border-radius: 9px;
  min-width: 220px;
  box-shadow: 0 6px 20px rgba(0, 255, 209, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: toast-in 0.25s ease;
}

.toast.success {
  border-color: rgba(0, 255, 209, 0.6);
}

.toast.error {
  border-color: rgba(255, 99, 132, 0.7);
}

.toast.warning {
  border-color: rgba(255, 193, 7, 0.6);
}

.toast.info {
  border-color: rgba(0, 179, 255, 0.6);
}

.toast button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1em;
  padding: 0;
}

@keyframes toast-in {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.hiding {
  animation: toast-out 0.18s ease forwards;
}

@keyframes toast-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-8px);
    opacity: 0;
  }
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 35px;
  align-items: flex-start;
}

.left { 
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
}

.player.card {
  display: flex; 
  gap: 15px; 
  align-items: center;
  padding: 18px 14px; 
  background: var(--panel); 
  border-radius: 9px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.coverimg { 
  width: 75px; 
  height: 75px; 
  border-radius: 9px; 
  object-fit: cover; 
  box-shadow: 0 8px 27px rgba(0,179,255,0.10); 
}

.meta { 
  flex: 1; 
  min-width: 0; 
  padding-left: 4px; 
  padding-right: 4px; 
}

.player-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,255,209,0.12);
  color: #00ffd1;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8em;
}
.live-badge.onair {
  background: rgba(255, 99, 132, 0.18);
  color: #ff7ea8;
}
.listener-badge {
  color: #9fe9ff;
  font-size: 0.85em;
}

.trackTitle { 
  font-weight: 700; 
  font-size: 1.2em; 
}

.trackArtist { 
  color: var(--accent-2); 
  font-size: 1.05em; 
}

.progress { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-top: 8px;
}

.progress-bar {
  width: 100%;
  max-width: 800px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ee7c6, #00a6ff);
  transition: width 0.2s linear;
}

.form-card.card {
  background: var(--panel);
  border-radius: 9px;
  padding: 16px 13px;
  display: flex;
  flex-direction: column;
}

.chat.card {
  background: var(--panel);
  border-radius: 9px;
  padding: 16px 13px;
  display: flex;
  flex-direction: column;
}

.right { 
  display: flex; 
  flex-direction: column; 
  gap: 16px;
}

.request input, 
.request textarea, 
.form-card input, 
.form-card textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 5px 0;
}

.request-option {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 4px 0 12px;
  font-size: 0.9em;
  color: rgba(255,255,255,0.85);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,255,209,0.06);
  border: 1px solid rgba(0,255,209,0.15);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.request-option:hover {
  border-color: rgba(0,255,209,0.35);
}

.request-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.request-option .option-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #081119;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.request-option .option-check::after {
  content: '✓';
  color: #002b29;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.request-option input[type="checkbox"]:checked + .option-check {
  background: linear-gradient(120deg,#00ffd1,#00a6ff);
  border-color: transparent;
}

.request-option input[type="checkbox"]:checked + .option-check::after {
  opacity: 1;
}

.request-option input[type="checkbox"]:focus-visible + .option-check {
  box-shadow: 0 0 0 2px rgba(0,255,209,0.4);
}

.request-option .option-body {
  display: flex;
  flex-direction: column;
}

.request-option .option-title {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.request-option small {
  display: block;
  color: rgba(255,255,255,0.65);
  line-height: 1.35;
}

.request-notice {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255,193,7,0.25);
  color: #ffdd91;
  font-size: 0.85em;
}

.requests-list {
  height: 130px;
  overflow-y: auto;
  background: rgba(0,255,209,0.04);
  border-radius: 7px;
  padding: 6px;
  flex-shrink: 0;
  margin-top: 6px;
}

.order-line {
  margin: 0;
  padding: 5px 9px;
  line-height: 1.4em;
  font-size: .95em;
  color: #1afff7;
  border-bottom: 1px dashed rgba(255,255,255,0.04);
  background: rgba(0,255,209,0.02);
  border-radius: 4px;
  margin-bottom: 3px;
}

.chat-box { 
  height: 435px;
  overflow-y: auto; 
  padding: 10px; 
  border-radius: 9px; 
  background: linear-gradient(180deg, rgba(0,179,255,0.04), rgba(0,0,0,0.03));
  margin-bottom: 6px;
  flex-shrink: 0;
}

.chat-msg {
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(0,255,209,0.07), rgba(0,179,255,0.05));
  color: #18dee9;
  font-size: .96em;
  line-height: 1.4em;
  border-left: 2.5px solid rgba(0,255,209,0.28);
  transition: transform 0.15s ease;
}
.chat-msg:hover { transform: translateX(2px); }
.chat-msg .chat-nick {
  font-weight: 700;
  color: #eaf6f6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chat-msg .chat-badges span { font-size: 0.85em; }
.chat-msg .chat-text { color: #9fe9ff; display:block; margin-top:4px; }
.chat-msg .chat-reply {
  background: rgba(0,255,209,0.08);
  border-left: 2px solid rgba(0,255,209,0.4);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  margin-bottom: 6px;
  color: #8fe9ff;
}

.chat-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
  flex-shrink: 0;
}

.reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,255,209,0.08);
  border: 1px solid rgba(0,255,209,0.2);
  font-size: 0.85em;
}
.reply-preview.hidden { display: none; }
.reply-preview button {
  border: none;
  background: transparent;
  color: #00ffd1;
  font-size: 1.1em;
  cursor: pointer;
}
.reply-preview .reply-label { color: #8fe9ff; font-weight: 600; }

.emoji-toggle {
  border: none;
  background: rgba(0,255,209,0.18);
  border-radius: 8px;
  font-size: 1.4em;
  padding: 0 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.emoji-toggle:hover { transform: translateY(-1px); }

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 6px;
  background: rgba(8,18,26,0.95);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,209,0.25);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  max-height: 160px;
  overflow-y: auto;
}
.emoji-picker.hidden { display: none; }
.emoji-picker button {
  border: none;
  background: transparent;
  font-size: 1.2em;
  cursor: pointer;
}

.chat-context {
  position: fixed;
  background: rgba(8,18,26,0.97);
  border: 1px solid rgba(0,255,209,0.2);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  padding: 6px 0;
  z-index: 2000;
  min-width: 160px;
}
.chat-context.hidden { display: none; }
.chat-context button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #eaf6f6;
  padding: 8px 14px;
  cursor: pointer;
}
.chat-context button:hover { background: rgba(0,255,209,0.12); }

.chat-controls input {
  padding: 9px 12px;
  border-radius: 7px;
  min-width: 0;
  width: 100%;
}

.chat-message-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.chat-message-row textarea {
  flex: 1 1 auto;
  resize: none;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  overflow-y: auto;
  border-radius: 7px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.4em;
  border: 1.3px solid var(--accent);
  background: #182631;
  color: #eaf6f6;
}

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  width: 56px;
  min-width: 56px;
}

.chat-send-btn svg {
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.block-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05em;
  display: block;
  margin-bottom: 10px;
}

::-webkit-scrollbar { 
  width: 6px; 
  background: #202736;
}

::-webkit-scrollbar-thumb { 
  background: #29ffe1; 
  border-radius: 7px; 
}

@media (max-width:1200px){ 
  .main-grid{
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
  } 
  .right{
    margin-top: 20px;
    height: auto;
  }
  .wrap {
    padding: 20px;
  }
  .chat.card {
    height: auto;
  }
}


/* APPENDED radio_ui_update */

/* --- radio_ui_update: appended styles --- */
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(46,231,198,0.12), rgba(46,231,198,0.06));
  border: 1px solid rgba(46,231,198,0.18);
  color: #2ee7c6;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.play-btn.playing {
  background: linear-gradient(180deg, rgba(46,231,198,0.22), rgba(46,231,198,0.08));
  box-shadow: 0 6px 18px rgba(46,231,198,0.08);
  transform: translateY(-1px);
}

.progress-bar {
  width: 100%;
  max-width: 800px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ee7c6, #00a6ff);
  transition: width 0.2s linear;
}

/* small responsive */
@media (max-width:600px) {
  .progress-bar { max-width: 100%; height:8px; }
}
/* --- end appended styles --- */
.history.card { margin-top: 16px; }
.history-list { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.history-item { display: flex; gap: 10px; align-items: center; background: rgba(10,25,35,0.7); border-radius: 10px; padding: 8px 10px; }
.history-item img { width: 48px; height: 48px; border-radius: 8px; object-fit:cover; }
.history-item .history-meta { flex:1; }
.history-item .history-meta .title { font-weight:600; color:#eaf6f6; }
.history-item .history-meta .subtitle { font-size:0.85em; color:#8fe9ff; }
.history-item .history-meta .time { font-size:0.75em; color:#6aa3b3; }
.history-item.empty {
  justify-content: center;
  font-size: 0.9em;
  color: #7da1b4;
}
