/* ==========================================================================
   Modern Social Mock Comment Generator
   Ultra-Responsive (Mobile & Desktop) + Mindblowing Animation System
   ========================================================================== */

:root {
  --bg-app: #f8fafc;
  --bg-panel: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent: #0f172a;
  --accent-hover: #1e293b;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

.dark-mode-app {
  --bg-app: #080c16;
  --bg-panel: #0d121f;
  --bg-input: #151b2a;
  --border-color: #1e273a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f8fafc;
  --accent-hover: #e2e8f0;
  --accent-glow: rgba(129, 140, 248, 0.35);
  --shadow-card: 0 25px 50px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animations & Keyframes */
@keyframes logoBreathing {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.35));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(168, 85, 247, 0.55));
  }
}

@keyframes heartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45) rotate(-12deg); }
  65% { transform: scale(0.9) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes floatParticle {
  0% { opacity: 1; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.3); }
}

@keyframes shimmerGlow {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseBorder {
  0%, 100% { border-color: rgba(99, 102, 241, 0.3); }
  50% { border-color: rgba(168, 85, 247, 0.75); }
}

/* App Header */
.app-header {
  height: 56px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .app-header {
    padding: 0 24px;
    height: 60px;
  }
}

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

.brand-logo-container {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoBreathing 4s ease-in-out infinite;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .brand-title {
    font-size: 15px;
    gap: 8px;
  }
}

.brand-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* WhatsApp Header Buttons - Premium & Clean Fit */
.btn-wa-header, .btn-wa-channel-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  min-height: 34px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-wa-header {
  background: linear-gradient(135deg, #25D366 0%, #128c7e 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-wa-header:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7568 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

.btn-wa-channel-header {
  background: rgba(37, 211, 102, 0.12);
  color: #128c7e;
  border: 1px solid rgba(37, 211, 102, 0.38);
}

.dark-mode-app .btn-wa-channel-header {
  color: #25D366;
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.45);
}

.btn-wa-channel-header:hover {
  background: rgba(37, 211, 102, 0.25);
  border-color: #25D366;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .app-header {
    padding: 0 10px;
    height: 52px;
  }
  .header-actions {
    gap: 6px;
  }
  .btn-wa-header, .btn-wa-channel-header {
    padding: 5px 9px;
    font-size: 11px;
    min-height: 32px;
    height: 32px;
    gap: 4px;
  }
  .brand-logo-container {
    width: 32px;
    height: 32px;
  }
  .brand-title {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .app-header {
    padding: 0 8px;
  }
  .brand-wrapper {
    gap: 6px;
  }
  .brand-tag {
    display: none;
  }
  .btn-wa-header, .btn-wa-channel-header {
    padding: 5px 8px;
    font-size: 11px;
  }
}

@media (max-width: 350px) {
  .btn-channel-label {
    display: none;
  }
  .btn-wa-channel-header {
    padding: 5px 7px;
  }
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.btn-ghost:hover {
  background: var(--bg-input);
}

/* Mobile Nav Bar: Tabs on Phones / Tablets */
.mobile-nav-bar {
  display: flex;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 12px;
  gap: 8px;
  position: sticky;
  top: 56px;
  z-index: 40;
}

@media (max-width: 640px) {
  .mobile-nav-bar {
    top: 52px;
  }
}

@media (min-width: 1024px) {
  .mobile-nav-bar {
    display: none;
  }
}

.mobile-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}

.mobile-tab-btn.active {
  background: var(--accent);
  color: var(--bg-panel);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Split Screen Layout */
.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 56px);
  overflow: hidden;
  position: relative;
}

@media (max-width: 1023px) {
  .app-container {
    height: auto;
    overflow: visible;
  }

  .controls-panel.mobile-hidden,
  .preview-stage.mobile-hidden {
    display: none !important;
  }
}

/* Left Column: Controls Hub */
.controls-panel {
  width: 460px;
  min-width: 380px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1023px) {
  .controls-panel {
    width: 100%;
    min-width: unset;
    border-right: none;
  }
}

.panel-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 640px) {
  .panel-content {
    padding: 22px 24px;
    gap: 22px;
  }
}

.section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Platform Tabs */
.platform-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.platform-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 4px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 48px;
}

.platform-tab-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.platform-tab-btn:hover svg {
  transform: translateY(-2px);
}

