/* -------------------------------------------------------------
   Premium Vanilla CSS for FB News Hub
   Theme: Sleek Futuristic Dark Mode & Glassmorphism
   Author: Antigravity IDE
   ------------------------------------------------------------- */

/* Variables & Design Tokens */
:root {
  --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* HSL Sleek Palette */
  --bg-app: hsl(222, 25%, 9%);
  --bg-sidebar: hsl(222, 24%, 12%);
  --bg-surface: hsl(222, 20%, 15%);
  --bg-card: hsl(222, 18%, 18%);
  --bg-card-hover: hsl(222, 18%, 22%);
  --border-color: hsl(222, 15%, 23%);
  --border-color-glow: hsl(260, 85%, 65%, 0.2);

  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 82%);
  --text-muted: hsl(215, 12%, 62%);

  /* Accents */
  --primary: hsl(256, 82%, 63%);
  --primary-hover: hsl(256, 82%, 58%);
  --primary-glow: rgba(124, 58, 237, 0.35);
  
  --success: hsl(142, 70%, 45%);
  --success-glow: rgba(16, 185, 129, 0.2);
  
  --danger: hsl(350, 85%, 58%);
  
  --warning: hsl(38, 92%, 55%);
  --warning-glow: rgba(245, 158, 11, 0.2);

  --info: hsl(199, 89%, 48%);
  --info-glow: rgba(14, 165, 233, 0.2);

  /* Utilities */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px 0 var(--primary-glow);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
}

/* Reset & Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

/* Main Container Grid */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* -------------------------------------------------------------
   Sidebar Styles
   ------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo {
  background: linear-gradient(135deg, var(--primary), var(--info));
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 0 15px 0 rgba(124, 58, 237, 0.4);
}

.brand-text h1 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.menu-item i {
  font-size: 1.15rem;
  transition: var(--transition);
}

.menu-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.menu-item.active {
  background: linear-gradient(90deg, var(--primary-glow), transparent);
  color: var(--text-primary);
  border-left: 3px solid var(--primary);
  box-shadow: inset 5px 0 10px -5px var(--primary-glow);
}

.menu-item.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--warning);
  display: inline-block;
}

.pulse-dot.green {
  background-color: var(--success);
  box-shadow: 0 0 8px 0 var(--success-glow);
  animation: pulse-green 2s infinite;
}

.pulse-dot.yellow {
  background-color: var(--warning);
  box-shadow: 0 0 8px 0 var(--warning-glow);
  animation: pulse-yellow 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-yellow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

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

.credits {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

/* -------------------------------------------------------------
   Main Content Styles
   ------------------------------------------------------------- */
.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 40px;
  min-height: 100vh;
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.header-welcome h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header-welcome p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Tab Layout Controller */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats Dashboard Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.purple { background-color: rgba(124, 58, 237, 0.12); color: var(--primary); }
.stat-icon.yellow { background-color: rgba(245, 158, 11, 0.12); color: var(--warning); }
.stat-icon.green { background-color: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.blue { background-color: rgba(14, 165, 233, 0.12); color: var(--info); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 4px;
}

/* Filter bar controls */
.filter-bar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex-grow: 1;
  max-width: 480px;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px 12px 46px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px 0 var(--primary-glow);
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 170px;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary);
}

/* -------------------------------------------------------------
   Buttons
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), hsl(260, 90%, 68%));
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 5px 15px 0 rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: rgba(244, 63, 94, 0.12);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), hsl(142, 75%, 48%));
  color: white;
}
.btn-success:hover {
  box-shadow: 0 5px 15px 0 rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.w-100 { width: 100%; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-gray { background-color: var(--border-color); color: var(--text-secondary); }
.badge-green { background-color: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-purple { background-color: rgba(124, 58, 237, 0.15); color: var(--primary); border: 1px solid rgba(124, 58, 237, 0.2); }
.badge-hot { background-color: rgba(245, 158, 11, 0.12); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }

/* -------------------------------------------------------------
   News Feed List Cards Layout
   ------------------------------------------------------------- */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.section-title-bar h3 {
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Card item */
.news-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-glow);
  box-shadow: var(--shadow-md);
}

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

.source-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-glow), var(--info-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}

.source-meta {
  display: flex;
  flex-direction: column;
}

.source-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.post-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Card Body Content */
.news-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-card-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}

.news-card-media {
  width: 100%;
  height: 170px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  position: relative;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.05);
}

.media-count-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

/* Card stats counter values */
.news-card-stats {
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.08);
}

.news-card-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-card-stats i {
  color: var(--text-secondary);
}

