/* ============================================================
   Eu Essência — Premium Light Theme
   Clean, elegant editorial interface
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;
  --bg-input: #F3F4F6;
  --border-color: #E5E7EB;
  --border-hover: #D1D5DB;
  --accent-primary: #1A1A1A;
  --accent-primary-hover: #333333;
  --accent-secondary: #6B7280;
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.08);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.08);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-primary);
  color: #FFFFFF;
}

/* Scrollbar — Light */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

/* ============================================================
   2. HEADER
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow var(--transition-base);
}

.app-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--accent-primary);
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition-base);
}

.status-connected .status-dot {
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-disconnected .status-dot {
  background: var(--error);
}

.status-label {
  white-space: nowrap;
}

.btn-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-settings:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-settings svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}

.btn-settings:hover svg {
  transform: rotate(45deg);
}

/* ============================================================
   3. MAIN TABS
   ============================================================ */
.main-tabs {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.main-tabs-nav {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}

.main-tab-btn {
  padding: 12px 28px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.main-tab-btn:hover {
  color: var(--text-secondary);
}

.main-tab-btn.active {
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.main-tab-btn:not(.active) {
  border-bottom: 2px solid transparent;
}

.main-tab-content {
  display: none;
}

.main-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

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

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Primary */
.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-input);
  color: var(--text-primary);
}

/* Icon */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-input);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Loading State */
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn.loading .btn-text {
  visibility: hidden;
}

.btn-loader {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-loader span {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  animation: bounce-loader 0.6s ease-in-out infinite;
}

.btn-loader span:nth-child(2) {
  animation-delay: 0.1s;
}

.btn-loader span:nth-child(3) {
  animation-delay: 0.2s;
}

/* ============================================================
   5. CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-input);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-icon-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-input);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.card-icon-preview svg {
  width: 22px;
  height: 22px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   6. MAIN CONTENT
   ============================================================ */
.main-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================================
   7. EXTRACT SECTION
   ============================================================ */
.extract-form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-url {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.input-url::placeholder {
  color: var(--text-muted);
}

.input-url:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  background: var(--bg-primary);
}

.btn-extract {
  padding: 12px 28px;
  font-weight: 700;
  position: relative;
}

.btn-extract:hover {
  transform: none !important;
}

/* ============================================================
   8. PREVIEW SECTION
   ============================================================ */
.preview-section {
  animation: slideUp 0.5s var(--transition-spring) forwards;
}

.preview-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-title {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.input-title:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  background: var(--bg-primary);
}

.input-title::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Content Tabs */
.content-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab-btn {
  padding: 6px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.content-pane {
  display: none;
}

.content-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Visual Content */
.content-visual {
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-primary);
  max-height: 500px;
  overflow-y: auto;
}

.content-visual h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.content-visual h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.content-visual h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text-primary);
}

.content-visual p {
  margin-bottom: 14px;
}

.content-visual a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition-fast);
}

.content-visual a:hover {
  opacity: 0.7;
}

.content-visual blockquote {
  margin: 16px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent-primary);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.content-visual ul,
.content-visual ol {
  margin: 12px 0;
  padding-left: 24px;
}

.content-visual li {
  margin-bottom: 6px;
}

.content-visual img {
  border-radius: 8px;
  margin: 16px 0;
}

/* HTML Content */
.content-html {
  padding: 20px;
  background: var(--accent-primary);
  color: var(--success);
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

/* Preview Meta */
.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.meta-item strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Preview Actions */
.preview-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
}

/* ============================================================
   9. FEATURED IMAGE UPLOAD
   ============================================================ */
.featured-image-section {
  margin-top: 4px;
}

.featured-image-upload {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.featured-image-upload:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.featured-image-upload.drag-active {
  border-color: var(--accent-primary);
  background: var(--bg-input);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.upload-icon svg {
  width: 48px;
  height: 48px;
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.featured-image-preview {
  position: relative;
  display: inline-block;
  width: 100%;
}

.featured-image-preview img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

.featured-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--error);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.featured-image-remove:hover {
  background: #DC2626;
  transform: scale(1.1);
}

.featured-image-remove svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   10. SEO PANEL
   ============================================================ */
.seo-panel {
  margin-top: 4px;
}

.seo-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.seo-toggle:hover {
  background: var(--bg-input);
}

.seo-toggle-icon {
  display: flex;
  align-items: center;
  transition: transform var(--transition-base);
  color: var(--text-muted);
}

.seo-toggle-icon svg {
  width: 20px;
  height: 20px;
}

.seo-toggle-icon.open {
  transform: rotate(180deg);
}

.seo-panel-content {
  display: none;
  padding-top: 16px;
}

.seo-panel-content.open {
  display: block;
  animation: fadeIn 0.25s ease;
}

.seo-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.seo-input,
.seo-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.seo-textarea {
  resize: vertical;
  min-height: 80px;
}

.seo-input:focus,
.seo-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  background: var(--bg-primary);
}

.seo-input::placeholder,
.seo-textarea::placeholder {
  color: var(--text-muted);
}

.char-counter {
  font-size: 0.72rem;
  float: right;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: var(--error);
}

/* SEO Preview (Google snippet) */
.seo-preview {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-card-hover);
  margin-top: 8px;
}

