/* ===== GCCSS–THETA STYLE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0a0a0a;
  color: #f5e6c8;
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}

/* Header */
.channel-header {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
  border: 1px solid #c9a227;
  border-radius: 16px;
  padding: 24px 32px;
  margin: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.15);
}

.channel-header p {
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: #c9a227;
  margin-bottom: 4px;
}

.channel-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #f5e6c8;
}

.channel-return {
  border: 1px solid #c9a227;
  padding: 12px 24px;
  border-radius: 40px;
  color: #f5e6c8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.channel-return:hover {
  background: #c9a227;
  color: #000;
}

/* Dashboard */
#channelCenter {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.channel-dashboard-header {
  background: #111;
  border: 1px solid #c9a227;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 0 25px rgba(201, 162, 39, 0.1);
}

.channel-dashboard-header h2 {
  font-size: 1.9rem;
  color: #f5e6c8;
  margin-bottom: 8px;
}

.channel-dashboard-header p {
  color: #aaa;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.channel-edit-actions {
  display: flex;
  gap: 14px;
}

.channel-edit-actions button {
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid #c9a227;
  background: transparent;
  color: #f5e6c8;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.channel-edit-actions button:hover {
  background: #c9a227;
  color: #000;
}

.channel-edit-actions button.danger {
  border-color: #c44;
  color: #f88;
}

.channel-edit-actions button.danger:hover {
  background: #c44;
  color: #fff;
}

/* Tabs */
.channel-dashboard-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dash-tab {
  padding: 12px 20px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #bbb;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-tab:hover {
  border-color: #c9a227;
  color: #f5e6c8;
}

.dash-tab.active {
  background: #c9a227;
  color: #000;
  border-color: #c9a227;
  font-weight: 600;
}

/* Content */
.dashboard-content {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 28px;
  min-height: 320px;
}

.dashboard-content p {
  color: #888;
  font-size: 1.05rem;
}
/* ===== CHANNEL EDITOR (Create / Edit Form) ===== */
.creation-section {
  max-width: 700px;
  margin: 40px auto;
  padding: 40px;
  background: #111;
  border: 1px solid #c9a227;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.12);
}

.creation-section h2 {
  font-size: 1.8rem;
  color: #f5e6c8;
  margin-bottom: 30px;
  text-align: center;
}

#channelIdentityForm {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

#channelIdentityForm label {
  font-size: 0.95rem;
  color: #c9a227;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

#channelIdentityForm input[type="text"],
#channelIdentityForm textarea {
  width: 100%;
  padding: 14px 16px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #f5e6c8;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

#channelIdentityForm input[type="text"]:focus,
#channelIdentityForm textarea:focus {
  outline: none;
  border-color: #c9a227;
}

#channelIdentityForm textarea {
  min-height: 120px;
  resize: vertical;
}

#channelIdentityForm input[type="file"] {
  padding: 12px;
  background: #1a1a1a;
  border: 1px dashed #444;
  border-radius: 8px;
  color: #aaa;
  cursor: pointer;
}

#channelIdentityForm input[type="file"]:hover {
  border-color: #c9a227;
}

#saveChannelIdentityBtn {
  margin-top: 10px;
  padding: 16px;
  background: #c9a227;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

#saveChannelIdentityBtn:hover {
  background: #e0b84a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}

#saveChannelIdentityBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Upload Studio Button */
.primary-btn {
  display: inline-block;
  padding: 16px 32px;
  background: #c9a227;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.primary-btn:hover {
  background: #e0b84a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.35);
}
/* ===== UPLOAD STUDIO ===== */
.upload-studio {
  max-width: 600px;
}

.upload-studio h3 {
  font-size: 1.4rem;
  color: #f5e6c8;
  margin-bottom: 28px;
}

.upload-studio label {
  display: block;
  font-size: 0.9rem;
  color: #c9a227;
  margin-bottom: 6px;
  margin-top: 18px;
}

.upload-studio input[type="text"],
.upload-studio textarea,
.upload-studio select {
  width: 100%;
  padding: 12px 14px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #f5e6c8;
  font-size: 1rem;
}

.upload-studio input[type="text"]:focus,
.upload-studio textarea:focus,
.upload-studio select:focus {
  outline: none;
  border-color: #c9a227;
}

.upload-studio textarea {
  min-height: 100px;
  resize: vertical;
}

