/* Hide elements with the .hidden class */
.hidden {
  display: none !important;
}
/* Root Variables */
:root {
  --bg-color: #f0f2f5;
  --text-color: #333;
  --card-bg: #ffffff;
  --bar-low: #d94b4b;
  --bar-medium: #8b5cf6;
  --bar-high: #4caf50;
  /* 5-band meter colors */
  --aid-light-green: #6fdc6f;  /* Human 1–25 */
  --aid-dark-green:  #2e7d32;  /* Likely Human 26–39 */
  --aid-yellow:      #f7b500;  /* Uncertain 40–60 */
  --aid-dark-red:    #b71c1c;  /* Likely AI 61–74 */
  --aid-red:         #e53935;  /* AI 75–99 */
  --hint-main: #333;
  --hint-sub: #555;
}

body.dark-mode {
  --bg-color: #1c1c1c;
  --text-color: #eee;
  --card-bg: #2c2c2c;
  --hint-main: #eee;
  --hint-sub: #aaa;
}

/* Pitch Black Mode - Premium Only (#000000 like landing page) */
body.pitch-black-mode {
  --bg-color: #000000;
  --text-color: #eee;
  --card-bg: #000000;
  --hint-main: #eee;
  --hint-sub: #aaa;
  --border-color: #2f3336;
}

/* Pitch black containers */
body.pitch-black-mode .card,
body.pitch-black-mode .result-panel,
body.pitch-black-mode .inputs-container {
  background: #000000;
  border: 1px solid #333;
}

/* Header bar has NO border in pitch black mode to match light/dark modes */
body.pitch-black-mode .header-bar {
  background: #000000;
  border: none;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background-color: var(--bg-color);
  color: var(--text-color);
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.card-deck {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* New header layout - Logo + Title inline, tagline below */
.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

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

.header-top-row .title {
  margin: 0;
  white-space: nowrap;
}

.icon-wrapper {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.icon-wrapper.clickable:hover {
  opacity: 0.8;
}

.app-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 2px;
}

.title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin: 0;
  color: var(--text-color);
}

.tagline {
  font-size: 12px;
  font-weight: 400;
  color: #8b5cf6;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

#darkModeToggle,
#premiumToggle,
#websiteCheckerBtn,
#linkScannerBtn,
#addressIdBtn,
#passkeyManagerBtn,
#passwordBreachBtn {
  background: none !important;
  border: none !important;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  outline: none;
  box-shadow: none !important;
}

/* Remove focus/active boxes on header buttons - keep them clean */
#darkModeToggle:focus,
#darkModeToggle:active,
#premiumToggle:focus,
#premiumToggle:active,
#websiteCheckerBtn:focus,
#websiteCheckerBtn:active,
#linkScannerBtn:focus,
#linkScannerBtn:active,
#addressIdBtn:focus,
#addressIdBtn:active,
#passkeyManagerBtn:focus,
#passkeyManagerBtn:active,
#passwordBreachBtn:focus,
#passwordBreachBtn:active {
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Subtle hover indicator - use transparent border (user requested) */
#darkModeToggle:hover,
#premiumToggle:hover,
#websiteCheckerBtn:hover,
#linkScannerBtn:hover,
#addressIdBtn:hover,
#passkeyManagerBtn:hover,
#passwordBreachBtn:hover {
  opacity: 0.8;
}

.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h2 {
  margin-top: 0;
  font-size: 16px;
  color: var(--text-color);
}

.mode-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

button {
  padding: 10px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #0078d4;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #005ea2;
}

