/* Social Media Preview Tool - Styles */

/* ===============================
   Tool Layout
   =============================== */

.tool-section {
  margin: 0 auto;
}

.hero-section {
  padding-bottom: 2rem;
}

/* Input Panel */
.tool-input-panel {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--card-bg-primary);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  width: 50%;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
  flex-wrap: wrap;
}

.url-input {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-medium);
  background: var(--input-bg, var(--card-bg-primary));
  color: var(--text-primary);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.url-input:focus {
  outline: none;
  border-color: var(--app-primary, #256fc3);
  box-shadow: 0 0 0 3px rgba(37, 111, 195, 0.15);
}

/*.url-input::placeholder {*/
/*  color: var(--text-tertiary, #9ca3af);*/
/*}*/

.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  white-space: nowrap;
  width: 100%;
}

.preview-btn.is-loading .btn-icon {
  display: none;
}

.preview-btn .btn-spinner {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.preview-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.sample-urls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.sample-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.sample-url-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  background: var(--badge-bg, rgba(37, 111, 195, 0.1));
  color: var(--app-primary, #256fc3);
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.sample-url-btn:hover {
  background: rgba(37, 111, 195, 0.2);
  transform: translateY(-1px);
}

/* ===============================
   Email Gate Modal
   =============================== */
.email-gate-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  z-index: 140;
  padding: 1.5rem;
}

.email-gate-panel {
  position: relative;
  width: min(420px, 100%);
  background: var(--card-bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .email-gate-panel {
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.email-gate-panel h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.email-gate-panel p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.email-gate-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.email-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-gate-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.email-gate-input {
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-medium);
  background: var(--input-bg, var(--card-bg-primary));
  color: var(--text-primary);
}

.email-gate-input:focus {
  outline: none;
  border-color: var(--app-primary, #256fc3);
  box-shadow: 0 0 0 3px rgba(37, 111, 195, 0.15);
}

.email-gate-error {
  color: #dc2626;
  font-size: 0.85rem;
}

[data-theme="dark"] .email-gate-error {
  color: #fca5a5;
}

.email-gate-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ===============================
   Platform Selector
   =============================== */
.x-icon img {
  filter: invert(var(--timeline-logo-invert));
}

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  grid-template-rows: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border-radius: 0.75rem;
  background: var(--card-bg-primary);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.platform-card.active {
  border-color: var(--app-primary, #256fc3);
  background: linear-gradient(
    135deg,
    rgba(37, 111, 195, 0.08),
    rgba(243, 24, 255, 0.05)
  );
  box-shadow: 0 0 0 3px rgba(37, 111, 195, 0.1);
}

.platform-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
}

.platform-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Platform Icons using CSS gradients/colors as fallback */
.platform-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

/* ===============================
   View Toggles
   =============================== */

.view-toggles {
  padding: 1rem 0;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.toggle-buttons {
  display: flex;
  background: var(--toggle-bg, rgba(0, 0, 0, 0.05));
  border-radius: 0.5rem;
  padding: 0.25rem;
}

[data-theme="dark"] .toggle-buttons {
  background: rgba(255, 255, 255, 0.08);
}

.toggle-btn {
  /*padding: 0.5rem 0.875rem;*/
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  column-gap: 5px;
}

.toggle-btn .apple-icon {
  filter: invert(var(--timeline-logo-invert));
}

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

.toggle-btn.active {
  background: var(--card-bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.device-toggle {
  opacity: 1;
  transition: opacity 0.2s;
}

.device-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===============================
   Preview Panel
   =============================== */

.preview-suggestions-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .preview-suggestions-container {
    grid-template-columns: 1fr 500px;
  }
}

.preview-panel {
  display: flex;
  flex-direction: column;
}

.device-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: var(
    --preview-bg,
    linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)
  );
  border-radius: 1rem;
  min-height: 500px;
}

[data-theme="dark"] .device-wrapper {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.device-frame {
  position: relative;
  width: 280px;
  height: 580px;
  padding: 12px;
  background: #1a1a1a;
  border-radius: 44px;
  box-shadow:
    0 0 0 3px #2a2a2a,
    0 25px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 5px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

/* iOS Frame */
.device-frame.ios {
  border-radius: 44px;
}

.device-frame.ios::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

/* Android Frame */
.device-frame.android {
  border-radius: 28px;
}

.device-frame.android::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border-radius: 50%;
  z-index: 10;
}

.device-frame.ios .device-screen {
  padding-top: 28px;
}

.device-frame.android .device-screen {
  padding-top: 24px;
}

.device-wrapper.desktop .device-frame {
  width: 100%;
  max-width: 520px;
  height: auto;
  min-height: 380px;
  padding: 0;
  background: var(--card-bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: center;
}

.device-wrapper.desktop .device-frame::before {
  display: none;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: #fff;
  position: relative;
  border-radius: 36px;
  overflow: hidden;
}

.device-frame.preview-dark .device-screen {
  background: #0c0f14;
}

.device-frame.android .device-screen {
  border-radius: 22px;
  height: 100%;
}

.device-wrapper.desktop .device-screen {
  border-radius: 12px;
  height: auto;
  padding-top: 0;
}

.device-wrapper.desktop .device-screen::before,
.device-wrapper.desktop .device-screen::after {
  content: none;
}

.device-frame.ios .device-screen::before,
.device-frame.android .device-screen::before {
  content: "9:41";
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.02em;
}

.device-frame.ios .device-screen::after,
.device-frame.android .device-screen::after {
  content: "5G  100%";
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.02em;
}

.device-frame.android .device-screen::before {
  content: "10:24";
}

.device-frame.android .device-screen::after {
  content: "LTE 92%";
}

.device-frame.preview-dark .device-screen::before,
.device-frame.preview-dark .device-screen::after {
  color: #e5e7eb;
}

.preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* States */
.empty-state,
.loading-state {
  text-align: center;
  padding: 2rem;
  /*color: black;*/
}

.preview-card-container.dark .empty-state,
.preview-card-container.dark .loading-state {
  color: #e5e7eb;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(37, 111, 195, 0.2);
  border-top-color: var(--app-primary, #256fc3);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.icon-spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

/* ===============================
   Preview Cards (Platform-specific)
   =============================== */

.preview-card-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.preview-card-container.dark {
  background: #0c0f14;
}

.device-frame.preview-dark.ios::before,
.device-frame.preview-dark.android::before {
  background: #1a1a1a;
}

/* Base preview shell */
.preview-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #e5e7eb;
}

.preview-shell.dark .preview-header {
  border-color: #1f2937;
}

.preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #6366f1);
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.header-subtitle {
  font-size: 0.7rem;
  color: #6b7280;
}

.preview-shell.dark .header-title {
  color: #f3f4f6;
}

.preview-shell.dark .header-subtitle {
  color: #9ca3af;
}

.header-action {
  margin-left: auto;
  font-size: 1rem;
  color: #9ca3af;
}

.preview-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  overflow: auto;
}

.preview-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #6366f1;
  font-size: 1.8rem;
}

.preview-image-placeholder {
  font-size: 2rem;
}

/* Chat context wrapper */
.chat-context {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.75rem;
}

.chat-context.dark .chat-header {
  border-color: #333;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.chat-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111;
}

.chat-context.dark .chat-name {
  color: #fff;
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.message-bubble {
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.message-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, #256fc3, #3b82f6);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble.received {
  align-self: flex-start;
  background: #f0f0f0;
  color: #111;
  border-bottom-left-radius: 4px;
}

.chat-context.dark .message-bubble.received {
  background: #2a2a2a;
  color: #fff;
}

/* Link Preview Card Base */
.link-preview-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin-top: 0.25rem;
}

.chat-context.dark .link-preview-card {
  background: #1a1a1a;
  border-color: #333;
}

.link-preview-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  font-size: 2rem;
}

.link-preview-info {
  padding: 0.625rem 0.75rem;
}

.link-preview-domain {
  font-size: 0.6875rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.link-preview-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111;
  margin-top: 0.125rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-context.dark .link-preview-title {
  color: #fff;
}

.link-preview-description {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-context.dark .link-preview-description {
  color: #aaa;
}

/* Platform-specific Card Styles */

/* Instagram */
.preview-instagram .link-preview-card {
  border-radius: 16px;
}

.preview-instagram .link-preview-image {
  height: 160px;
}

/* Facebook */
.preview-facebook .link-preview-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* X/Twitter */
.preview-x .link-preview-card {
  border-radius: 16px;
  border: 1px solid #cfd9de;
}

.preview-x.dark .link-preview-card {
  border-color: #38444d;
}

/* LinkedIn */
.preview-linkedin .link-preview-card {
  border-radius: 8px;
}

.preview-linkedin .link-preview-image {
  height: 120px;
}

/* WhatsApp */
.preview-whatsapp .link-preview-card {
  border-radius: 8px;
  background: #dcf8c6;
  border: none;
}

.preview-whatsapp.dark .link-preview-card {
  background: #025144;
}

.preview-whatsapp .link-preview-info {
  background: rgba(255, 255, 255, 0.9);
}

.preview-whatsapp.dark .link-preview-info {
  background: rgba(0, 0, 0, 0.3);
}

/* Telegram */
.preview-telegram .link-preview-card {
  border-radius: 12px;
  border-left: 3px solid #2aabee;
  display: flex;
  flex-direction: column-reverse;
}

.preview-telegram .link-preview-card .link-preview-image {
  height: 100%;
}

/* Discord */
.preview-discord .link-preview-card {
  border-radius: 4px;
  border-left: 4px solid #5865f2;
  background: #2f3136;
}

.preview-discord .link-preview-title,
.preview-discord .link-preview-description {
  color: #dcddde;
}

.preview-discord .link-preview-domain {
  color: #72767d;
}

/* ===============================
   Platform-specific UI (App-like)
   =============================== */

/* Instagram */
.ig-shell {
  background: #fff;
}

.ig-shell.dark {
  background: #0f1115;
}

.ig-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ig-shell.dark .ig-header {
  border-color: rgba(255, 255, 255, 0.08);
}

.ig-bubble {
  max-width: 82%;
  padding: 0.55rem 0.75rem;
  border-radius: 18px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.ig-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, #256fc3, #6a11cb);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.ig-bubble.received {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 6px;
}

.ig-shell.dark .ig-bubble.received {
  background: #1f2937;
  color: #f9fafb;
}

.ig-message {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ig-message.sent {
  align-self: flex-end;
  width: 86%;
}

.ig-link-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.ig-shell.dark .ig-link-card {
  background: #12151b;
  border-color: #1f2937;
}

.ig-link-image {
  aspect-ratio: 1.91 / 1;
}

.ig-link-info {
  padding: 0.65rem 0.75rem;
}

.ig-link-domain {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ca3af;
}

.ig-link-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.2rem;
  color: #111827;
}

.ig-shell.dark .ig-link-title {
  color: #f3f4f6;
}

.ig-link-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.ig-shell.dark .ig-link-desc {
  color: #9ca3af;
}

.ig-meta {
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: right;
}

/* Facebook Messenger */
.fb-shell {
  background: #f3f4f6;
}

.fb-shell.dark {
  background: #0f1115;
}

.fb-header {
  background: #fff;
}

.fb-shell.dark .fb-header {
  background: #12151b;
}

.fb-avatar {
  background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.fb-thread {
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
}

.fb-shell.dark .fb-thread {
  background: #0f1115;
}

.fb-bubble {
  max-width: 78%;
  padding: 0.55rem 0.75rem;
  border-radius: 18px;
  font-size: 0.85rem;
}

.fb-bubble.sent {
  align-self: flex-end;
  background: #1877f2;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.fb-bubble.received {
  align-self: flex-start;
  background: #fff;
  color: #111827;
  border-bottom-left-radius: 6px;
}

.fb-shell.dark .fb-bubble.received {
  background: #1f2937;
  color: #f3f4f6;
}

.fb-link-wrap {
  align-self: flex-end;
  width: 86%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fb-link-card {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
}

.fb-shell.dark .fb-link-card {
  background: #12151b;
  border-color: #1f2937;
}

.fb-link-image {
  aspect-ratio: 1.91 / 1;
}

.fb-link-info {
  padding: 0.6rem 0.75rem;
}

.fb-link-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.fb-shell.dark .fb-link-title {
  color: #f3f4f6;
}

.fb-link-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.fb-link-domain {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-top: 0.3rem;
}

.fb-meta {
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: right;
}

/* X (Twitter) */
.x-shell {
  background: #fff;
  color: #111827;
  overflow: hidden;
}

.x-shell.dark {
  background: #0b0d10;
}

.x-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

.x-shell.dark .x-topbar {
  border-color: #1f2937;
  color: #f3f4f6;
}

.x-shell.dark .x-logo,
.x-shell.dark .x-title {
  color: #f9fafb;
}

.x-logo {
  font-weight: 700;
  font-size: 1rem;
}

.x-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.x-feed {
  padding-top: 0.25rem;
  overflow-x: hidden;
}

.x-tweet {
  display: flex;
  gap: 0.6rem;
  min-width: 0;
}

.x-avatar {
  background: linear-gradient(135deg, #111827, #1f2937);
}

.x-shell.dark .x-avatar {
  background: linear-gradient(135deg, #f3f4f6, #9ca3af);
}

.x-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.x-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.x-name {
  font-weight: 600;
  color: #111827;
}

.x-shell.dark .x-name {
  color: #f3f4f6;
}

.x-text {
  font-size: 0.9rem;
  color: #111827;
}

.x-shell.dark .x-text {
  color: #e5e7eb;
}

.x-card {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  max-width: 100%;
}

.x-shell.dark .x-card {
  border-color: #2f3336;
  background: #12151b;
}

.x-card-image {
  aspect-ratio: 1.91 / 1;
}

.x-card-info {
  padding: 0.6rem 0.75rem;
}

.x-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.x-shell.dark .x-card-title {
  color: #f3f4f6;
}

.x-card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.x-card-domain {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.3rem;
}

.x-stats {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* LinkedIn */
.li-shell {
  background: #f3f2ef;
}

.li-shell.dark {
  background: #0f1115;
}

.li-topbar {
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
}

.li-shell.dark .li-topbar {
  background: #12151b;
  border-color: #1f2937;
  color: #f3f4f6;
}

.li-post {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.li-shell.dark .li-post {
  background: #12151b;
  border-color: #1f2937;
}

.li-post-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.li-more {
  color: #6b7280;
  font-size: 1rem;
}

.li-shell.dark .li-more {
  color: #9ca3af;
}

.li-avatar {
  background: linear-gradient(135deg, #0a66c2, #3b82f6);
}

.li-user {
  flex: 1;
}

.li-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.li-shell.dark .li-name {
  color: #f3f4f6;
}

.li-meta {
  font-size: 0.7rem;
  color: #6b7280;
}

.li-text {
  font-size: 0.85rem;
  color: #111827;
}

.li-shell.dark .li-text {
  color: #e5e7eb;
}

.li-card {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.li-shell.dark .li-card {
  background: #0f1115;
  border-color: #1f2937;
}

.li-card-image {
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  background: #0f172a;
}

.li-link-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.li-shell.dark .li-link-card {
  background: #0f1115;
  border-color: #1f2937;
}

.li-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  flex-wrap: wrap;
}

.li-shell.dark .li-card-footer {
  background: #0b1220;
}

.li-card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.li-card-info {
  padding: 0.6rem 0.75rem;
}

.li-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.li-shell.dark .li-card-title {
  color: #f3f4f6;
}

.li-card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.li-card-domain {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.3rem;
}

.li-cta {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #0a66c2;
  background: #e8f2ff;
  color: #0a66c2;
  white-space: nowrap;
  flex-shrink: 0;
}

.li-shell.dark .li-cta {
  background: rgba(10, 102, 194, 0.2);
  border-color: #3b82f6;
  color: #bfdbfe;
}

.li-stats {
  font-size: 0.7rem;
  color: #6b7280;
}

.li-shell.dark .li-stats {
  color: #9ca3af;
}

.li-actions {
  font-size: 0.75rem;
  color: #6b7280;
}

/* WhatsApp */
.wa-shell {
  background: #e5ddd5;
}

.wa-shell.dark {
  background: #0b141a;
}

.wa-header {
  background: #075e54;
  color: #fff;
}

.wa-shell.dark .wa-header {
  background: #1f2c34;
}

.wa-header .header-title,
.wa-header .header-subtitle {
  color: #fff;
}

.wa-avatar {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.wa-thread {
  background: linear-gradient(180deg, #ece5dd 0%, #e5ddd5 100%);
}

.wa-shell.dark .wa-thread {
  background: #0b141a;
}

.wa-bubble {
  max-width: 84%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.wa-bubble.sent {
  align-self: flex-end;
  background: #dcf8c6;
  color: #111827;
  border-bottom-right-radius: 4px;
}

.wa-shell.dark .wa-bubble.sent {
  background: #005c4b;
  color: #e5e7eb;
}

.wa-bubble.received {
  align-self: flex-start;
  background: #fff;
  color: #111827;
  border-bottom-left-radius: 4px;
}

.wa-shell.dark .wa-bubble.received {
  background: #1f2c34;
  color: #e5e7eb;
}

.wa-link-bubble {
  padding: 0.45rem;
}

.wa-link-card {
  background: #0f1f1a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wa-shell.light .wa-link-card {
  background: #e9fff15c;
  border-color: #e5e7eb;
}

.wa-shell.dark .wa-link-card {
  background: #0f1f1a;
  border-color: rgba(255, 255, 255, 0.12);
}

.wa-link-image {
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.wa-link-info {
  padding: 0.5rem 0.65rem;
}

.wa-link-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f9fafb;
}

.wa-shell.light .wa-link-title {
  color: #111827;
}

.wa-shell.dark .wa-link-title {
  color: #f3f4f6;
}

.wa-link-desc {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.2rem;
}

.wa-shell.light .wa-link-desc {
  color: #4b5563;
}

.wa-link-domain {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

.wa-shell.light .wa-link-domain {
  color: #6b7280;
}

.wa-time {
  font-size: 0.65rem;
  color: #6b7280;
  text-align: right;
  margin-top: 0.25rem;
}

.wa-shell.dark .wa-time {
  color: #9ca3af;
}

/* Telegram */
.tg-shell {
  background: #e9eef5;
}

.tg-shell.dark {
  background: #0e1621;
}

.tg-header {
  background: #2aabee;
  color: #fff;
}

.tg-back {
  font-size: 1rem;
  margin-right: 0.25rem;
}

.tg-avatar {
  background: linear-gradient(135deg, #f97316, #ec4899);
  position: relative;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-avatar::before {
  content: "R";
}

.tg-thread {
  background: linear-gradient(
    180deg,
    rgba(233, 238, 245, 0.9) 0%,
    rgba(217, 224, 235, 0.95) 100%
  );
  align-items: stretch;
}

.tg-shell.dark .tg-thread {
  background: #0e1621;
}

.tg-link-card {
  background: #e1ebfa;
  border-radius: 12px;
  overflow: hidden;
  border-left: 3px solid #2aabee;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  margin-top: 0.5rem;
}

.tg-shell.dark .tg-link-card {
  background: #141f2d;
  border-left-color: #4ea4f6;
  border-color: rgba(148, 163, 184, 0.2);
}

.tg-link-image {
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.tg-link-info {
  padding: 0.6rem 0.75rem;
}

.tg-link-domain {
  font-size: 0.65rem;
  color: #6b7280;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tg-shell.dark .tg-link-domain {
  color: #9ca3af;
}

.tg-link-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
  margin-top: 0.2rem;
}

.tg-shell.dark .tg-link-title {
  color: #f3f4f6;
}

.tg-link-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.tg-shell.dark .tg-link-desc {
  color: #cbd5f5;
}

/* Telegram message layout */
.tg-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.tg-date-chip {
  align-self: center;
  background: rgba(0, 0, 0, 0.08);
  color: #1f2937;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.tg-shell.dark .tg-date-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.tg-bubble {
  background: linear-gradient(135deg, #3c6fd1, #5d56c7);
  color: #fff;
  padding: 0.6rem 0.7rem;
  border-radius: 14px;
  max-width: 86%;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.tg-shell.dark .tg-bubble {
  background: linear-gradient(135deg, #314c86, #3f3a7a);
}

.tg-url {
  font-size: 0.72rem;
  color: #e0e7ff;
  word-break: break-all;
  margin-bottom: 0.4rem;
}

.tg-shell.dark .tg-url {
  color: #c7d2fe;
}

.tg-meta {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  align-self: flex-end;
  margin-top: 0.35rem;
}

.tg-shell.dark .header-subtitle {
  color: #e5e7eb;
}

.tg-shell.dark .tg-meta {
  color: rgba(255, 255, 255, 0.65);
}

/* Discord */
.dc-shell {
  background: #313338;
  color: #f9fafb;
}

.dc-shell.light {
  background: #f3f4f6;
  color: #111827;
}

.dc-header {
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dc-shell.light .dc-header {
  border-color: #e5e7eb;
}

.dc-thread {
  gap: 0.9rem;
}

.dc-message {
  display: flex;
  gap: 0.6rem;
}

.dc-avatar {
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
}

.dc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dc-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #b9bbbe;
}

.dc-shell.light .dc-user {
  color: #6b7280;
}

.dc-name {
  font-weight: 600;
  color: #fff;
}

.dc-shell.light .dc-name {
  color: #111827;
}

.dc-tag {
  background: #5865f2;
  color: #fff;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.dc-text {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.dc-shell.light .dc-text {
  color: #111827;
}

.dc-embed {
  border-left: 4px solid #5865f2;
  background: #2b2d31;
  border-radius: 6px;
  overflow: hidden;
}

.dc-shell.light .dc-embed {
  background: #fff;
  border-color: #5865f2;
}

.dc-embed-info {
  padding: 0.6rem 0.75rem;
}

.dc-embed-domain {
  font-size: 0.65rem;
  color: #b9bbbe;
}

.dc-shell.light .dc-embed-domain {
  color: #6b7280;
}

.dc-embed-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f9fafb;
  margin-top: 0.2rem;
}

.dc-shell.light .dc-embed-title {
  color: #111827;
}

.dc-embed-desc {
  font-size: 0.75rem;
  color: #d1d5db;
  margin-top: 0.2rem;
}

.dc-shell.light .dc-embed-desc {
  color: #6b7280;
}

.dc-embed-image {
  aspect-ratio: 1.91 / 1;
}

/* Generic fallback */
.generic-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.generic-info {
  padding: 0.6rem 0.75rem;
}

.generic-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.generic-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.generic-domain {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ===============================
   Suggestions Panel
   =============================== */

.suggestions-panel {
  height: fit-content !important;
}

.suggestions-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===============================
   Benefits Section
   =============================== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  /*justify-self: center;*/
}

.benefit-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--card-bg-primary);
  /*border: 1px solid var(--border-subtle);*/
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.benefit-card:hover {
  transform: translateY(-4px);
  /*box-shadow: var(--shadow-md);*/
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.benefit-icon img {

  height: 2.5rem;
  width: 2.5rem;
  margin: auto;
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.benefit-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===============================
   FAQ Section
   =============================== */

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--card-bg-primary);
  /*border: 1px solid var(--border-subtle);*/
  /*border-radius: 0.75rem;*/
  /*overflow: hidden;*/
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  font-size: 0.9rem;
  /*color: var(--text-secondary);*/
  line-height: 1.6;
}

/* ===============================
   CTA Section
   =============================== */
.cta-section .cta-card {
  background: linear-gradient(
    135deg,
    var(--card-bg-primary) 0%,
    var(--card-bg-secondary, var(--card-bg-primary)) 100%
  );
}

/* ===============================
   Responsive Adjustments
   =============================== */

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .tool-input-panel {
    padding: 1.25rem;
  }

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

  .preview-btn {
    width: 100%;
    justify-content: center;
  }

  .toggle-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .device-wrapper {
    padding: 1rem;
    min-height: 480px;
  }

  .device-frame {
    width: 252px;
    height: 520px;
  }

  .suggestions-panel {
    order: 2;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .device-wrapper {
    padding: 0.75rem;
    min-height: 440px;
  }

  .device-frame {
    width: 250px;
    height: 500px;
  }

  .preview-header {
    padding: 0.6rem 0.7rem;
  }

  .preview-scroll {
    padding: 0.6rem;
  }

  .preview-image {
    aspect-ratio: 1.91 / 1;
  }

  .x-user {
    flex-direction: column;
    align-items: flex-start;
    color: #6b7280;
    gap: 0;
  }

  .x-handle {
    font-size: 10px
  }
}

@media (max-width: 480px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .device-frame {
    width: 224px;
    height: 460px;
  }

  .toggle-buttons {
    flex-wrap: wrap;
  }

  .toggle-btn {
    /*padding: 0.375rem 0.625rem;*/
    font-size: 0.75rem;
  }

  .benefit-card {
    max-width: 100%;
  }

  .tool-input-panel {
    max-width: 100%;
    width: 100%;
  }

  .li-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .li-cta {
    display: none;
  }

  .li-card-copy {
    width: 100%;
  }

  .device-frame.ios::before {
    width: 80px;
    height: 23px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
  }

  .header-title {
    font-size: 12px;
  }
}

/* ===============================
   Animations
   =============================== */

.fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-delay-300ms {
  animation-delay: 0.3s;
}

/* comparison card */
.comparison-card,
.suggestions-panel {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: unset;
}

/* Title */
.title {
  font-size: 30px;
  font-weight: 700;
}

.brand {
  color: #2a7cff;
}

/* Subtitle */
.subtitle {
  margin-top: 12px;
  font-size: 16px;
  color: var(--app-tertiary-color);
  line-height: 1.6;
}

/* Features Row */
.features {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.feature {
  flex: 1;
  padding: 20px;
}

.icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.feature p {
  font-size: 14px;
  color: #666;
}

/* Responsive */
@media (max-width: 700px) {
  .features {
    flex-direction: column;
  }

  .card {
    padding: 35px 25px;
  }
}

[data-theme="dark"] .benefit-card,
[data-theme="dark"] .faq-card,
[data-theme="dark"] .cta-card {
  border-color: #333;
}