.upload-studio input[type="file"] {
  width: 100%;
  padding: 12px;
  background: #1a1a1a;
  border: 1px dashed #444;
  border-radius: 8px;
  color: #aaa;
  cursor: pointer;
}

.upload-studio input[type="file"]:hover {
  border-color: #c9a227;
}

.upload-studio .primary-btn {
  margin-top: 28px;
  width: 100%;
  padding: 16px;
}
/* Media Cards in Library */
.media-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  margin-bottom: 12px;
  position: relative;
}

.media-thumb {
  width: 120px;
  height: 68px;
  background: #0a0a0a;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 0.8rem;
}

.media-info {
  flex: 1;
}

.media-info strong {
  display: block;
  color: #f5e6c8;
  margin-bottom: 4px;
}

.media-info span {
  font-size: 0.85rem;
  color: #888;
}

.media-options-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px 12px;
}

.media-options-btn:hover {
  color: #c9a227;
}
.media-thumb {
  position: relative;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.65);
  color: #c9a227;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  pointer-events: none;
  border: 2px solid #c9a227;
}

/* =========================================================
   EDIT VIDEO SETTINGS MODAL
   ========================================================= */

.edit-video-modal[hidden] {
  display: none;
}

.edit-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.edit-video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.edit-video-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #111111;
  border: 1px solid #c9a227;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
  color: #f4f4f4;
}

.edit-video-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid #c9a227;
  border-radius: 50%;
  background: #c9a227;
  color: #090909;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.edit-video-header {
  padding-right: 55px;
  margin-bottom: 26px;
}

.edit-video-header p {
  margin: 0 0 7px;
  color: #c9a227;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.edit-video-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.65rem;
}

.edit-video-field {
  margin-bottom: 22px;
}

.edit-video-field label {
  display: block;
  margin-bottom: 8px;
  color: #e2c45f;
  font-size: 0.92rem;
  font-weight: 700;
}

.edit-video-field input[type="text"],
.edit-video-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #343434;
  border-radius: 10px;
  background: #090909;
  color: #ffffff;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.edit-video-field textarea {
  resize: vertical;
  min-height: 120px;
}

.edit-video-field input[type="text"]:focus,
.edit-video-field textarea:focus {
  border-color: #c9a227;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.14);
}

.edit-thumbnail-preview {
  width: 100%;
  min-height: 190px;
  margin-bottom: 12px;
  border: 1px dashed #4a4a4a;
  border-radius: 12px;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.edit-thumbnail-preview img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

#editThumbnailInput {
  width: 100%;
  color: #cfcfcf;
}

.edit-video-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0;
  padding: 18px;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  background: #0b0b0b;
}

.edit-status-label {
  display: block;
  margin-bottom: 5px;
  color: #8f8f8f;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#editVideoStatusText {
  color: #ffffff;
  font-size: 1rem;
}

.edit-status-btn {
  min-width: 125px;
  border: 1px solid #c9a227;
  border-radius: 9px;
  background: transparent;
  color: #e4c75d;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.edit-status-btn:hover {
  background: #c9a227;
  color: #080808;
}

.edit-video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid #2b2b2b;
}

.edit-video-actions-right {
  display: flex;
  gap: 10px;
}

.edit-delete-btn,
.edit-cancel-btn,
.edit-save-btn {
  border-radius: 9px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.edit-delete-btn {
  border: 1px solid #9e3434;
  background: transparent;
  color: #ff7272;
}

.edit-delete-btn:hover {
  background: #8e2424;
  color: #ffffff;
}

.edit-cancel-btn {
  border: 1px solid #444444;
  background: #1b1b1b;
  color: #dddddd;
}

.edit-cancel-btn:hover {
  background: #292929;
}

.edit-save-btn {
  border: 1px solid #c9a227;
  background: #c9a227;
  color: #080808;
}

.edit-save-btn:hover {
  filter: brightness(1.08);
}

.edit-video-message {
  min-height: 20px;
  margin: 16px 0 0;
  color: #d7bb55;
  font-size: 0.9rem;
}

@media (max-width: 650px) {
  .edit-video-modal {
    padding: 12px;
  }

  .edit-video-panel {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .edit-video-status-row,
  .edit-video-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .edit-video-actions-right {
    width: 100%;
  }

  .edit-video-actions-right button,
  .edit-delete-btn,
  .edit-status-btn {
    width: 100%;
  }
}
/* =========================================================
   COMMONWEALTH LIVE STUDIO — FINAL UI
   ========================================================= */

.live-studio {
  display: grid;
  gap: 24px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.05), rgba(0, 0, 0, 0)),
    #0d0d0d;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 18px;
}

