/* Page-specific styles — core styles in design-system.css + components.css + layouts.css */

:root {
  --sora-bg: #0b1220;
  --sora-panel: #0f172a;
  --sora-card: #111c34;
  --sora-border: rgba(148,163,184,0.18);
  --sora-text: #e5e7eb;
  --sora-muted: #94a3b8;
  --sora-accent: #6366f1;
  --sora-accent-2: #22c55e;
  --sora-danger: #ef4444;
}

.sora-container {
  display: flex;
  height: calc(100vh - 120px);
}

.sora-sidebar {
  width: 420px;
  flex-shrink: 0;
  border-right: 1px solid var(--sora-border);
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(10px);
  padding: 18px;
  overflow: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--sora-text);
}

.oss-status {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,0.35);
  color: #86efac;
  background: rgba(34,197,94,0.08);
}

.form-group {
  margin-top: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--sora-muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.duration-options {
  display: flex;
  gap: 10px;
}

.duration-btn {
  flex: 1;
  border: 1px solid var(--sora-border);
  border-radius: 12px;
  background: rgba(2,6,23,0.55);
  color: var(--sora-text);
  padding: 10px;
  cursor: pointer;
  font-weight: 900;
}

.duration-btn.active {
  border-color: rgba(99,102,241,0.8);
  background: rgba(99,102,241,0.18);
}

.btn-primary {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
}

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

.fixed-badge {
  width: 100%;
  border: 1px solid var(--sora-border);
  border-radius: 12px;
  background: rgba(99,102,241,0.1);
  color: var(--sora-accent);
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  text-align: center;
}

.history-section {
  margin-top: 18px;
}

.history-section h3 {
  margin: 0 0 10px 0;
  color: var(--sora-muted);
  font-size: 12px;
  font-weight: 900;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sora-upload-zone {
  border: 1px solid var(--sora-border);
  border-radius: 14px;
  background: rgba(2,6,23,0.30);
  padding: 12px;
}

.upload-btn-wrapper {
  position: relative;
  border: 1px dashed rgba(148,163,184,0.35);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--sora-text);
  font-weight: 900;
  cursor: pointer;
  background: rgba(2,6,23,0.25);
}

.upload-btn-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.preview-strip {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-strip img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--sora-border);
}

.preview-strip .preview-item {
  position: relative;
}

.preview-strip .btn-delete-img {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--sora-border);
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

#noImageText {
  color: var(--sora-muted);
  font-size: 12px;
  font-weight: 800;
}

.switches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--sora-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(2,6,23,0.25);
  color: var(--sora-text);
  font-weight: 900;
  font-size: 12px;
}

.switch-item input {
  width: 16px;
  height: 16px;
}

.history-item {
  border: 1px solid var(--sora-border);
  border-radius: 12px;
  background: rgba(2,6,23,0.35);
  padding: 10px;
  cursor: pointer;
}

.history-item:hover {
  border-color: rgba(99,102,241,0.45);
}

.history-item .title {
  color: var(--sora-text);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.history-item .meta {
  color: var(--sora-muted);
  font-size: 11px;
}

.sora-main {
  flex: 1;
  padding: 22px;
  overflow: auto;
}

.empty-display,
.loading-display {
  border: 1px dashed var(--sora-border);
  border-radius: 18px;
  background: rgba(2,6,23,0.20);
  height: 100%;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--sora-text);
  text-align: center;
}

.icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.25);
  margin-bottom: 12px;
  font-size: 26px;
}

.spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(148,163,184,0.2);
  border-top-color: #a5b4fc;
  animation: spin 0.9s linear infinite;
  margin-bottom: 14px;
}

.progress-bar {
  width: min(520px, 90%);
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.15);
  overflow: hidden;
  margin-top: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #6366f1 60%, #8b5cf6 100%);
}

.result-display {
  height: 100%;
  min-height: 520px;
}

.video-card {
  border: 1px solid var(--sora-border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2,6,23,0.30);
}

video {
  width: 100%;
  max-height: 70vh;
  background: #000;
}

.video-info {
  padding: 14px;
}

.video-info p {
  margin: 0 0 12px 0;
  color: var(--sora-muted);
  font-size: 12px;
  line-height: 1.5;
}

.action-btns {
  display: flex;
  gap: 10px;
}

.btn-outline {
  flex: 1;
  border: 1px solid var(--sora-border);
  background: transparent;
  color: var(--sora-text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary-sm {
  flex: 1;
  border: none;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .sora-container { flex-direction: column; height: auto; }
  .sora-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--sora-border); }
  .sora-main { min-height: 60vh; }
}