.seo-preview-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a0dab;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 4px;
}

.seo-preview-url {
  font-size: 0.82rem;
  color: #006621;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-preview-description {
  font-size: 0.85rem;
  color: #545454;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category & Tags */
.category-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  transition: all var(--transition-fast);
}

.category-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.tags-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.tags-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  background: var(--bg-primary);
}

.tags-input::placeholder {
  color: var(--text-muted);
}

/* ============================================================
   11. EDITOR SECTION
   ============================================================ */
.editor-section {
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toolbar-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.toolbar-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.toolbar-btn svg {
  width: 18px;
  height: 18px;
}

.toolbar-separator {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 5px 4px;
  align-self: center;
}

.editor-content {
  min-height: 300px;
  padding: 20px;
  border: 1.5px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.editor-content:focus {
  border-color: var(--accent-primary);
}

.editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   12. SUCCESS SECTION
   ============================================================ */
.success-section {
  animation: slideUp 0.5s var(--transition-spring) forwards;
  text-align: center;
  padding: 48px 28px;
}

.success-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--success-bg);
  animation: success-pop 0.6s var(--transition-spring) forwards;
}

.success-checkmark {
  color: var(--success);
}

.success-checkmark svg {
  width: 40px;
  height: 40px;
  animation: draw-check 0.4s 0.3s ease forwards;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.success-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.success-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   13. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
  padding: 24px;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.35s var(--transition-spring) forwards;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.btn-close-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--error-bg);
  color: var(--error);
  transform: rotate(90deg);
}

.btn-close-modal svg {
  width: 20px;
  height: 20px;
}

.settings-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-field {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  background: var(--bg-primary);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .input-field {
  padding-right: 44px;
}

.btn-toggle-pw {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-toggle-pw:hover {
  color: var(--text-primary);
}

.btn-toggle-pw svg {
  width: 18px;
  height: 18px;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.settings-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 0 24px 24px;
}

.settings-feedback {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

.settings-feedback.success {
  background: var(--success-bg);
  color: var(--success);
}

.settings-feedback.error {
  background: var(--error-bg);
  color: var(--error);
}

/* ============================================================
   14. TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastIn 0.4s var(--transition-spring) forwards;
  max-width: 380px;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success {
  border-left: 3px solid var(--success);
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--error);
  color: var(--error);
}

.toast-info {
  border-left: 3px solid var(--accent-secondary);
  color: var(--accent-secondary);
}

/* ============================================================
   15. UTILITY
   ============================================================ */
.hidden {
  display: none !important;
}

/* ============================================================
   16. ANIMATIONS
   ============================================================ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes success-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes draw-check {
  from {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes bounce-loader {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
}

/* ============================================================
   17. RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .main-content {
    padding: 20px 16px 40px;
  }

  .card {
    padding: 20px;
  }

  .input-group {
    flex-direction: column;
  }

  .btn-extract {
    width: 100%;
  }

  .header-inner {
    padding: 0 16px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .status-label {
    display: none;
  }

  .preview-actions {
    flex-direction: column-reverse;
  }

  .preview-actions .btn {
    width: 100%;
  }

  .settings-actions {
    flex-direction: column-reverse;
  }

  .settings-actions .btn {
    width: 100%;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: 100%;
  }

  .main-tabs-nav {
    padding: 0;
    width: 100%;
  }

  .main-tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
  }

  .editor-toolbar {
    flex-wrap: wrap;
  }

  .success-section {
    padding: 32px 20px;
  }

  .modal {
    margin: 16px;
    max-width: 100%;
  }

  .modal-overlay {
    padding: 16px;
  }

  .featured-image-upload {
    padding: 24px 16px;
  }
}
