/*
 * ============================================================
 * 3C Content Template Engine — Dark Purple Edition
 * Designed & built with ❤️ by Claude (Anthropic) × Chef Anica
 * 3C Thread To Success Cooking Lab 🧪👨‍🍳
 * ============================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&family=Outfit:wght@300;400;500;600;700&family=Syne:wght@600;700;800&display=swap');

/* ============================================================
   DARK PURPLE VARIABLE OVERRIDES
   These override the inline :root in index.html
   ============================================================ */
:root {
  /* Core palette */
  --bg:              #0a0714;
  --surface:         #130f24;
  --surface-2:       #0e0b1e;
  --surface-3:       #1c1638;
  --border:          #261a4e;
  --border-light:    #362762;

  /* Accent */
  --accent:          #7c3aed;
  --accent-light:    #a855f7;
  --accent-dim:      #5b21b6;
  --accent-glow:     rgba(124, 58, 237, 0.28);

  /* Text */
  --text-primary:    #e2d9f3;
  --text-secondary:  #9d8bbf;
  --text-muted:      #594a7a;
  --text-accent:     #c4b5f5;

  /* Status */
  --success:         #22c55e;
  --success-bg:      rgba(34, 197, 94, 0.1);
  --warning:         #f59e0b;
  --danger:          #dc2626;
  --danger-bg:       rgba(220, 38, 38, 0.12);
  --info:            #38bdf8;

  /* Override inline vars — the inline style uses these exact names */
  --primary-600:     #7c3aed;
  --primary-700:     #5b21b6;
  --primary-500:     #a855f7;
  --primary-50:      #130f24;
  --primary-100:     #1c1638;
  --primary-200:     #261a4e;
  --primary-800:     #c4b5f5;
  --gray-50:         #0a0714;
  --gray-100:        #130f24;
  --gray-200:        #1c1638;
  --gray-300:        #261a4e;
  --gray-400:        #594a7a;
  --gray-500:        #6b5a8e;
  --gray-600:        #9d8bbf;
  --gray-700:        #c4b5f5;
  --gray-800:        #d8cfef;
  --gray-900:        #e2d9f3;
  --success-100:     rgba(34, 197, 94, 0.12);
  --success-500:     #22c55e;
  --success-600:     #16a34a;
  --error-100:       rgba(220, 38, 38, 0.12);
  --error-500:       #ef4444;
  --warning-500:     #f59e0b;

  /* Radius & spacing carry over */
  --shadow-md:       0 4px 20px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-lg:       0 10px 40px rgba(0,0,0,0.6);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Outfit', sans-serif !important;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  background: linear-gradient(135deg, #1c0a3e 0%, #0a0714 100%) !important;
  border-bottom: 1.5px solid var(--border-light);
  box-shadow: 0 2px 24px rgba(0,0,0,0.6) !important;
}

.app-title {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: var(--accent-light) !important;
  letter-spacing: -0.01em;
}

.app-subtitle {
  color: var(--text-secondary) !important;
  letter-spacing: 0.12em;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  text-transform: uppercase;
}

/* Header credit hidden — watermark lives in the footer instead */
.header-credit {
  display: none;
}