.live-studio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.live-studio-header h3 {
  margin: 4px 0 6px;
  color: #f7e8c4;
  font-size: 1.55rem;
  font-weight: 800;
}

.live-studio-header p {
  margin: 0;
  max-width: 850px;
  color: #a9a9a9;
  line-height: 1.6;
}

.live-kicker {
  color: #c9a227;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.live-status-badge {
  flex: 0 0 auto;
  min-width: 105px;
  padding: 9px 14px;
  border: 1px solid #c9a227;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.08);
  color: #e5bf33;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* CAMERA / VIDEO STAGE */

.live-preview-shell {
  position: relative;
  width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  background:
    radial-gradient(circle at center, #151515 0%, #070707 70%);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 50px rgba(0, 0, 0, 0.35);
}

#livePreview {
  width: 100%;
  max-height: 650px;
  display: none;
  object-fit: contain;
  background: #000;
}

.live-preview-empty {
  color: #777;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* BROADCAST INFORMATION */

.live-broadcast-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 18px 22px;
  align-items: end;
}

.live-broadcast-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #e7d8b3;
  font-size: 0.88rem;
  font-weight: 700;
}

.live-broadcast-fields input,
.live-broadcast-fields textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;

  background: #101010;
  border: 1px solid #343434;
  border-radius: 10px;

  color: #fff;
  font: inherit;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.live-broadcast-fields textarea {
  min-height: 105px;
  resize: vertical;
}

.live-broadcast-fields input::placeholder,
.live-broadcast-fields textarea::placeholder {
  color: #666;
}

.live-broadcast-fields input:focus,
.live-broadcast-fields textarea:focus {
  outline: none;
  background: #131313;
  border-color: #c9a227;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

/* LIVE CONTROL CONSOLE */

.live-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;

  padding-top: 4px;
}

.live-controls button {
  appearance: none;
  min-width: 165px;
  padding: 13px 20px;

  border-radius: 9px;
  border: 1px solid #c9a227;

  background: linear-gradient(180deg, #1b1b1b, #101010);
  color: #f4e5bf;

  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.05em;

  cursor: pointer;

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.live-controls button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1b1b1b;
  border-color: #e6bd2c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* ENABLE CAMERA */

#prepareLiveBtn {
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.05)),
    #111;
}

/* GO LIVE */

#startLiveBtn:not(:disabled) {
  background: linear-gradient(180deg, #d9ad24, #b88e12);
  border-color: #e8bd32;
  color: #090909;
}

/* END LIVE */

#endLiveBtn:not(:disabled) {
  background: linear-gradient(180deg, #811f1f, #4d1010);
  border-color: #c84343;
  color: #fff;
}

/* DISABLED STATE */

.live-controls button:disabled {
  opacity: 0.32;
  filter: grayscale(0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* SYSTEM MESSAGE */

#liveBroadcastMessage {
  min-height: 24px;
  padding-top: 2px;
  color: #c9a227;
  font-size: 0.9rem;
  font-weight: 600;
}

/* MOBILE */

@media (max-width: 800px) {
  .live-studio {
    padding: 18px;
  }

  .live-studio-header {
    flex-direction: column;
  }

  .live-status-badge {
    align-self: flex-start;
  }

  .live-preview-shell {
    min-height: 280px;
  }

  .live-broadcast-fields {
    grid-template-columns: 1fr;
  }

  .live-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-controls button {
    width: 100%;
  }
}
/* =========================================================
   LIVE ON AIR INDICATOR
   ========================================================= */

.live-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.live-status-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6d6d6d;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.03);
}

.live-status-badge.on-air {
  color: #ffffff;
  border-color: #ff3b3b;
  background: rgba(120, 0, 0, 0.28);
  box-shadow:
    0 0 18px rgba(255, 40, 40, 0.22),
    inset 0 0 14px rgba(255, 30, 30, 0.08);
}

.live-status-badge.on-air::before {
  background: #ff2d2d;
  box-shadow:
    0 0 8px #ff2d2d,
    0 0 16px rgba(255, 45, 45, 0.8);

  animation: livePulse 1.1s infinite;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}