*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-subtle: rgba(99, 102, 241, 0.08);
  --primary-border: rgba(99, 102, 241, 0.2);
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --bg-app: #09090b;
  --bg-sidebar: #0c0c0f;
  --bg-main: #09090b;
  --bg-panel: #111114;
  --bg-elevated: #18181b;
  --bg-input: #0c0c0f;
  --bg-hover: #1c1c20;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --text-inverse: #09090b;

  --border: #27272a;
  --border-subtle: #1e1e21;
  --border-active: #3f3f46;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);

  --sidebar-width: 240px;
  --topbar-height: 60px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html,
body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.brand-logo {
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-subtle);
  color: var(--primary);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.model-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
}

.model-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.model-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-left: 16px;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Top Bar */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.page-title {
  font-size: 1rem;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.credit-badge svg {
  color: var(--warning);
}

/* Tab Content */
.tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
  padding: 24px;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 100%;
  min-height: 0;
}

/* Panel */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.panel-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.panel-body {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Textarea */
.input-panel textarea {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.8;
  resize: none;
  transition: border-color 0.2s;
}

.input-panel textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.input-panel textarea::placeholder {
  color: var(--text-muted);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.char-indicator {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.shortcut-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Quick Options */
.quick-options {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 50px;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.toggle-options {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toggle-item input {
  display: none;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  position: relative;
  transition: all 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle-item input:checked+.toggle-switch {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-item input:checked+.toggle-switch::after {
  left: 16px;
  background: white;
}

.hashtag-count-wrap select {
  padding: 4px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Buttons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary.btn-sm {
  width: auto;
  margin-top: 0;
  padding: 6px 12px;
  font-size: 0.75rem;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.btn-ghost.btn-sm {
  padding: 4px 10px;
  font-size: 0.7rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-primary);
}

/* Output Panel */
.output-body {
  padding: 0 !important;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  flex: 1;
}

.empty-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Loading */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  flex: 1;
}

.loading-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.loading-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Result */
.result-state {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}

.result-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.result-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.result-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.result-content {
  padding: 16px;
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.result-full {
  border-color: var(--primary-border);
}

.result-full .result-section-header {
  background: var(--primary-subtle);
}

.result-full .result-label {
  color: var(--primary);
}

/* Hashtags */
.hashtags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
}

.hashtag-chip {
  padding: 4px 10px;
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.hashtag-chip:hover {
  background: var(--primary);
  color: white;
}

/* Tips */
.result-tips {
  border-color: rgba(245, 158, 11, 0.2);
}

.result-tips .result-section-header {
  background: rgba(245, 158, 11, 0.05);
}

.result-tips .result-label {
  color: var(--warning);
}

/* Thumbnail Titles */
.result-thumbnails {
  border-color: rgba(236, 72, 153, 0.2);
}

.result-thumbnails .result-section-header {
  background: rgba(236, 72, 153, 0.05);
}

.result-thumbnails .result-label {
  color: #ec4899;
}

.thumbnail-titles-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}

.thumbnail-title-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.thumbnail-title-item:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.05);
}

.thumbnail-title-num {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 72, 153, 0.15);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: #ec4899;
  flex-shrink: 0;
}

.thumbnail-title-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.tips-list {
  list-style: none;
  padding: 12px 14px;
}

.tips-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tips-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--warning);
}

/* Agent Chat */
.agent-panel {
  height: 100%;
}

.agent-body {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.model-select {
  padding: 5px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.75rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  flex: 1;
}

.welcome-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-welcome h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.chat-welcome p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.welcome-chip {
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.welcome-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
}

.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg.user .chat-msg-avatar {
  background: var(--primary);
  color: white;
}

.chat-msg.assistant .chat-msg-avatar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.chat-msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.7;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-msg.user .chat-msg-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant .chat-msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-msg-model {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 42px;
}

.chat-msg.user .chat-msg-model {
  text-align: right;
  padding-left: 0;
  padding-right: 42px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: fit-content;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-4px);
  }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  transition: border-color 0.2s;
}

.chat-input-wrap:focus-within {
  border-color: var(--primary);
}

.chat-input-wrap textarea {
  flex: 1;
  min-height: 20px;
  max-height: 120px;
  padding: 4px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
  resize: none;
  font-family: var(--font-sans);
  overflow-y: auto;
}

.chat-input-wrap textarea:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

.chat-send-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.chat-input-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.agent-model-indicator {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* History */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.history-item:hover {
  border-color: var(--border-active);
}

.history-item-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.history-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Settings */
.settings-body {
  gap: 24px;
}

.settings-group h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-item label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.setting-input {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  min-width: 160px;
}

.setting-input:disabled {
  opacity: 0.6;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  color: var(--text-primary);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -var(--sidebar-width);
    top: 0;
    bottom: 0;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tab-content {
    padding: 16px;
  }
}

/* Title-protected generation controls */
.movie-meta-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-label span {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
}

.meta-input,
.input-panel .meta-aliases {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
}

.input-panel .meta-aliases {
  flex: none;
  min-height: 64px;
  line-height: 1.5;
  resize: vertical;
}

.meta-input:focus,
.input-panel .meta-aliases:focus {
  outline: none;
  border-color: var(--primary);
}

/* Only Ready to Post and thumbnail suggestions are user-facing. */
.output-panel>.panel-header,
#resultState>.result-section:first-child,
#hashtagsSection,
.result-tips {
  display: none !important;
}

.result-state {
  min-height: 100%;
}

.result-full {
  display: flex;
  flex: 1;
  min-height: 360px;
  flex-direction: column;
}

.result-full-content {
  flex: 1;
  width: 100%;
  min-height: 300px;
  resize: vertical;
  background: var(--bg-input);
  border: 0;
  outline: none;
  font-family: var(--font-sans);
}

.result-full-content:focus {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.validation-status {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.validation-status.passed {
  color: var(--success);
  background: rgba(16, 185, 129, 0.06);
}

.thumbnail-title-item {
  width: 100%;
  font-family: inherit;
  text-align: left;
}

.history-item {
  width: 100%;
  font-family: inherit;
  text-align: left;
}