/* ========================================================
   VIRAL IDEA CARDS & CONTENT KIT
   ======================================================== */
.idea {
  background: #151926;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: var(--transition);
  position: relative;
}

.idea:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: #181d2c;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.idea-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.idea-top-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge-viral {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(245, 158, 11, 0.18));
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-hook-type {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.stage-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stage-badge[data-stage="new"] { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.stage-badge[data-stage="picked"] { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.stage-badge[data-stage="scripted"] { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.stage-badge[data-stage="rendered"] { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.stage-badge[data-stage="posted"] { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.idea .hook {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.45;
}

.idea .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Content Kit Expansion Drawer */
.idea-detail {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.idea-detail.open { display: block; }

.kit-section {
  background: #0f121b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.kit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.kit-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

pre.script {
  white-space: pre-wrap;
  font-family: "JetBrains Mono", monospace;
  background: #090b10;
  border: 1px solid #1a1e2d;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0;
}

ul.shotlist {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.caption-editor {
  width: 100%;
  min-height: 140px;
  background: #090b10;
  border: 1px solid #1a1e2d;
  border-radius: var(--radius-sm);
  color: #f1f5f9;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
}

.hashtag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hashtag-chip {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  user-select: all;
}

.hashtag-chip:hover {
  background: rgba(6, 182, 212, 0.28);
  color: white;
  transform: translateY(-1px);
}

.status-line {
  font-size: 13px;
  margin-top: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-line.ok { color: var(--accent-emerald); }
.status-line.err { color: var(--accent-rose); }
.status-line.warn { color: var(--accent-amber); }

.empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 30px;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

/* Toast Notification System */
.toast-container,
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
  width: calc(100vw - 32px);
  pointer-events: none;
}

.toast-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 20, 32, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  font-size: 13.5px;
  line-height: 1.45;
  pointer-events: auto;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.closing {
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

@keyframes toastSlideIn {
  from {
    transform: translateY(16px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.toast-icon svg {
  width: 16px;
  height: 16px;
}

/* Toast Variants */
.toast-item.ok,
.toast-item.success {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 18px rgba(16, 185, 129, 0.15);
}
.toast-item.ok .toast-icon,
.toast-item.success .toast-icon {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}

.toast-item.err,
.toast-item.error {
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 18px rgba(244, 63, 94, 0.15);
}
.toast-item.err .toast-icon,
.toast-item.error .toast-icon {
  background: rgba(244, 63, 94, 0.16);
  color: #f43f5e;
}

.toast-item.warn,
.toast-item.warning {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 18px rgba(245, 158, 11, 0.15);
}
.toast-item.warn .toast-icon,
.toast-item.warning .toast-icon {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
}

.toast-item.info {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 18px rgba(99, 102, 241, 0.15);
}
.toast-item.info .toast-icon {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
}

.toast-content {
  flex: 1;
  word-break: break-word;
}
.toast-message {
  font-weight: 500;
  color: #f1f5f9;
}

.toast-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
}
.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 100%;
  transform-origin: left;
  animation: toastProgress linear forwards;
}
.toast-item.ok .toast-progress,
.toast-item.success .toast-progress { background: #10b981; }
.toast-item.err .toast-progress,
.toast-item.error .toast-progress { background: #f43f5e; }
.toast-item.warn .toast-progress,
.toast-item.warning .toast-progress { background: #f59e0b; }
.toast-item.info .toast-progress { background: #6366f1; }

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 640px) {
  .toast-container,
  .toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }
}

code {
  background: #0f121a;
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #e2e8f0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
