/* LexiTok AI - Premium Dark Glassmorphism CSS Stylesheet */

:root {
  /* HSL Tailored Theme Colors */
  --bg-color: hsl(222, 47%, 7%);
  --panel-bg: hsla(220, 39%, 12%, 0.65);
  --panel-border: hsla(220, 30%, 25%, 0.45);
  --accent-glow: hsla(168, 100%, 50%, 0.15);
  
  --color-primary: hsl(200, 100%, 50%);    /* Electric Blue */
  --color-accent: hsl(282, 100%, 60%);     /* neon Violet */
  --color-success: hsl(168, 100%, 46%);    /* Emerald Green */
  --color-warning: hsl(43, 100%, 50%);     /* Amber Gold */
  --color-danger: hsl(355, 100%, 63%);     /* Coral Red */
  
  --text-main: hsl(210, 38%, 95%);
  --text-muted: hsl(215, 20%, 65%);
  --text-dark: hsl(220, 40%, 15%);
  
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
}

/* RESET & BASE STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* DYNAMIC BACKGROUND GLOWS */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: float 25s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 80%);
}

.orb-2 {
  bottom: 10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 80%);
  animation-duration: 35s;
}

.orb-3 {
  bottom: 40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-success) 0%, transparent 80%);
  animation-duration: 20s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.15); }
  100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* PREMIUM GLASS PANEL COMPONENT */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* AUTHENTICATION LAYOUT */
.auth-container {
  max-width: 480px;
  margin: 100px auto;
  padding: 40px;
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 2.2rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 150, 255, 0.4));
}

.logo .accent {
  color: var(--color-success);
  text-shadow: 0 0 15px rgba(0, 255, 200, 0.3);
}

#auth-subtitle {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-form h2 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  text-align: center;
  position: relative;
}

.auth-form h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-success);
  border-radius: 2px;
}

.badge-trial {
  background: rgba(0, 255, 200, 0.12);
  border: 1px solid rgba(0, 255, 200, 0.3);
  color: var(--color-success);
  padding: 12px;
  border-radius: var(--border-radius-md);
  margin-bottom: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* INPUT WRAPPERS */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.05rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: rgba(13, 20, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 13px 15px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.input-wrapper input {
  padding-left: 45px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(13, 20, 38, 0.95);
  box-shadow: 0 0 10px rgba(0, 150, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #0077ff);
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 150, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 150, 255, 0.5);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), #c700ff);
  color: #fff;
  box-shadow: 0 5px 15px rgba(199, 0, 255, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(199, 0, 255, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-success), #00d680);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(0, 255, 200, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 200, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-success));
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 5px 20px rgba(0, 255, 200, 0.2);
}

.btn-gradient:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 255, 200, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.1rem;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

/* APP MAIN CONTAINER */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  gap: 20px;
  animation: fadeIn 0.5s ease-out;
}

/* APP HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.trial-indicator {
  background: rgba(199, 0, 255, 0.12);
  border: 1px solid rgba(199, 0, 255, 0.3);
  color: #d150ff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.9rem;
}

.user-profile i {
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* STATS OVERVIEW CARDS */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-md);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-title);
  line-height: 1.1;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.trigger-sync-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  display: flex;
  justify-content: stretch;
}

.trigger-sync-card button {
  width: 100%;
}

/* APP BODY WRAPPER */
.app-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

/* SIDEBAR NAV */
.sidebar {
  padding: 20px 10px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.15), rgba(0, 255, 200, 0.05));
  border-left: 4px solid var(--color-primary);
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(0,150,255,0.25);
}

/* TAB CONTENT PANES */
.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

.tab-header {
  margin-bottom: 25px;
}

.tab-header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

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

/* DASHBOARD WORKSPACE GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
}

.grid-col {
  display: flex;
  flex-direction: column;
  height: 600px;
  min-width: 0;
}

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

.col-header h2 {
  font-size: 1.25rem;
}

.badge {
  background: rgba(0, 150, 255, 0.15);
  border: 1px solid rgba(0, 150, 255, 0.3);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-success {
  background: rgba(0, 255, 200, 0.15);
  border-color: rgba(0, 255, 200, 0.3);
  color: var(--color-success);
}

/* SCROLL LISTS */
.news-scroll-list,
.scripts-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* CARDS */
.news-card, .script-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-md);
  padding: 16px;
  transition: var(--transition-smooth);
}

.news-card:hover, .script-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-source {
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
}

.news-time {
  font-size: 0.78rem;
}

.news-card h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
}

.news-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 15px;
}

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

/* VIRAL SCORE METER */
.viral-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  padding: 4px 10px;
  border-radius: 20px;
}

.viral-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.viral-score {
  font-weight: 800;
  font-size: 0.95rem;
}

.score-high { color: var(--color-success); text-shadow: 0 0 10px rgba(0, 255, 200, 0.4); }
.score-medium { color: var(--color-warning); }
.score-low { color: var(--text-muted); }

/* SCRIPT CARD SPECIFICS */
.script-card h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.script-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.tg-status {
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 12px;
}