/* =============================
   Modality Icons (Web App)
   Use pseudo-element masks so text/i18n replacements remain intact.
   ============================= */
  /* Inline SVG icon buttons (web app) */
  .icon-btn { display:inline-flex; align-items:center; gap:6px; }
  .icon-btn .icon-svg { width:1.1em; height:1.1em; flex-shrink:0; }
  .icon-btn .emoji-icon { 
    font-size: 1.1em; 
    flex-shrink: 0; 
    display: inline-block;
    line-height: 1;
  }
  /* Updated color palette (aligned with extension: remove blues for text & proof) */
  /* Text modality updated to pink (non-blue, non-green) */
  .icon-svg.icon-text { color:#ec4899; }
  .icon-svg.icon-image { color:#16a34a; }
  .icon-svg.icon-video { color:#dc2626; width:1.3em; height:1.3em; }
  .icon-svg.icon-voice { color:#f97316; }
  /* Proof of Human icon now uses shared CSS variable for easy theme updates */
  .icon-svg.icon-proof { color: var(--proof-icon-color); }
  body.dark-mode .icon-svg.icon-text { color:#f472b6; }
  body.dark-mode .icon-svg.icon-image { color:#22c55e; }
  body.dark-mode .icon-svg.icon-video { color:#ef4444; }
  body.dark-mode .icon-svg.icon-voice { color:#fb923c; }
  body.dark-mode .icon-svg.icon-proof { color: var(--proof-icon-color); }

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.text-group {
  position: relative;
  flex: 1;
}

.text-group textarea {
  width: 100%;
  height: 100px;
  resize: none;
  font-size: 14px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--text-color);
  background-color: var(--card-bg);
  z-index: 1;
  /* Multilingual support */
  font-family: 'Segoe UI', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans CJK SC', 'Noto Sans CJK JP', 'Noto Sans CJK KR', 'Noto Sans Devanagari', 'Arial', sans-serif;
  line-height: 1.5;
  word-break: break-word; /* Allow wrapping for CJK without spaces */
  overflow-wrap: anywhere; /* Long tokens in languages without spaces */
  unicode-bidi: plaintext; /* Respect embedded directionality marks */
}

#placeholderOverlay {
  position: absolute;
  left: 8px;
  top: 8px;
  /* Do not intercept clicks; allow textarea to receive focus directly */
  pointer-events: none;
  line-height: 1.4;
  font-size: 13px;
  z-index: 2;
  cursor: text;
}

/* Always hide overlay while the text area (or its group) has focus */
.text-group:focus-within #placeholderOverlay {
  display: none !important;
}

.placeholder-main {
  font-weight: bold;
  color: var(--hint-main);
}

.placeholder-sub {
  font-weight: normal;
  color: var(--hint-sub);
}

.file-group input {
  flex: 1;
}

/* Visually hide native file input but keep accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Custom file picker UI */
.file-btn {
  padding: 8px 12px;
  background-color: #e0e0e0;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #cfcfcf;
  font-size: 13px;
}

.file-btn:hover {
  background-color: #d5d5d5;
}

.file-name {
  font-size: 13px;
  color: var(--hint-sub);
}

/* Voice recording functionality */
.file-upload-section {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.live-recording-section {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.record-button {
  background: linear-gradient(135deg, #ff4757, #ff3742);
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 71, 87, 0.4);
}

.record-button:active {
  transform: translateY(0);
  background: linear-gradient(135deg, #ff3742, #ff2838);
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary, #333);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recording-indicator.active {
  opacity: 1;
}

.recording-timer {
  font-weight: 600;
  color: #ff4757;
  font-size: 16px;
  margin-left: 8px;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: #ff4757;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Clear button styling - gray color to match extension */
.clear-btn {
  background: transparent !important;
  border: none !important;
  font-size: 14px !important;
  color: #999 !important;
  cursor: pointer !important;
  padding: 4px !important;
  margin-left: 4px !important;
  transition: color 0.2s ease !important;
}

.clear-btn:hover {
  color: #666 !important;
}

#analyzeBtn {
  width: 100%;
  font-weight: bold;
  margin-bottom: 8px;
}

.probability-container {
  margin-top: 8px;
}

.probability-bar {
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

#probabilityFill {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  background-color: var(--bar-medium);
}

#probabilityLabel,
.selected-mode-output {
  color: var(--hint-main);
}

#probabilityLabel {
  font-weight: bold;
  font-size: 15px;
}

#resultsDisplay {
  margin-top: 12px;
  font-size: 14px;
  font-weight: normal;
  text-align: center;
}

.selected-mode-output {
  font-size: 14px;
  margin-top: 6px;
}

#advertiseBtn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #e5e5e5;
  color: #333;
  cursor: pointer;
}

#advertiseBtn:hover {
  background-color: #d4d4d4;
}

/* Settings Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px 24px;
  border-bottom: 1px solid #e5e5e5;
}

body.dark-mode .modal-header {
  border-bottom: 1px solid #444;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: #f0f0f0;
}

body.dark-mode .close-btn:hover {
  background-color: #444;
}

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

/* POH Upgrade Modal Styles */
.poh-upgrade-modal .modal-content {
  max-width: 340px;
  width: 90%;
  overflow: visible;
}

.poh-upgrade-modal .modal-header {
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  border-bottom: 1px solid #3a3a3a;
  padding: 16px 20px;
}

.poh-upgrade-modal .modal-header h2 {
  font-size: 1.1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.poh-upgrade-modal .modal-body {
  text-align: center;
  background: #1e1e1e;
  color: white;
  padding: 20px;
}

.poh-upgrade-modal .modal-body h3 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  color: white;
}

.poh-upgrade-description {
  font-size: 0.9rem;
  color: #aaa;
  margin: 8px 0 16px 0;
}

.poh-upgrade-benefits {
  text-align: left;
  margin: 12px 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.poh-upgrade-benefits li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ddd;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.poh-upgrade-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: #667eea;
  border-radius: 50%;
}

.poh-upgrade-modal .upgrade-btn-cta {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-decoration: none;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.poh-upgrade-modal .upgrade-btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.poh-upgrade-modal .close-btn {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.poh-upgrade-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.settings-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

body.dark-mode .settings-section {
  border-bottom: 1px solid #444;
}

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

.settings-section h3 {
  margin: 0 0 12px 0;
  color: var(--text-color);
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-color);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--card-bg);
  color: var(--text-color);
  box-sizing: border-box;
}

body.dark-mode .form-group input {
  border: 1px solid #555;
  background-color: #333;
}

.form-group input:focus {
  outline: none;
  border-color: #4caf50;
}

.btn {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn.primary {
  background-color: #4caf50;
  color: white;
}

.btn.primary:hover {
  background-color: #45a049;
}

.btn.secondary {
  background-color: #f0f0f0;
  color: #333;
}

.btn.secondary:hover {
  background-color: #e0e0e0;
}

body.dark-mode .btn.secondary {
  background-color: #444;
  color: #eee;
}

body.dark-mode .btn.secondary:hover {
  background-color: #555;
}

.wallet-status {
  margin-bottom: 12px;
}

.wallet-disconnected {
  color: #999;
  font-style: italic;
  margin: 0;
}

.wallet-info {
  margin-top: 16px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
}

body.dark-mode .wallet-info {
  background-color: #333;
}

.token-balance,
.user-tier {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.token-balance:last-child,
.user-tier:last-child {
  margin-bottom: 0;
}

.label {
  font-weight: 500;
  color: var(--text-color);
}

.value {
  color: var(--text-color);
  font-weight: 600;
}

.usage-assistant-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color);
  background-color: transparent;
  border: 1px solid var(--text-color);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  font-family: inherit;
}

.usage-assistant-btn:hover {
  background-color: var(--text-color);
  color: var(--card-bg);
}

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

.discord-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5865f2;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid #5865f2;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.discord-support:hover {
  background-color: #5865f2;
  color: white;
}

.discord-support svg {
  width: 16px;
  height: 16px;
}

/* Upgrade Button in Settings Header */
.upgrade-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #111 !important;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.upgrade-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 197, 66, 0.3);
}

/* Usage Assistant Chat Window */
.chat-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 1001;
  border: 1px solid #333;
  overflow: hidden;
}

.chat-window.open {
  display: flex !important;
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #111;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.chat-close {
  background: none;
  border: none;
  color: #111;
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.chat-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg);
}