/* Header buttons */
.btn-outline,
.header-buttons .btn-outline {
  background: transparent !important;
  color: var(--text-accent) !important;
  border: 1px solid var(--border-light) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.btn-outline:hover {
  background: var(--surface-3) !important;
  border-color: var(--accent-light) !important;
  color: var(--accent-light) !important;
}

/* ============================================================
   CONNECTION STATUS
   ============================================================ */
.connection-status {
  font-family: 'Outfit', sans-serif;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
}

.connection-status.connected {
  background: var(--success-bg) !important;
  color: var(--success) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.connection-status.disconnected {
  background: var(--danger-bg) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
  background: var(--bg);
}

/* ============================================================
   TEMPLATE BUILDER CONTAINER
   ============================================================ */
.template-builder {
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}

.builder-header {
  background: var(--surface-2) !important;
  border-bottom: 1.5px solid var(--border) !important;
}

.builder-header h1,
.builder-header h2 {
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-accent) !important;
}

.builder-header p {
  color: var(--text-secondary) !important;
  font-size: 0.85em !important;
}

.builder-body {
  background: var(--surface);
  padding: 2rem;
}

/* ============================================================
   PROGRESS STEPS
   ============================================================ */
.progress-steps {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
}

.step-indicator {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.step-indicator.active {
  color: var(--accent-light) !important;
}

.step-indicator.completed {
  color: var(--success) !important;
}

.step-number {
  background: var(--border-light) !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  width: 28px !important;
  height: 28px !important;
}

.step-indicator.active .step-number {
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 0 12px var(--accent-glow);
}

.step-indicator.completed .step-number {
  background: var(--success) !important;
  color: #fff !important;
}

/* ============================================================
   SELECTION PHASE
   ============================================================ */
.choice-section {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
}

.section-title {
  color: var(--text-accent) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
}

.required-mark {
  color: #f87171 !important;
}

.field-label,
.choice-field label {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.field-select,
select.template-field,
select.field-select {
  background: var(--surface) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: 7px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-select:focus,
select.template-field:focus {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
  outline: none !important;
}

.field-select.completed {
  border-color: var(--success) !important;
  background: rgba(34, 197, 94, 0.06) !important;
}

option {
  background: var(--surface) !important;
  color: var(--text-primary) !important;
}

/* ============================================================
   TEMPLATE ID DISPLAY
   ============================================================ */
.template-id-display {
  background: linear-gradient(135deg, #1a0a3e 0%, #0d0920 100%) !important;
  border: 1.5px solid var(--border-light) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 24px rgba(124,58,237,0.2);
}

.template-id-label {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.template-id-value {
  color: var(--success) !important;
  font-family: 'SF Mono', 'Cascadia Code', 'Courier New', monospace !important;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.55);
}

.template-id-breakdown {
  color: var(--text-secondary) !important;
}

/* ============================================================
   CREATION PHASE — PLATFORM INFO & SPECS
   ============================================================ */
.platform-info {
  background: rgba(124, 58, 237, 0.06) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 10px !important;
}

.platform-info h4,
.platform-info .info-text {
  color: var(--text-accent) !important;
}

.platform-specs {
  gap: 8px;
}

.spec-item {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
}

.spec-label {
  color: var(--text-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.spec-value {
  color: var(--text-accent) !important;
  font-weight: 700 !important;
}

/* ============================================================
   CONTENT FIELDS
   ============================================================ */
.content-field {
  background: transparent;
}

.field-label,
label.field-label {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-input,
textarea.field-input,
input.field-input,
.content-input,
textarea.content-input,
input.content-input {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.field-input:focus,
.content-input:focus,
textarea:focus,
input[type="text"]:focus {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
  outline: none !important;
}

.field-input::placeholder,
.content-input::placeholder,
textarea::placeholder,
input::placeholder {
  color: var(--text-muted) !important;
  opacity: 1;
}

.char-counter,
.char-limit {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.char-counter.warning,
.char-limit.warning {
  color: var(--warning) !important;
}

.char-counter.error {
  color: #f87171 !important;
}

.field-tips {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-style: normal !important;
  letter-spacing: 0.2px;
}

/* ============================================================
   HASHTAG SECTION
   ============================================================ */
.hashtag-section {
  background: var(--surface-2) !important;
  border: 1.5px solid rgba(34, 197, 94, 0.35) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.1) !important;
}

.hashtag-section h4,
.hashtag-section label {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hashtag-input-row {
  gap: 8px;
}

.hashtag-input,
input#hashtag-input,
input.hashtag-input {
  background: var(--surface) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: 7px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  transition: border-color 0.15s;
}

.hashtag-input:focus {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
  outline: none !important;
}

.hashtag-list {
  background: var(--surface) !important;
  border: 1px dashed var(--border-light) !important;
  border-radius: 8px !important;
  min-height: 44px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag-tag {
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--success) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.13s;
}

.hashtag-tag:hover {
  background: rgba(34, 197, 94, 0.2) !important;
}

.remove-hashtag {
  color: var(--text-secondary) !important;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  transition: color 0.13s;
}

.remove-hashtag:hover {
  color: #f87171 !important;
}

.hashtag-count {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* ============================================================
   BUTTONS — FULL DARK THEME
   ============================================================ */
.btn {
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  letter-spacing: 0.2px;
  transition: all 0.15s !important;
}

.btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid var(--accent) !important;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dim) !important;
  box-shadow: 0 0 16px var(--accent-glow) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: var(--surface-3) !important;
  color: var(--text-accent) !important;
  border: 1px solid var(--border-light) !important;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-light) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

.btn-success {
  background: #15803d !important;
  color: #fff !important;
  border: 1px solid #16a34a !important;
}

.btn-success:hover:not(:disabled) {
  background: #166534 !important;
  transform: translateY(-1px) !important;
}

.btn-info {
  background: rgba(56, 189, 248, 0.12) !important;
  color: var(--info) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.btn-info:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.22) !important;
}

.btn-danger {
  background: var(--danger-bg) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger) !important;
  color: #fff !important;
}

.btn:disabled {
  opacity: 0.28 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ============================================================
   ACTION BUTTONS ROW
   ============================================================ */
.action-buttons {
  border-top: 1px solid var(--border) !important;
}

.template-actions {
  border-top: 1px solid var(--border) !important;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   PLATFORM CARDS (from script.js renderPlatformsGrid)
   ============================================================ */
.platform-card {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 14px !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.platform-card:hover {
  border-color: var(--accent-light) !important;
  background: rgba(124, 58, 237, 0.08) !important;
  box-shadow: 0 0 16px var(--accent-glow) !important;
}

.platform-card.selected {
  border-color: var(--accent) !important;
  background: rgba(124, 58, 237, 0.14) !important;
  box-shadow: 0 0 20px var(--accent-glow) !important;
}

.platform-name {
  color: var(--text-accent) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  margin-bottom: 6px;
}

.feature-tag {
  background: rgba(124, 58, 237, 0.12) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 2px 6px !important;
  display: inline-block;
  margin: 2px 2px 2px 0;
  text-transform: capitalize;
}

.feature-more {
  color: var(--text-muted) !important;
  font-size: 10px !important;
  font-weight: 700;
}

.platform-limits small {
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.platform-instruction {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  margin-top: 10px;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ============================================================
   TEMPLATE HEADER (inside form)
   ============================================================ */
.template-header h3 {
  color: var(--text-accent) !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
}

.template-meta {
  margin-top: 12px;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.meta-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meta-field label {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* ============================================================
   BUILDER HEADER ACTIONS
   ============================================================ */
.builder-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

/* ============================================================
   PLATFORM OVERVIEW SECTION
   ============================================================ */
.platform-overview h3 {
  color: var(--text-accent) !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  margin-bottom: 12px;
}

/* ============================================================
   NOTIFICATION TOASTS
   ============================================================ */
.notification {
  background: var(--surface) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-primary) !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 8px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  max-width: 380px;
}

.notification-success {
  border-left-color: var(--success) !important;
  background: rgba(34, 197, 94, 0.06) !important;
  color: #86efac !important;
}

.notification-error {
  border-left-color: var(--danger) !important;
  background: var(--danger-bg) !important;
  color: #fca5a5 !important;
}

.notification-warning {
  border-left-color: var(--warning) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  color: #fcd34d !important;
}

.notification-close {
  background: none !important;
  border: none !important;
  color: inherit !important;
  cursor: pointer;
  font-size: 1.1em;
  opacity: 0.6;
  padding: 0 4px;
}

.notification-close:hover { opacity: 1; }

/* ============================================================
   MODAL
   ============================================================ */
.modal,
.modal-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-light) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7) !important;
  border-radius: 14px !important;
  color: var(--text-primary) !important;
}

.modal-header {
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 14px 14px 0 0 !important;
}

.modal-header h3 {
  color: var(--text-accent) !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
}

.modal-close {
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
  border-radius: 6px !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1em;
  transition: background 0.13s, color 0.13s;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
}

.modal-close:hover {
  background: var(--danger) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
}

.modal-body {
  padding: 20px 24px !important;
}

/* Modal content inner elements */
.template-loader,
.labels-manager,
.audience-manager,
.hashtag-suggestions,
.generation-success,
.forward-options,
.template-preview {
  color: var(--text-primary);
}

.template-item {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-item h4 {
  color: var(--text-accent) !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  margin-bottom: 4px;
}

.template-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-details span {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  background: var(--surface-3) !important;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Labels / audiences manager */
.label-item,
.audience-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 7px !important;
  padding: 8px 12px !important;
  margin-bottom: 6px;
  color: var(--text-primary) !important;
}

.remove-btn {
  background: none !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0 4px;
  transition: color 0.13s;
}

.remove-btn:hover { color: #f87171 !important; }

.add-label-form,
.add-audience-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.add-label-form input,
.add-audience-form input,
input#new-label,
input#new-audience {
  flex: 1;
  background: var(--surface) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: 7px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
}

.add-label-form input:focus,
.add-audience-form input:focus {
  border-color: var(--accent-light) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

/* Hashtag suggestions */
.suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggestion-tag {
  background: rgba(124, 58, 237, 0.12) !important;
  color: var(--accent-light) !important;
  border: 1px solid rgba(124, 58, 237, 0.3) !important;
  border-radius: 20px !important;
  padding: 5px 13px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background 0.13s;
}

.suggestion-tag:hover:not(:disabled) {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

.suggestion-tag:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Preview modal */
.preview-header h4 {
  color: var(--text-accent) !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  margin-bottom: 8px;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.meta-tag {
  background: rgba(124, 58, 237, 0.12) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 5px;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
}

.preview-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.preview-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.preview-section strong {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: block;
  margin-bottom: 5px;
}

.preview-text {
  color: var(--text-primary) !important;
  font-size: 13px !important;
  line-height: 1.6;
}

.preview-hashtag {
  color: var(--accent-light) !important;
  font-weight: 700;
  margin-right: 5px;
}

.brand-voice-note {
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 12px !important;
}

/* Generation success */
.generation-success .success-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
}

.generation-success h4,
.forward-options h4 {
  color: var(--text-accent) !important;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  margin-bottom: 10px;
}

.template-summary {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 14px !important;
  margin-bottom: 14px;
}

.template-summary p {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  margin-bottom: 4px;
}

.template-summary p strong {
  color: var(--text-accent) !important;
}

.next-steps p {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  margin-bottom: 12px;
}

.team-members {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-btn {
  width: 100% !important;
  justify-content: flex-start !important;
  padding: 10px 14px !important;
}

/* Modal action buttons */
.modal-btn {
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}

.modal-btn-primary {
  background: var(--success) !important;
  color: #fff !important;
  border: 1px solid var(--success) !important;
}

.modal-btn-primary:hover {
  background: var(--success-600) !important;
}

.modal-btn-secondary {
  background: rgba(124, 58, 237, 0.1) !important;
  color: var(--accent-light) !important;
  border: 1px solid rgba(124, 58, 237, 0.3) !important;
}

.modal-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.2) !important;
}

.modal-btn-outline {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-light) !important;
}

.modal-btn-outline:hover {
  background: var(--surface-3) !important;
}

.recommended-badge {
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--success) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  border-radius: 20px !important;
}

/* ============================================================
   TEMPLATE INFO / TEMPLATE ID BLOCK (in modals)
   ============================================================ */
.template-info {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
}

.template-id {
  color: var(--accent-light) !important;
  font-family: 'SF Mono', monospace !important;
}

.template-date {
  color: var(--text-muted) !important;
}

.template-title {
  color: var(--text-accent) !important;
  font-weight: 700 !important;
}

/* ============================================================
   SCROLLBAR (dark)
   ============================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   FOCUS
   ============================================================ */
*:focus-visible {
  outline: 2px solid var(--accent-light) !important;
  outline-offset: 2px;
}

/* ============================================================
   WATERMARK FOOTER
   ============================================================ */
.app-footer-watermark {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.app-footer-watermark strong {
  color: var(--accent-light);
  font-weight: 700;
}

.app-footer-watermark a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.app-footer-watermark a:hover {
  color: var(--accent-light);
}

/* ============================================================
   SECTION GLOW BORDERS — visual guidance in dark mode
   Helps users identify interactive areas at a glance
   ============================================================ */

/* Page 1 — Selection sections: purple glow */
.choice-section {
  background: var(--surface-2) !important;
  border: 1.5px solid rgba(124, 58, 237, 0.45) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.1) !important;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.choice-section:focus-within {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.22) !important;
}

/* Template ID container — green glow */
.template-id-display {
  border: 1.5px solid rgba(34, 197, 94, 0.4) !important;
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.12) !important;
}

/* Page 2 — Content field containers: green glow matching hashtags */
.content-field {
  padding: 14px 16px !important;
  background: var(--surface-2) !important;
  border: 1.5px solid rgba(34, 197, 94, 0.35) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.08) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.content-field:focus-within {
  border-color: rgba(34, 197, 94, 0.65) !important;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.18) !important;
}

/* Platform info container */
.platform-info {
  border: 1.5px solid rgba(124, 58, 237, 0.3) !important;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.08) !important;
}

/* Template actions row */
.template-actions {
  background: var(--surface-2) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  margin-top: 16px;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS (dark overrides)
   ============================================================ */
@media (max-width: 768px) {
  .meta-row {
    grid-template-columns: 1fr;
  }

  .template-actions {
    flex-direction: column;
  }

  .builder-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
