/* =====================================================================
 * TNT Reel Studio — Desktop CSS
 * Three-panel professional layout: Left tools | Center preview | Right details
 * =====================================================================*/

.rs-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  animation: rs-fadein .25s ease;
}
@keyframes rs-fadein { from { opacity: 0; } to { opacity: 1; } }

.rs-studio {
  width: 96vw; max-width: 1400px;
  height: 92vh; max-height: 860px;
  background: #0d0d14;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  animation: rs-scalein .3s cubic-bezier(.16,1,.3,1);
}
@keyframes rs-scalein { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Header */
.rs-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: rgba(13,13,20,.97);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.rs-hdr-l { display: flex; align-items: center; gap: 12px; }
.rs-hdr-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: .3px;
}
.rs-hdr-r { display: flex; align-items: center; gap: 10px; }
.rs-icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s;
}
.rs-icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.rs-pub-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 22px; border-radius: 22px;
  background: linear-gradient(135deg, #ff6b1a, #ff4d8e);
  border: none; color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition:background .2s,color .2s,border-color .2s,box-shadow .2s,opacity .2s,transform .2s,filter .2s; letter-spacing: .3px;
}
.rs-pub-btn:hover:not(:disabled) { transform: scale(1.04); box-shadow: 0 4px 20px rgba(255,107,26,.3); }
.rs-pub-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Body — 3-panel */
.rs-body {
  flex: 1; display: flex; overflow: hidden;
}

/* LEFT PANEL */
.rs-left {
  width: 280px; min-width: 280px;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column;
  background: rgba(10,10,16,.5);
}
.rs-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.rs-tab {
  flex: 1; padding: 10px 4px; border: none; background: none;
  color: rgba(255,255,255,.4); font-size: 11px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px;
  transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.rs-tab:hover { color: rgba(255,255,255,.7); }
.rs-tab.active { color: #ff6b1a; border-bottom-color: #ff6b1a; }
.rs-pane { display: none; padding: 16px; overflow-y: auto; flex: 1; }
.rs-pane.active { display: block; }

/* Filter grid */
.rs-fgrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.rs-fchip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1.5px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.5); font-size: 10px; font-weight: 500;
  cursor: pointer; transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s;
}
.rs-fchip:hover { border-color: rgba(255,107,26,.3); background: rgba(255,255,255,.06); }
.rs-fchip.active {
  border-color: #ff6b1a; background: rgba(255,107,26,.1);
  color: #ff6b1a; font-weight: 700;
}
.rs-fchip-prev {
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  background-size: cover; background-position: center;
}

/* Sliders */
.rs-sgrp { margin-bottom: 16px; }
.rs-slbl {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 8px; font-weight: 500;
}
.rs-rng {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.1); outline: none;
}
.rs-rng::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: #ff6b1a; cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,107,26,.3);
}
.rs-rng-sm { flex: 1; }
.rs-rng-val { font-size: 11px; color: rgba(255,255,255,.4); min-width: 36px; text-align: right; }
.rs-ghost-btn {
  width: 100%; padding: 8px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5); font-size: 12px; cursor: pointer;
  transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s;
}
.rs-ghost-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Text panel */
.rs-inp {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: 14px; outline: none;
  transition: border-color .2s; margin-bottom: 12px; box-sizing: border-box;
}
.rs-inp:focus { border-color: rgba(255,107,26,.5); }
.rs-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.rs-lbl { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.4); min-width: 40px; }
.rs-sel {
  flex: 1; padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: 12px; outline: none;
}
.rs-sel option { background: #1a1a2e; color: #fff; }
.rs-cdots { display: flex; gap: 6px; flex-wrap: wrap; }
.rs-cdot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s;
}
.rs-cdot:hover { transform: scale(1.15); }
.rs-cdot.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,107,26,.5); }
.rs-chk {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.6); font-size: 13px; cursor: pointer;
  margin-bottom: 8px;
}
.rs-chk input { accent-color: #ff6b1a; width: 16px; height: 16px; }
.rs-hint { font-size: 11px; color: rgba(255,255,255,.25); margin: 8px 0; }

/* CENTER PANEL */
.rs-center {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 20px; gap: 16px;
  background: rgba(8,8,16,.6);
  min-width: 0;
}
.rs-phone {
  position: relative;
  width: 300px; max-width: 100%;
  aspect-ratio: 9/16;
  border-radius: 20px;
  overflow: hidden;
  background: #12121e;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03);
}

/* Drop zone */
.rs-dropzone {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; border: 2px dashed rgba(255,255,255,.1);
  border-radius: 18px; margin: 4px;
  transition:background .25s,color .25s,border-color .25s,box-shadow .25s,opacity .25s,transform .25s,filter .25s;
}
.rs-dropzone:hover, .rs-dropzone.hover {
  border-color: rgba(255,107,26,.4);
  background: rgba(255,107,26,.04);
}
.rs-drop-icon { opacity: .4; transition: opacity .2s; }
.rs-dropzone:hover .rs-drop-icon { opacity: .7; }
.rs-drop-t1 { color: rgba(255,255,255,.6); font-size: 15px; font-weight: 600; }
.rs-drop-t2 { color: rgba(255,255,255,.3); font-size: 13px; margin-top: -8px; }
.rs-drop-t3 { color: rgba(255,255,255,.2); font-size: 11px; margin-top: 4px; }
.rs-fhidden { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Video */
.rs-vid {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 18px;
}

/* Text overlay on preview */
.rs-txtov {
  position: absolute; transform: translate(-50%,-50%);
  font-weight: 700; letter-spacing: .5px;
  pointer-events: auto; cursor: grab;
  user-select: none; z-index: 5;
  max-width: 90%; text-align: center;
  word-break: break-word;
}

/* Play overlay */
.rs-playbtn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.2);
  cursor: pointer; transition: opacity .2s;
  z-index: 4;
}
.rs-playbtn:hover { background: rgba(0,0,0,.35); }