.message {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.4;
}

.message.bot {
  background: #2a2a2a;
  color: #eee;
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.message.user {
  background: #8b5cf6;
  color: #111;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

/* Quick Actions */
.quick-actions {
  padding: 12px 16px;
  border-top: 1px solid #333;
  background: var(--card-bg);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-action {
  background: #333;
  color: #8b5cf6;
  border: 1px solid #8b5cf6;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action:hover {
  background: #8b5cf6;
  color: #111;
}

/* Chat Input */
.chat-input {
  display: flex;
  padding: 16px;
  border-top: 1px solid #333;
  background: var(--card-bg);
}

.chat-input input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
  padding: 12px 16px;
  border-radius: 24px;
  outline: none;
  font-size: 0.9rem;
}

.chat-input input:focus {
  border-color: #8b5cf6;
}

.chat-send {
  background: #8b5cf6;
  border: none;
  color: #111;
  padding: 12px 16px;
  margin-left: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-send:hover {
  background: #7c3aed;
  transform: scale(1.05);
}

.chat-send svg {
  width: 16px;
  height: 16px;
  fill: #111;
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  padding: 12px 16px;
  border-radius: 18px;
  background: #2a2a2a;
  color: #8b5cf6;
  align-self: flex-start;
  font-style: italic;
  border-bottom-left-radius: 6px;
  margin: 0 16px;
}

.typing-indicator.show {
  display: block;
}

/* Access Modal */
.access-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.access-modal.show {
  display: flex;
}

.access-modal-content {
  background: var(--card-bg);
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.access-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.access-modal-header h3 {
  margin: 0;
  color: var(--text-color);
}

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

.access-modal-body p {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 20px;
}

.access-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upgrade-button {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #111;
  border: none;
  padding: 16px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upgrade-button:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-1px);
}

.upgrade-button span {
  font-weight: 600;
  font-size: 16px;
}

.upgrade-button small {
  font-size: 12px;
  opacity: 0.8;
}

.watch-ad-button {
  background: #333;
  color: #8b5cf6;
  border: 2px solid #8b5cf6;
  padding: 16px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.watch-ad-button:hover {
  background: #8b5cf6;
  color: #111;
}

.watch-ad-button span {
  font-weight: 600;
  font-size: 16px;
}

.watch-ad-button small {
  font-size: 12px;
  opacity: 0.8;
}

.or-divider {
  text-align: center;
  color: var(--text-color);
  font-size: 14px;
  position: relative;
}

.or-divider::before,
.or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: #333;
}

.or-divider::before {
  left: 0;
}

.or-divider::after {
  right: 0;
}

/* Ad Container in Modal */
.access-modal .ad-container {
  margin-top: 20px;
  background: #222;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.ad-content {
  color: #8b5cf6;
}

.ad-timer {
  margin: 10px 0;
  font-size: 14px;
}

.skip-ad-btn {
  background: #8b5cf6;
  color: #111;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 140px);
    bottom: 20px;
    right: 20px;
    left: 20px;
  }
  
  .upgrade-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}



/* Dev ad placeholder styles (no inline styles) */
#devAdPlaceholder {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  text-align: center;
}
#devAdPlaceholder .ad-label {
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
#devAdPlaceholder .ad-copy {
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.9;
}