.tg-sent { background: rgba(0, 255, 200, 0.1); color: var(--color-success); }
.tg-pending { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

/* SOURCES TAB LAYOUT */
.sources-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.source-card-form {
  padding: 25px;
}

.source-card-form h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.source-table-card {
  padding: 25px;
}

.source-table-card h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

/* PREMIUM TABLE */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.premium-table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.premium-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

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

.table-source-name {
  font-weight: 600;
  color: var(--text-main);
}

.table-source-url {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.82rem;
}

/* TOGGLE SWITCH BUTTON */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .slider {
  background-color: var(--color-success);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* SETTINGS TAB LAYOUT */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.settings-card {
  padding: 30px;
}

.settings-card h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
}

.glow-text-info {
  display: block;
  margin-top: 10px;
  color: #d150ff;
  font-weight: 500;
}

.premium-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 40px;
  cursor: pointer;
}

/* SCRIPT EDITOR MODAL STYLING */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  width: 95vw;
  max-width: 1100px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

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

.modal-header h2 {
  font-size: 1.4rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  color: var(--color-danger);
}

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

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: rgba(13, 20, 38, 0.4);
}

/* STATE GRAPHICS (LOADING / EMPTY) */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 200px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.loading-state i {
  font-size: 2rem;
  color: var(--color-primary);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 2px dashed rgba(255,255,255,0.05);
  border-radius: var(--border-radius-md);
  margin: 15px 0;
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* FLOATING NOTIFICATION */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--panel-bg);
  border: 1px solid var(--color-primary);
  box-shadow: 0 10px 30px rgba(0, 150, 255, 0.2), 0 0 15px rgba(0, 150, 255, 0.1);
  padding: 15px 25px;
  border-radius: var(--border-radius-md);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.notification.success {
  border-color: var(--color-success);
  box-shadow: 0 10px 30px rgba(0, 255, 200, 0.2);
}

.notification.error {
  border-color: var(--color-danger);
  box-shadow: 0 10px 30px rgba(255, 0, 80, 0.2);
}

/* UTILITY CLASSES */
.hidden { display: none !important; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* NEWS SOURCE URL INLINE LINK */
.news-source-url {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
  margin-left: 8px;
  transition: var(--transition-smooth);
  vertical-align: middle;
}

.news-source-url:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 150, 255, 0.5);
}

/* TABLE SOURCE URL LINK */
.table-source-url {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.82rem;
  text-decoration: none;
}

.table-source-url:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* MODAL NEWS LINK */
.modal-news-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: 4px;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.modal-news-source-link:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 150, 255, 0.4);
}

/* SCRIPT TYPE TABS (storyboard / handheld) */
.script-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 14px;
}

.script-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.script-tab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
}

.script-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.18), rgba(0, 255, 200, 0.08));
  border-color: rgba(0, 150, 255, 0.4);
  color: var(--color-primary);
}

.script-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.script-tab-pane.active {
  display: block;
}

/* HANDHELD INFO BANNER */
.handheld-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 255, 200, 0.07);
  border: 1px solid rgba(0, 255, 200, 0.25);
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  font-size: 0.88rem;
  color: var(--color-success);
  margin-bottom: 20px;
  font-weight: 600;
}

.handheld-info-banner i {
  font-size: 1.3rem;
}

/* SCRIPT CARD — NEWS REF LINK */
.script-news-ref {
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.script-news-ref a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.script-news-ref a:hover {
  color: var(--color-primary);
}

/* SCRIPT CARD — VARIANT BADGES */
.script-variants-badges {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.variant-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(0, 150, 255, 0.1);
  border: 1px solid rgba(0, 150, 255, 0.25);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-primary);
}

.variant-badge-cam {
  background: rgba(0, 255, 200, 0.1);
  border-color: rgba(0, 255, 200, 0.25);
  color: var(--color-success);
}

/* SCRIPT BODY EXCERPT */
.script-body-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
}

/* MODAL 2-COLUMN GRID LAYOUT (no scroll on desktop) */
#script-tab-storyboard {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

#script-tab-storyboard.active {
  display: grid;
}

/* Title spans both columns */
#script-tab-storyboard .form-group:first-child {
  grid-column: 1 / -1;
}

/* visual_cues textarea spans both columns */
#script-tab-storyboard .form-group:last-child {
  grid-column: 1 / -1;
}

/* Reduce textarea row heights inside modal to avoid scroll */
#script-tab-storyboard textarea,
#script-tab-handheld textarea {
  min-height: 80px;
  resize: vertical;
}

#script-tab-storyboard #modal-script-body {
  min-height: 110px;
}

#script-tab-storyboard #modal-script-visual {
  min-height: 90px;
}

#script-tab-handheld {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

#script-tab-handheld.active {
  display: grid;
}

/* handheld-info-banner and handheld-body span full width */
#script-tab-handheld .handheld-info-banner,
#script-tab-handheld .form-group:nth-child(3) {
  grid-column: 1 / -1;
}

#modal-handheld-body {
  min-height: 120px;
}

/* Reduce form-group margins inside modal */
.modal-body .form-group {
  margin-bottom: 14px;
}

.modal-body .form-group label {
  margin-bottom: 5px;
  font-size: 0.82rem;
}

.modal-body input[type="text"],
.modal-body textarea {
  font-size: 0.9rem;
  padding: 10px 13px;
}
