@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800;900&family=Montserrat:wght@400;600;700;800&family=Noto+Sans+KR:wght@400;600;700;900&family=Noto+Serif+SC:wght@600;700&display=swap');

:root {
  --bg-dark: #07080c;
  --bg-panel: #111420;
  --bg-panel-hover: #1a1e30;
  --gold: #d4af37;
  --gold-light: #f6e69f;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --border-gold: rgba(212, 175, 55, 0.3);
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Montserrat', 'Noto Sans KR', sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.navbar {
  height: 60px;
  background: #0b0d14;
  border-bottom: 1px solid var(--border-gold);
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.logo-tag {
  background: var(--gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn-accent {
  background: linear-gradient(135deg, #d4af37, #997a15);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #f6e69f, #d4af37);
  box-shadow: 0 0 15px var(--gold-glow);
  transform: translateY(-2px);
}

.btn-record {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: #fff;
}

.btn-record:hover {
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

/* Studio Layout (Left: Phone Canvas, Right: Script Inspector & Controls) */
.studio-main {
  flex: 1;
  display: grid;
  grid-template-columns: 460px 1fr;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Left: Phone Canvas Preview Frame */
.preview-section {
  background: #090a10;
  border-right: 1px solid var(--border-gold);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.phone-frame {
  width: 380px;
  height: 675px; /* 9:16 aspect ratio */
  background: #000;
  border: 3px solid var(--gold);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-glow);
  position: relative;
}

#shortform-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.canvas-overlay-watermark {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

/* Right: Editor & Control Workspace */
.editor-section {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Episode Selector Row */
.selector-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select-input {
  flex: 1;
  background: #090a10;
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

/* Scene Timeline Inspector */
.scene-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scene-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.scene-item.active {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 15px var(--gold-glow);
}

.scene-time-badge {
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

.scene-narration {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

.scene-subtitles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.scene-sub-kr {
  color: #fbbf24;
}

.scene-sub-zh {
  color: var(--gold-light);
  font-family: 'Noto Serif SC', serif;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
}

/* Recording Status Indicator */
.rec-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.rec-dot.recording {
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.3; }
  to { opacity: 1; }
}