/* Post-results ad box (standalone below main analysis card) */
.post-results-ad {
  margin: 16px 0 0 0; /* align left/right with card width */
  padding: 10px 14px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  text-align: center;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}
.post-results-ad .ad-copy {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: .3px;
}
/* Optional helper class for future variations */
.ad-card { box-shadow: none; }

/* PREMIUM MODE: Hide ads and upgrade prompts (FREE tier only) */
body.premium-mode .ad-card,
body.premium-mode #postResultsAd,
body.premium-mode .post-results-ad,
body.premium-mode .upgrade-premium-section,
body.premium-mode .upgrade-btn-cta {
  display: none !important;
}

/* Dark mode adjustments */
body.dark-mode .post-results-ad { border-color: #555; }

/* ===== POH (Proof of Human) Web App Styles ===== */

/* POH Full-Width Button (matches Chrome extension) */
.poh-btn-fullwidth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.poh-btn-fullwidth:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

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

.poh-btn-fullwidth .poh-emoji {
  font-size: 18px;
}

.poh-btn-fullwidth .poh-label {
  font-weight: 600;
}

.poh-btn-fullwidth .poh-token-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Hide POH token badge in free mode */
body:not(.premium-mode) .poh-btn-fullwidth .poh-token-badge {
  display: none;
}

/* POH Inline Panel (expands below POH button, above mode buttons - like Chrome extension) */
.poh-inline-panel {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid #3b82f6;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark-mode .poh-inline-panel {
  border-color: #60a5fa;
  background: #1e1e1e;
}

.poh-inline-content {
  padding: 16px;
  text-align: center;
}

.poh-inline-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.poh-analyze-btn {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.poh-analyze-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.poh-inline-disclaimer {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

/* POH Button active state when panel is open */
.poh-btn-fullwidth.active {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* POH Input Area (legacy, can be removed) */
.poh-input-area {
  padding: 16px;
  background: var(--card-bg);
  border-radius: 10px;
  text-align: center;
}

.poh-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.poh-url-input {
  margin-bottom: 10px;
}

.poh-text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
}

body.dark-mode .poh-text-input {
  border-color: #444;
}

.poh-text-input:focus {
  outline: none;
  border-color: #8b5cf6;
}

.poh-or-divider {
  font-size: 12px;
  color: #888;
  margin: 8px 0;
}

.poh-handle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.poh-platform-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-color);
  color: var(--text-color);
  min-width: 120px;
}

body.dark-mode .poh-platform-select {
  border-color: #444;
}

.poh-handle-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-color);
  color: var(--text-color);
}