.news-card-stats span.hot-stat {
  color: var(--warning);
}

.news-card-stats span.hot-stat i {
  color: var(--warning);
}

/* Card Actions Panel */
.news-card-actions {
  padding: 14px 20px;
  background-color: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.news-card-actions button {
  flex-grow: 1;
}

/* Empty or Loading States */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 40px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-state i {
  font-size: 3rem;
  color: var(--border-color);
}

.spinner {
  font-size: 1.5rem;
  color: var(--primary);
  animation: spin 1s linear infinite;
}

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

/* -------------------------------------------------------------
   Page layouts: Grid column definitions
   ------------------------------------------------------------- */
.grid-two-columns {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
  align-items: start;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-body {
  padding: 24px;
}

.card-body.p-0 {
  padding: 0;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

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

.form-control {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px 0 var(--primary-glow);
}

.form-control:read-only {
  background-color: rgba(0, 0, 0, 0.15);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-help {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Premium styled Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.premium-table th {
  background-color: rgba(0, 0, 0, 0.12);
  padding: 16px 20px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.premium-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.premium-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.input-password-wrapper {
  display: flex;
  gap: 8px;
}

.input-password-wrapper input {
  flex-grow: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
}

.alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.alert-info {
  background-color: rgba(14, 165, 233, 0.08);
  color: var(--info);
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.alert-info i {
  font-size: 1.1rem;
}

.text-muted-body {
  color: var(--text-secondary);
}

.text-muted-body h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.text-muted-body ol, .text-muted-body ul {
  padding-left: 20px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.text-muted-body li {
  margin-bottom: 6px;
}

/* -------------------------------------------------------------
   Interactive Reader Modal Overlay (Premium Lightbox)
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

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

.premium-modal {
  width: 100%;
  max-width: 1100px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.open .premium-modal {
  transform: scale(1);
}

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

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-title i {
  font-size: 1.4rem;
  color: var(--primary);
}

.modal-header-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.modal-header-title span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}

/* Modal columns styling */
.editor-column-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border-color);
  padding-right: 28px;
}

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

.column-header h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.original-post-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.original-stats-row {
  display: flex;
  gap: 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  color: var(--text-secondary);
}

.original-stats-row b {
  color: var(--text-primary);
}

.original-text-content {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary);
  max-height: 250px;
  overflow-y: auto;
  padding-right: 8px;
}

.original-media-box {
  width: 100%;
}

.original-media-box img {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 350px;
  object-fit: contain;
  background-color: black;
  border: 1px solid var(--border-color);
}

.original-link-wrapper {
  margin-top: 8px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  justify-content: center;
}

.link-btn:hover {
  background-color: rgba(124, 58, 237, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Modal right side column controls */
.editor-column-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Future Phases indicator styles */
.ai-controls-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(14, 165, 233, 0.05));
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.ai-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ai-controls-header h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.ai-badge {
  background-color: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.ai-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.select-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-wrapper label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.select-sm {
  padding: 8px 12px;
  font-size: 0.82rem;
  width: 100%;
}

.future-phase-lock {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}

.future-phase-lock i {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 6px;
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

.future-phase-lock h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.future-phase-lock p {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 250px;
  margin-top: 2px;
}

/* Modal footer styling */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.15);
}

/* Toast alert elements styling */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success i {
  color: var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-error i {
  color: var(--danger);
}

.toast-info {
  border-left: 4px solid var(--info);
}
.toast-info i {
  color: var(--info);
}

/* Helper spacing utility classes */
.mt-1 { margin-top: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Segmented Control Pill Toggles (MXH vs Web News Feeds) */
.feed-segmented-control {
  display: flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--radius-md);
  gap: 6px;
  width: fit-content;
  margin-bottom: 20px;
}

.segment-btn {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.segment-btn i {
  font-size: 0.95rem;
  transition: var(--transition);
}

.segment-btn:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.segment-btn.active {
  background: linear-gradient(135deg, var(--primary), hsl(260, 90%, 68%));
  color: white;
  box-shadow: 0 4px 12px 0 rgba(124, 58, 237, 0.3);
}

.segment-btn.active i {
  color: white;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .main-content {
    margin-left: 0;
    padding: 20px;
  }
  .editor-grid, .grid-two-columns, .settings-grid {
    grid-template-columns: 1fr;
  }
  .editor-column-left {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
  }
  .feed-segmented-control {
    width: 100%;
    flex-direction: column;
  }
  .segment-btn {
    width: 100%;
    justify-content: center;
  }
}