/* Timeline */
.rs-tl {
  width: 100%; max-width: 500px;
  background: rgba(255,255,255,.03);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.06);
}
.rs-tl-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.rs-tl-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: none;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.rs-tl-btn:hover { background: rgba(255,255,255,.15); }
.rs-tl-btn.muted svg path:last-child { display: none; }
.rs-tl-time { font-size: 12px; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }

/* Trim track */
.rs-track {
  position: relative; height: 28px;
  background: rgba(255,255,255,.05);
  border-radius: 6px; overflow: visible;
}
.rs-track-bg { position: absolute; inset: 0; border-radius: 6px; }
.rs-track-fill {
  position: absolute; top: 0; bottom: 0;
  background: rgba(255,107,26,.2);
  border-radius: 6px;
}
.rs-handle {
  position: absolute; top: -2px; width: 10px; height: 32px;
  background: #ff6b1a; border-radius: 4px;
  cursor: ew-resize; z-index: 3;
  transform: translateX(-50%);
  transition: box-shadow .15s;
}
.rs-handle:hover { box-shadow: 0 0 12px rgba(255,107,26,.5); }
.rs-phead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #fff; z-index: 2;
  transform: translateX(-1px);
  pointer-events: none;
}
.rs-tl-times {
  display: flex; justify-content: space-between;
  font-size: 10px; color: rgba(255,255,255,.3); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* RIGHT PANEL */
.rs-right {
  width: 260px; min-width: 260px;
  border-left: 1px solid rgba(255,255,255,.06);
  padding: 16px; overflow-y: auto;
  background: rgba(10,10,16,.5);
}
.rs-sec {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 0 0 10px;
}
.rs-ta {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: #fff; font-size: 13px; outline: none; resize: none;
  transition: border-color .2s; box-sizing: border-box;
  font-family: inherit;
}
.rs-ta:focus { border-color: rgba(255,107,26,.5); }
.rs-cc { font-size: 10px; color: rgba(255,255,255,.2); text-align: right; margin: 4px 0 14px; }

/* Thumbnails */
.rs-thumbs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 4px 0; margin-bottom: 12px;
}
.rs-thumb {
  width: 56px; height: 100px; border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer; transition:background .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s,filter .15s; flex-shrink: 0;
  object-fit: cover;
}
.rs-thumb:hover { border-color: rgba(255,255,255,.3); }
.rs-thumb.active { border-color: #ff6b1a; box-shadow: 0 0 8px rgba(255,107,26,.3); }

.rs-divider { height: 1px; background: rgba(255,255,255,.06); margin: 14px 0; }

/* File info */
.rs-info { margin-bottom: 14px; }
.rs-irow {
  display: flex; justify-content: space-between; padding: 5px 0;
  font-size: 12px;
}
.rs-ik { color: rgba(255,255,255,.35); }
.rs-iv { color: rgba(255,255,255,.6); font-weight: 500; }

/* Progress */
.rs-prog { margin-top: 14px; }
.rs-prog-track {
  height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.rs-prog-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #ff6b1a, #ff4d8e);
  transition: width .3s;
}
.rs-prog-txt {
  display: block; font-size: 11px; color: rgba(255,255,255,.5);
  text-align: center; margin-top: 6px;
}

/* Responsive: collapse side panels on small screens */
@media (max-width: 900px) {
  .rs-studio { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
  .rs-body { flex-direction: column; overflow-y: auto; }
  .rs-left, .rs-right { width: 100%; min-width: 0; border-left: none; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .rs-center { padding: 12px; }
  .rs-phone { width: 220px; }
}