body.dark-mode .poh-handle-input {
  border-color: #444;
}

.poh-disclaimer {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

/* POH Results Panel (Vertical Layout) */
.poh-results-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

body.dark-mode .poh-results-panel {
  border-color: #3a3a3a;
}

.poh-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.poh-result-header .checkmark-icon {
  font-weight: bold;
}

/* Profile Card (TOP) */
.poh-profile-card {
  background: var(--bg-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.poh-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.poh-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 3px solid #00d4ff;
}

.poh-profile-info h4 {
  font-size: 15px;
  margin: 0 0 2px 0;
}

.poh-profile-handle {
  color: #00d4ff;
  font-size: 13px;
}

.poh-platform-badge {
  display: inline-block;
  background: var(--card-bg);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  margin-top: 4px;
}

.poh-profile-bio {
  font-size: 12px;
  color: #666;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

body.dark-mode .poh-profile-bio {
  color: #aaa;
}

.poh-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 10px;
}

body.dark-mode .poh-profile-stats {
  border-color: #3a3a3a;
}

.poh-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #00d4ff;
}

.poh-stat-label {
  font-size: 9px;
  color: #888;
  text-transform: uppercase;
}

.poh-profile-meta {
  font-size: 11px;
  color: #888;
}

.poh-profile-meta div {
  margin-bottom: 3px;
}

/* Verdict Box */
.poh-verdict-box {
  background: rgba(46, 125, 50, 0.1);
  border: 1px solid #2e7d32;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.poh-verdict-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.poh-verdict-text {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

body.dark-mode .poh-verdict-text {
  color: #aaa;
}

/* Why Section */
.poh-why-section {
  margin-bottom: 12px;
}

.poh-why-section h5 {
  font-size: 13px;
  color: #666;
  margin: 0 0 8px 0;
}

body.dark-mode .poh-why-section h5 {
  color: #aaa;
}

.poh-why-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.poh-why-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  color: #666;
}

body.dark-mode .poh-why-list li {
  border-color: #3a3a3a;
  color: #aaa;
}

.poh-why-list li:last-child {
  border-bottom: none;
}

/* Category Bars */
.poh-category-section {
  margin-bottom: 12px;
}

.poh-category-section h5 {
  font-size: 13px;
  color: #666;
  margin: 0 0 10px 0;
}

body.dark-mode .poh-category-section h5 {
  color: #aaa;
}

.poh-category-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poh-category-bar {
  background: var(--bg-color);
  border-radius: 6px;
  padding: 8px 10px;
}

.poh-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
}

.poh-bar-pct {
  font-weight: 700;
}

.poh-bar-track {
  height: 5px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

body.dark-mode .poh-bar-track {
  background: #3a3a3a;
}

.poh-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.poh-bar-fill.human { background: #2e7d32; }
.poh-bar-fill.human-ai { background: #66bb6a; }
.poh-bar-fill.company { background: #0078d4; }
.poh-bar-fill.company-ai { background: #42a5f5; }
.poh-bar-fill.scammer { background: #e53935; }
.poh-bar-fill.scammer-ai { background: #ef5350; }
.poh-bar-fill.bot { background: #f59e0b; }

/* Disclaimer Banner */
.poh-disclaimer-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: #f59e0b;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