.platform-tab-btn.active {
  background: var(--bg-panel);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

.platform-tab-btn.active.ig { color: #e1306c; }
.platform-tab-btn.active.yt { color: #ff0000; }
.platform-tab-btn.active.fb { color: #1877f2; }
.platform-tab-btn.active.tt { color: #111111; }
.dark-mode-app .platform-tab-btn.active.tt { color: #ffffff; }
.platform-tab-btn.active.x  { color: #000000; }
.dark-mode-app .platform-tab-btn.active.x  { color: #ffffff; }

/* Theme Selector */
.theme-switch {
  display: inline-flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.theme-btn {
  border: none;
  background: transparent;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-height: 28px;
}

.theme-btn.active {
  background: var(--bg-panel);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Quick Presets */
.presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 32px;
}

.preset-chip:hover {
  border-color: #6366f1;
  background: var(--bg-panel);
  transform: translateY(-1px) scale(1.02);
}

/* Inputs & Form Fields */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
  min-height: 40px;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: #6366f1;
  background: var(--bg-panel);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

/* Avatar Row */
.avatar-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-preview-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transition: transform 0.2s ease;
}

.avatar-preview-box:hover {
  transform: scale(1.06);
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  font-size: 11px;
  font-weight: 700;
}

.avatar-preview-box:hover .avatar-overlay {
  opacity: 1;
}

.avatar-presets {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.avatar-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.75;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.avatar-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.avatar-thumb.active {
  border-color: #6366f1;
  opacity: 1;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--bg-panel), 0 4px 10px rgba(99, 102, 241, 0.4);
}

.avatar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toggles & Checkbox Buttons */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-btn {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 42px;
}

.toggle-btn:hover {
  border-color: #94a3b8;
}

.toggle-btn.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
}

.dark-mode-app .toggle-btn.active {
  background: #1e1b4b;
  border-color: #818cf8;
  color: #e0e7ff;
}

.toggle-indicator {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.toggle-btn.active .toggle-indicator {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* Emoji Bar */
.emoji-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0;
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 32px;
  min-height: 32px;
}

.emoji-btn:hover {
  background: var(--bg-input);
  transform: scale(1.3) translateY(-2px);
}

/* Facebook Reactions Row */
.reactions-picker {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.reaction-opt {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 0;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reaction-opt:hover {
  transform: scale(1.25);
}

.reaction-opt.active {
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  transform: scale(1.2);
}

/* Right Column: Preview Stage */
.preview-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  min-height: 480px;
}

.dark-mode-app .preview-stage {
  background: #090d16;
}

.stage-toolbar {
  min-height: 52px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  gap: 8px;
}

@media (min-width: 768px) {
  .stage-toolbar {
    padding: 0 20px;
    height: 52px;
  }
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .stage-toolbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .toolbar-left {
    width: 100%;
    justify-content: space-between;
  }
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
}

.stage-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
  position: relative;
  min-height: 380px;
}

@media (min-width: 640px) {
  .stage-viewport {
    padding: 36px 24px;
  }
}

/* Backdrops */
.stage-viewport.bg-checker {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(100, 116, 139, 0.25) 1.2px, transparent 0);
  background-size: 16px 16px;
}

.dark-mode-app .stage-viewport.bg-checker {
  background-color: #0b0f19;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 0);
}

.stage-viewport.bg-slate {
  background: #0b0f19;
}

.stage-viewport.bg-gradient {
  background: radial-gradient(circle at 50% 50%, #2e1065 0%, #0f172a 65%, #020617 100%);
}

.stage-viewport.bg-white-clean {
  background: #ffffff;
}

/* Floating Card Container with 3D Tilt Hook */
.comment-card-wrapper {
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.comment-card-container {
  width: 440px;
  max-width: 100%;
  box-shadow: var(--shadow-card);
  border-radius: 18px;
  transition: width 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  user-select: none;
  transform-style: preserve-3d;
  position: relative;
}

/* Glowing Ambient Aura around Card */
.comment-card-container::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.3));
  z-index: -1;
  opacity: 0.65;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.comment-card-container:hover::before {
  opacity: 1;
  filter: blur(14px);
}

/* Stage Bottom Toolbar */
.stage-footer {
  min-height: 46px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  gap: 8px;
}

/* Primary Export Button - Perfectly Set */
.btn-export-primary {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  min-height: 38px;
  white-space: nowrap;
}

.dark-mode-app .btn-export-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-export-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
}

.btn-export-primary:active {
  transform: translateY(0);
}

/* Developer Contact Card in Controls */
.developer-contact-card {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.dev-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dev-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dev-online-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.dev-card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dev-status-tag {
  font-size: 10px;
  font-weight: 700;
  color: #25D366;
  background: rgba(37, 211, 102, 0.12);
  padding: 2px 7px;
  border-radius: 12px;
}

.dev-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.dev-button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 480px) {
  .dev-button-group {
    grid-template-columns: 1fr;
  }
}

.btn-wa-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 36px;
  white-space: nowrap;
}

.btn-wa-action.primary {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.btn-wa-action.primary:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}

.btn-wa-action.secondary {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-wa-action.secondary:hover {
  border-color: #25D366;
  color: #25D366;
  transform: translateY(-1px);
}

/* Card Quick Actions Bar Under Viewport */
.card-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-quick-export {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  transition: all 0.2s ease;
}

.dark-mode-app .btn-quick-export {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-quick-export:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.btn-quick-copy, .btn-quick-more {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-quick-copy:hover, .btn-quick-more:hover {
  background: var(--bg-input);
  transform: translateY(-1px);
}

.footer-center-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Beautiful WhatsApp Pill Buttons */
.btn-wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #25D366 0%, #128c7e 100%);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-wa-pill:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7568 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
  color: #ffffff;
}

.btn-wa-pill.channel {
  background: rgba(37, 211, 102, 0.12);
  color: #128c7e;
  border: 1px solid rgba(37, 211, 102, 0.35);
  box-shadow: none;
}

.dark-mode-app .btn-wa-pill.channel {
  color: #25D366;
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.45);
}

.btn-wa-pill.channel:hover {
  background: rgba(37, 211, 102, 0.25);
  border-color: #25D366;
  transform: translateY(-1px);
}

/* Floating Quick WhatsApp Action Button */
.floating-wa-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.floating-wa-btn:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7568 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6), 0 3px 10px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.floating-wa-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: var(--radius-full);
  border: 2px solid #25D366;
  opacity: 0;
  animation: waPulseRing 2.4s infinite;
  pointer-events: none;
}

@keyframes waPulseRing {
  0% { transform: scale(0.96); opacity: 0.8; }
  60% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.16); opacity: 0; }
}

@media (max-width: 1023px) {
  .floating-wa-btn {
    bottom: 74px;
    right: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .floating-wa-btn span {
    display: none;
  }
  .floating-wa-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--bg-panel);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-height: 36px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ==========================================================================
   Platform-Accurate Comment Markup Styles
   ========================================================================== */

/* Instagram Pro Style */
.comment-ig {
  background: #ffffff;
  color: #262626;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: relative;
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .comment-ig {
    padding: 18px 22px;
  }
}

.comment-ig.dark {
  background: #000000;
  color: #f5f5f5;
  border: 1px solid #1a1a1a;
}

.comment-ig .pinned-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #737373;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.comment-ig.dark .pinned-tag {
  color: #a8a8a8;
}

.comment-ig .ig-body-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-ig .ig-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-ig .ig-content {
  flex: 1;
  min-width: 0;
}

.comment-ig .ig-header {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.comment-ig .ig-username {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.comment-ig .ig-time {
  font-size: 12px;
  color: #737373;
}

.comment-ig.dark .ig-time {
  color: #a8a8a8;
}

.comment-ig .ig-text {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-ig .ig-tag {
  color: #00376b;
  font-weight: 500;
}

.comment-ig.dark .ig-tag {
  color: #e0f1ff;
  font-weight: 500;
}

.comment-ig .ig-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #737373;
  margin-top: 8px;
}

.comment-ig.dark .ig-actions {
  color: #a8a8a8;
}

.comment-ig .ig-liked-by {
  font-size: 11px;
  font-weight: 500;
  color: #737373;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-ig.dark .ig-liked-by {
  color: #a8a8a8;
}

.comment-ig .ig-heart-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #737373;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.comment-ig.dark .ig-heart-btn {
  color: #a8a8a8;
}

.comment-ig .ig-heart-btn.liked {
  color: #ff3040;
  animation: heartPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* YouTube Pro Style */
.comment-yt {
  background: #ffffff;
  color: #0f0f0f;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  position: relative;
}

@media (min-width: 640px) {
  .comment-yt {
    padding: 18px 22px;
  }
}

.comment-yt.dark {
  background: #0f0f0f;
  color: #f1f1f1;
  border: 1px solid #222222;
}

.comment-yt .yt-pinned {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #606060;
  margin-bottom: 10px;
  font-weight: 500;
}

.comment-yt.dark .yt-pinned {
  color: #aaaaaa;
}

.comment-yt .yt-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-yt .yt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-yt .yt-content {
  flex: 1;
  min-width: 0;
}

.comment-yt .yt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.comment-yt .yt-author-pill {
  background: #272727;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.comment-yt .yt-time {
  font-size: 12px;
  color: #606060;
  font-weight: 400;
}

.comment-yt.dark .yt-time {
  color: #aaaaaa;
}

.comment-yt .yt-text {
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-yt .yt-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
}

.comment-yt .yt-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  padding: 6px;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.comment-yt .yt-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.comment-yt.dark .yt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.comment-yt .yt-creator-heart {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.comment-yt .yt-creator-heart img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.comment-yt .yt-creator-heart .mini-heart {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #cc0000;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  color: white;
}

.comment-yt .yt-replies-btn {
  background: transparent;
  border: none;
  color: #065fd4;
  font-weight: 600;
  font-size: 12px;
  margin-top: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 12px;
}

.comment-yt.dark .yt-replies-btn {
  color: #3ea6ff;
}

/* Facebook Pro Style */
.comment-fb {
  background: #ffffff;
  color: #050505;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif;
  position: relative;
}

@media (min-width: 640px) {
  .comment-fb {
    padding: 18px 22px;
  }
}

.comment-fb.dark {
  background: #18191a;
  color: #e4e6eb;
  border: 1px solid #2d2f31;
}

.comment-fb .fb-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-fb .fb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-fb .fb-bubble-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.comment-fb .fb-bubble {
  background: #f0f2f5;
  padding: 10px 14px;
  border-radius: 18px;
  display: inline-block;
}

.comment-fb.dark .fb-bubble {
  background: #242526;
}

.comment-fb .fb-author-tag {
  font-size: 11px;
  font-weight: 700;
  color: #1877f2;
  margin-bottom: 2px;
}

.comment-fb .fb-name {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-fb .fb-text {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 3px;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-fb .fb-reaction-pill {
  position: absolute;
  bottom: -8px;
  right: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.comment-fb.dark .fb-reaction-pill {
  background: #242526;
  border-color: #3a3b3c;
  color: #b0b3b8;
}

.comment-fb .fb-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #65676b;
  margin-top: 10px;
  padding-left: 10px;
}

.comment-fb.dark .fb-actions {
  color: #b0b3b8;
}

.comment-fb .fb-actions button {
  background: transparent;
  border: none;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

/* TikTok Pro Style */
.comment-tt {
  background: #ffffff;
  color: #161823;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
}

@media (min-width: 640px) {
  .comment-tt {
    padding: 18px 22px;
  }
}

.comment-tt.dark {
  background: #121212;
  color: #ffffff;
  border: 1px solid #222222;
}

.comment-tt .tt-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-tt .tt-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-tt .tt-content {
  flex: 1;
  min-width: 0;
}

.comment-tt .tt-username {
  font-size: 13px;
  font-weight: 600;
  color: rgba(22, 24, 35, 0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-tt.dark .tt-username {
  color: #8a8b91;
}

.comment-tt .tt-creator-tag {
  font-size: 11px;
  font-weight: 700;
  color: #fe2c55;
  background: rgba(254, 44, 85, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.comment-tt .tt-text {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-tt .tt-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(22, 24, 35, 0.5);
  margin-top: 6px;
  font-weight: 500;
}

.comment-tt.dark .tt-meta {
  color: #8a8b91;
}

.comment-tt .tt-heart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.comment-tt .tt-heart-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(22, 24, 35, 0.5);
  font-size: 18px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.comment-tt.dark .tt-heart-btn {
  color: #8a8b91;
}

.comment-tt .tt-heart-btn.liked {
  color: #fe2c55;
  animation: heartPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.comment-tt .tt-count {
  font-size: 11px;
  font-weight: 600;
  color: rgba(22, 24, 35, 0.75);
}

.comment-tt.dark .tt-count {
  color: #8a8b91;
}

/* X / Twitter Pro Style */
.comment-x {
  background: #ffffff;
  color: #0f1419;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
}

@media (min-width: 640px) {
  .comment-x {
    padding: 18px 22px;
  }
}

.comment-x.dark {
  background: #000000;
  color: #e7e9ea;
  border: 1px solid #1a1a1a;
}

.comment-x .x-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-x .x-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-x .x-content {
  flex: 1;
  min-width: 0;
}

.comment-x .x-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1.3;
}

.comment-x .x-name {
  font-weight: 700;
}

.comment-x .x-handle,
.comment-x .x-time {
  color: #536471;
  font-size: 13px;
}

.comment-x.dark .x-handle,
.comment-x.dark .x-time {
  color: #71767b;
}

.comment-x .x-text {
  font-size: 15px;
  line-height: 1.45;
  margin-top: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}

.comment-x .x-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 420px;
  margin-top: 12px;
  font-size: 12px;
  color: #536471;
}

.comment-x.dark .x-actions {
  color: #71767b;
}

.comment-x .x-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 12px;
}

.comment-x .x-action-item:hover {
  color: #1d9bf0;
}

.comment-x .x-action-item.liked {
  color: #f91880;
  animation: heartPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Export Hub */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.export-option-card {
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-option-card:hover {
  border-color: #6366f1;
  background: var(--bg-panel);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.export-option-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.export-option-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-mode-app .toast-notice {
  background: #ffffff;
  color: #0f172a;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Particles Canvas */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
