:root {
  --bg-color: #080c16;
  --glass-bg: rgba(19, 27, 46, 0.8);
  --glass-card: rgba(26, 38, 64, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-active: rgba(99, 102, 241, 0.5);
  --primary-color: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --primary-hover: #4f46e5;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success-color: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning-color: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --error-color: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --input-bg: rgba(12, 18, 34, 0.75);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%), 
    radial-gradient(at 50% 10%, rgba(168, 85, 247, 0.15) 0, transparent 50%), 
    radial-gradient(at 100% 90%, rgba(14, 165, 233, 0.15) 0, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 1180px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  transition: max-width 0.3s ease;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
  overflow: visible;
}

.login-card {
  max-width: 440px;
  margin: 0 auto;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Login Card */
.login-card {
  text-align: center;
  padding: 2.5rem 1.8rem;
}

.lock-icon {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pin-input {
  width: 100%;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 0.9rem;
  background: var(--input-bg);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.pin-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.auth-error-badge {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.2rem;
}

.remember-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.5px;
  text-decoration: none;
  user-select: none;
}

.logo-ai-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.logo-ai-img-large {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.logo:hover .logo-ai-img,
.suno-brand-logo:hover .logo-ai-img-large {
  transform: scale(1.08);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color, #6366f1), #ec4899);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  font-size: 1.1rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
  transform: scale(1.08);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 3px 4px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: var(--primary-color, #6366f1);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

/* App Navbar (Header inside glass-card) */
.app-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 1.6rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.app-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

/* Profile Dropdown Container & Pill */
.profile-dropdown-container {
  position: relative;
  flex-shrink: 0;
}

.profile-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px 10px 4px 5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  max-width: 165px;
  box-sizing: border-box;
}

.profile-pill-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(99, 102, 241, 0.4);
}

.pill-avatar {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.4));
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.pill-login {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pill-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.pill-dot.pending {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

.pill-dot.suspended {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.pill-chevron {
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
}

.profile-pill-btn[aria-expanded="true"] .pill-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu Box */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 270px;
  background: #12151e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 5000;
  animation: fadeInMenu 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding-bottom: 8px;
}

.dropdown-user-full {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
  margin-bottom: 6px;
}

.dropdown-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dropdown-expire {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
}

.dropdown-limits {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
}

.dropdown-limit-title {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2px;
}

.dropdown-limit-count {
  font-size: 0.84rem;
  color: #ffffff;
}

.dropdown-limit-count b {
  color: #38bdf8;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 8px 0;
}

.dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.dropdown-logout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  color: #f87171;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(236, 72, 153, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-login {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.profile-meta-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.plan-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
}
.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-badge.suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.expire-pill {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.profile-limits-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.limit-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.limit-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}
.limit-count b {
  color: #38bdf8;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

h1 {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.label-with-action label {
  margin-bottom: 0;
}

.btn-toggle-limits {
  background: none;
  border: none;
  color: #818cf8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-toggle-limits:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* Caption Header & AI Subtitles Actions */
.caption-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.55rem;
}

.caption-header-row label {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.caption-ai-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-ai-action svg {
  display: block;
  flex-shrink: 0;
}

.btn-ai-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-ai-action:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ai-generate-post {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

.btn-ai-generate-post:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

.btn-ai-subtitles {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.btn-ai-subtitles:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

.btn-ai-download-srt {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}

.btn-ai-download-srt:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: #ffffff;
}

.btn-caption-fullscreen {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 6px 9px;
}

.btn-caption-fullscreen:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-ai-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.ai-btn-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 2px;
}

.ai-btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .caption-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .caption-ai-actions {
    width: 100%;
  }
  .btn-ai-action {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* File Drop Area */
.file-drop-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 1.2rem;
  border: 1.5px dashed rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-align: center;
}

.file-drop-area:hover, .file-drop-area.dragover {
  border-color: #818cf8;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.2);
}

.file-drop-area.has-file {
  border-style: solid;
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(15, 23, 42, 0.88);
}

.file-drop-area input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.file-icon {
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
}

.file-msg {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.file-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Video Analysis Card (Collapsible Accordion) */
.video-analysis-card {
  margin-top: 0.75rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: hidden;
  animation: fadeIn 0.3s ease forwards;
}

.file-params-trigger {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #f1f5f9;
  text-align: left;
  user-select: none;
  transition: background 0.2s ease;
}

.file-params-trigger:hover {
  background: rgba(99, 102, 241, 0.08);
}

.file-params-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-params-trigger-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-params-icon {
  font-size: 1rem;
}

.file-params-summary {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.file-params-arrow {
  color: #c4b5fd;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
  transition: transform 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.file-params-trigger:hover .file-params-arrow {
  background: rgba(139, 92, 246, 0.35);
  border-color: rgba(167, 139, 250, 0.6);
  color: #ffffff;
}

.file-params-trigger.expanded .file-params-arrow {
  transform: rotate(180deg);
}

.file-params-body {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.analysis-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #c7d2fe;
}

.analysis-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.analysis-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.item-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.item-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Optimization Toggle Cards */
.compression-option-row {
  margin: 0.7rem 0;
  padding: 0.8rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
}

.checkbox-container input {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.option-text {
  font-size: 0.84rem;
  color: #e0e7ff;
  line-height: 1.35;
}

/* Platform Compatibility Tags Grid */
.platform-compat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.45rem;
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.compat-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.compat-tag.ok {
  background: var(--success-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.compat-tag.warn {
  background: var(--warning-bg);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Limits Accordion */
.limits-accordion {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.limits-table {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  font-size: 0.82rem;
}

.limit-platform {
  flex-shrink: 0;
}

.limit-desc {
  text-align: right;
  line-height: 1.4;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.badge-yt { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-tt { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-ig { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-fb { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-th { background: rgba(255, 255, 255, 0.15); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.25); }

.limit-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* Textarea & Fullscreen Editor */
textarea {
  width: 100%;
  min-height: 180px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
  transition: all 0.25s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* =========================================================================
   Fullscreen Caption Editor Modal (Viewport-wide, immune to CSS containment)
   ========================================================================= */
body.caption-fs-lock {
  overflow: hidden !important;
}

.caption-fs-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background: rgba(8, 12, 22, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.caption-fs-window {
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  height: 92dvh;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fsPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fsPopIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.caption-fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.caption-fs-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caption-fs-icon {
  font-size: 1.6rem;
}

.caption-fs-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.caption-fs-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}

.caption-fs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caption-fs-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.caption-fs-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.caption-fs-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.caption-fs-close-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ffffff;
  transform: scale(1.08);
}

.caption-fs-body {
  flex: 1;
  padding: 1.2rem 1.4rem;
  display: flex;
  min-height: 0;
}

.caption-fs-body textarea {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: rgba(10, 15, 30, 0.9) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: 14px !important;
  padding: 1.2rem 1.4rem !important;
  color: #f8fafc !important;
  font-size: 1.05rem !important;
  line-height: 1.65 !important;
  font-family: inherit !important;
  resize: none !important;
  box-sizing: border-box !important;
}

.caption-fs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.caption-fs-footer-info {
  font-size: 0.82rem;
  color: #94a3b8;
}

.caption-fs-done-btn {
  padding: 8px 18px;
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .caption-fs-overlay {
    padding: 0 !important;
  }
  .caption-fs-window {
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
  .caption-fs-header {
    padding: 0.8rem 1rem;
  }
  .caption-fs-body {
    padding: 0.8rem 1rem;
  }
  .caption-fs-body textarea {
    font-size: 0.95rem !important;
    padding: 1rem !important;
  }
  .caption-fs-footer {
    padding: 0.8rem 1rem;
  }
  .caption-fs-footer-info {
    display: none;
  }
  .caption-fs-done-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================================
   Telegram AI Styles Preset Modal
   ========================================================================= */
.modal-overlay .ai-style-modal-card,
.modal-card.ai-style-modal-card {
  max-width: 780px !important;
  width: 95%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
}

.ai-style-header {
  margin-bottom: 1.2rem;
  text-align: left;
}

.ai-style-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.ai-style-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.ai-style-sub {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.ai-styles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 1.2rem;
}

.ai-style-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: left;
  user-select: none;
  display: flex;
  align-items: center;
  min-height: 56px;
  box-sizing: border-box;
}

.ai-style-card:hover {
  background: rgba(99, 102, 241, 0.09);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.ai-style-card.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.2));
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35), 0 4px 14px rgba(99, 102, 241, 0.25);
}

.ai-style-card[data-style="custom"] {
  grid-column: 1 / -1;
}

.ai-style-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.style-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.style-head-title {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.style-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-name-ua {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
}

.style-info-btn {
  background: #0284c7;
  border: 1px solid #38bdf8;
  color: #ffffff;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all 0.18s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.4);
}

.style-info-btn:hover {
  background: #0369a1;
  border-color: #7dd3fc;
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.6);
}

.style-short-desc {
  display: none !important;
}

/* Style Info Drawer */
.style-info-drawer {
  background: rgba(10, 15, 30, 0.96);
  border: 1px solid rgba(99, 102, 241, 0.5);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 1.2rem;
  animation: slideDownDrawer 0.2s ease forwards;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@keyframes slideDownDrawer {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #c7d2fe;
}

.drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
}

.drawer-close:hover {
  color: #fff;
}

.drawer-section {
  margin-bottom: 8px;
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.drawer-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 3px;
}

.drawer-text {
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.drawer-prompt {
  font-size: 0.78rem;
  font-family: inherit;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #818cf8;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
}

/* Custom Prompt Area */
.custom-prompt-container {
  margin-bottom: 1rem;
  text-align: left;
}

.custom-prompt-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c7d2fe;
  margin-bottom: 6px;
}

.custom-prompt-input {
  width: 100%;
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}

.custom-prompt-input:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ai-style-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0.5rem;
}

.btn-generate-post-submit {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

@media (max-width: 600px) {
  .ai-styles-grid {
    grid-template-columns: 1fr;
  }
  .ai-style-modal-actions {
    flex-direction: column-reverse;
  }
  .ai-style-modal-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Platform Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.platform-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-checkbox:hover {
  border-color: var(--glass-border-active);
  background: rgba(30, 41, 59, 0.7);
}

.platform-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--glass-border);
  border-radius: 5px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
}

.platform-checkbox input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.checkmark::after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.platform-checkbox input:checked ~ .checkmark::after {
  display: block;
}

/* Official Platform Brand Logo Badges */
.platform-logo-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 9px;
  transition: transform 0.2s ease;
}

.platform-checkbox:hover .platform-logo-badge {
  transform: scale(1.06);
}

.platform-logo-badge svg {
  display: block;
}

.platform-logo-badge.logo-tiktok {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.platform-logo-badge.logo-facebook {
  background: #1877F2;
  color: #ffffff;
}

.platform-logo-badge.logo-youtube {
  background: #FF0000;
  color: #ffffff;
}

.platform-logo-badge.logo-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #ffffff;
}

.platform-logo-badge.logo-threads {
  background: #101012;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.platform-logo-badge.logo-telegram {
  background: #24A1DE;
  color: #ffffff;
}

.platform-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.platform-name {
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  color: white;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(79, 70, 229, 0.5);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6d28d9 100%);
}

.btn-submit-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-submit:hover .btn-submit-icon {
  transform: translateX(2px) translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Modal Overlay: ALWAYS hidden by default */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: rgba(6, 9, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1.2rem;
  margin: 0;
  box-sizing: border-box;
}

.modal-card {
  background: #162036;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.8rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1.2rem;
}

.modal-desc a {
  color: #818cf8;
  text-decoration: underline;
}

/* Token Tabs */
.token-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  background: rgba(10, 15, 29, 0.6);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
}

.tab-btn {
  flex: 1;
  padding: 0.65rem 0.8rem;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-save-token {
  margin-top: 0.6rem;
  padding: 0.85rem;
  font-size: 0.95rem;
}

.btn-modal-done {
  width: 100%;
  padding: 0.9rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-done:hover {
  background: rgba(16, 185, 129, 0.3);
}

.modal-result {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.modal-result.success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.modal-result.error {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Progress Card Elements */
.progress-card {
  max-width: 520px;
}

.stage-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.stage-name {
  font-size: 1rem;
  font-weight: 700;
  color: #c7d2fe;
}

.stage-percent {
  font-size: 1.15rem;
  font-weight: 800;
  color: #38bdf8;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(10, 15, 29, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  text-align: right;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
}

.step-item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

.step-item.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.step-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.step-content {
  flex-grow: 1;
}

.step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.step-status {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.platform-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Safe to Close Banner (Shown when media upload to server completes) */
.safe-close-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  animation: fadeIn 0.3s ease;
}

.safe-close-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.safe-close-body {
  font-size: 0.82rem;
  line-height: 1.45;
}

.safe-close-title {
  font-weight: 700;
  color: #34d399;
  margin-bottom: 2px;
}

.safe-close-text {
  color: #cbd5e1;
}

.platform-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 0.84rem;
}

.platform-result-item .p-name {
  font-weight: 700;
  color: var(--text-primary);
}

.platform-result-item .p-status.loading { color: #fbbf24; font-size: 0.78rem; }
.platform-result-item .p-status.success { color: #34d399; font-weight: 700; font-size: 0.8rem; }
.platform-result-item a.p-status-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #34d399;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.platform-result-item a.p-status-link:hover {
  color: #ffffff;
  background: rgba(52, 211, 153, 0.25);
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
  transform: translateY(-1px);
}
.platform-result-item .p-status.error { color: #f87171; font-weight: 700; font-size: 0.8rem; }

/* Warning Banner for 55+ days */
.warning-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  padding: 0.85rem 1.2rem;
  border-radius: 16px;
  font-size: 0.88rem;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.warning-banner a {
  color: #fef08a;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

/* Token Tabs Styling */
.token-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.token-tabs .tab-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.token-tabs .tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.token-tabs .tab-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.9rem 1.4rem;
  background: rgba(22, 32, 54, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  color: white;
  transform: translateX(140%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999999;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
  font-size: 0.9rem;
  font-weight: 600;
}

.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--error-color); }

/* Loading Spinner */
.loading-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .loading-spinner { display: block; }

@media (max-width: 580px) {
  body {
    padding: 0.75rem 0.5rem;
  }
  .glass-card {
    padding: 1.4rem 1.1rem;
    border-radius: 20px;
  }
  .app-navbar {
    gap: 6px;
    margin-bottom: 1.3rem;
  }
  .app-nav-right {
    gap: 6px;
  }
  .btn-tariff-pill .pill-change-tag {
    display: none;
  }
  .pill-login {
    max-width: 65px;
  }
  .platforms-grid {
    grid-template-columns: 1fr;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .platform-compat-row {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 440px) {
  .app-navbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .app-nav-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   ADVANCED AUTHENTICATION SYSTEM (TABS, GOOGLE SIGN-IN, TELEGRAM, REGISTRATION)
   ========================================================================== */
.auth-container {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.auth-card {
  padding: 2.2rem 2rem;
  text-align: left;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.auth-brand .logo-icon {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

.auth-brand .brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.6rem;
  position: relative;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-tab-btn:hover {
  color: var(--text-primary);
}

.auth-tab-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.auth-pane {
  display: none;
  animation: fadeInPane 0.3s ease forwards;
}

.auth-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-pane-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
  text-align: center;
}

.auth-pane-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.4rem;
}

/* Contact Mode Switcher (Phone / Email) */
.mode-switch-wrapper {
  display: flex;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-pill {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s;
}

.mode-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Inputs styling */
.auth-input-group {
  margin-bottom: 1.1rem;
  position: relative;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.25s ease;
  font-family: inherit;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .auth-input {
  padding-right: 42px;
}

.toggle-pass-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-pass-btn:hover {
  color: var(--text-primary);
}

/* Plan selector grid in registration */
.plan-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.2rem;
}

.plan-select-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.plan-select-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
}

.plan-select-card.active {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.plan-select-card input[type="radio"] {
  display: none;
}

.plan-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.plan-card-limit {
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 4px;
}

.plan-card-price {
  font-size: 0.8rem;
  font-weight: 800;
  color: #a855f7;
}

.plan-badge-rec {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Honeypot hidden input */
.hp-check-val-field {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  z-index: -10;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.4rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  padding: 0 12px;
}

/* Social Buttons */
.social-auth-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.btn-telegram-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(34, 158, 217, 0.15);
  border: 1px solid rgba(34, 158, 217, 0.4);
  color: #38bdf8;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-telegram-auth:hover {
  background: #229ed9;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.35);
  transform: translateY(-1px);
}

.btn-telegram-auth svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.google-auth-box {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-top: 0.8rem;
}

.auth-link {
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Message boxes */
.auth-msg-box {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.1rem;
  text-align: center;
  line-height: 1.45;
}

.auth-msg-box.msg-error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-msg-box.msg-success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* ==========================================================================
   SUNO-STYLE MINIMALIST AUTH (Google, Apple, Telegram)
   ========================================================================== */
.suno-auth-container {
  max-width: 440px;
  width: 100%;
  margin: 40px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* Auth Page Top Nav (Clean row above the card) */
.auth-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 18px;
  padding: 0 4px;
  box-sizing: border-box;
}

.auth-top-nav .logo {
  font-size: 1.25rem;
}

.suno-card {
  width: 100%;
  box-sizing: border-box;
  background: #17181c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 34px 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.suno-header {
  text-align: center;
  margin-bottom: 26px;
}

.suno-brand-logo {
  display: inline-flex;
  margin-bottom: 12px;
  text-decoration: none;
}

.suno-brand-link {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s, filter 0.2s;
  display: inline-block;
}

.suno-brand-link:hover {
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.6));
}

.suno-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.suno-subtitle {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

.suno-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suno-google-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  position: relative;
}

.suno-google-btn-wrap > div {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.suno-google-btn-wrap iframe {
  margin: 0 auto !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.suno-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: #25272e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
  padding: 0 16px;
  -webkit-appearance: none;
  appearance: none;
}

.suno-btn:hover {
  background: #2f323b;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.suno-btn:active {
  transform: translateY(1px);
}

.suno-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.suno-btn-tg {
  border-color: rgba(0, 136, 204, 0.3);
}

.suno-btn-tg:hover {
  background: #1c2e3d;
  border-color: rgba(0, 136, 204, 0.6);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0 14px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.8rem;
  font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.auth-divider span {
  padding: 0 12px;
}

/* Email Auth Container & Tabs */
.email-auth-section {
  width: 100%;
}

.email-auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
}

.email-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  user-select: none;
}

.email-tab-btn:hover {
  color: #ffffff;
}

.email-tab-btn.active {
  background: #252834;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 0.95rem;
  color: #ffffff;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.auth-input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}
.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.btn-primary {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  box-sizing: border-box;
  font-family: inherit;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.45);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none;
  appearance: none;
  z-index: 25;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.06);
}

/* Sleek Forgot Password & Auth Modal Redesign */
.forgot-modal-card {
  max-width: 440px !important;
  width: 100% !important;
  text-align: center !important;
  background: #171821 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 26px !important;
  padding: 34px 28px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

.forgot-icon-badge {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
}

.forgot-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.forgot-subtitle {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-bottom: 18px;
}

.forgot-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 0.95rem;
  color: #ffffff;
  box-sizing: border-box;
  transition: all 0.2s ease;
  outline: none;
}

.forgot-input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.forgot-btn-primary {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
}

.forgot-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.45);
}

.forgot-btn-primary:active {
  transform: translateY(1px);
}

.forgot-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-step-hint {
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  font-size: 0.84rem;
  color: #c7d2fe;
  margin-bottom: 12px;
  text-align: center;
}

.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
  display: inline-block;
}
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   PAYWALL PRICING MODAL (Vibrant modern style matching pricing.php)
   ========================================================================== */
.paywall-modal-card {
  max-width: 900px !important;
  width: 95% !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, #0d1322 0%, #080c16 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 28px !important;
  padding: 38px 32px 32px !important;
  position: relative !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 45px rgba(99, 102, 241, 0.15) !important;
}

.modal-close-btn {
  position: absolute !important;
  top: 20px !important;
  right: 22px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  z-index: 20 !important;
  outline: none !important;
  padding: 0 !important;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  transform: scale(1.08) !important;
}

.paywall-header {
  text-align: center;
  margin-bottom: 22px;
}

.paywall-badge {
  display: inline-block;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.paywall-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.paywall-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Pricing Switcher */
.pricing-switcher-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
  font-weight: 600;
}

.pricing-switcher-wrap .switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
}

.pricing-switcher-wrap .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pricing-switcher-wrap .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.16);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-switcher-wrap .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.pricing-switcher-wrap input:checked + .slider {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-color: rgba(168, 85, 247, 0.4);
}

.pricing-switcher-wrap input:checked + .slider:before {
  transform: translateX(26px);
}

.pricing-switcher-wrap .discount-badge {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
}

/* Paywall Plans Grid */
.paywall-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

@media (max-width: 768px) {
  .paywall-plans-grid {
    grid-template-columns: 1fr;
  }
}

.paywall-plan-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.paywall-plan-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-3px);
}

/* Featured card base style when NOT active */
.paywall-plan-card.featured {
  border-color: rgba(139, 92, 246, 0.28);
}

/* ONLY the selected (.active) card gets the glowing neon purple border and gradient */
.paywall-plan-card.active {
  border: 2px solid #8b5cf6 !important;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.4), 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  transform: translateY(-3px);
}

.paywall-featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

.current-plan-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.paywall-plan-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.paywall-plan-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  min-height: 38px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.paywall-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.paywall-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}

.paywall-price {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.1;
}

.paywall-price-wrap .old-price {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  white-space: nowrap;
}

.paywall-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #94a3b8;
  white-space: nowrap;
}

.paywall-equiv {
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.paywall-period {
  font-size: 0.88rem;
  color: #94a3b8;
  white-space: nowrap;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 0.86rem;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.paywall-features li {
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.paywall-features .f-check {
  color: #38bdf8;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}

/* Default button for non-active cards */
.paywall-choose-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

/* ONLY active card button gets the purple gradient */
.paywall-plan-card.active .paywall-choose-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45) !important;
}

.paywall-choose-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

/* Tariff Pill Button in Navbar */
.btn-tariff-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 4px 10px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-tariff-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-tariff-pill .pill-change-tag {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 600;
}

.btn-upgrade-limit-action {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e0e7ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-upgrade-limit-action:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.5));
  border-color: #c084fc;
  color: #ffffff;
}

.plan-change-alert {
  padding: 12px 18px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.45;
}

.plan-change-upgrade {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #cbd5e1;
}

.plan-change-downgrade {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.plan-change-same {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

/* Paywall Payment Box */
.paywall-payment-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pay-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pay-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pay-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pay-tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45) !important;
}

.paywall-tab-content {
  display: none;
}

.paywall-tab-content.active {
  display: block;
}

.req-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.copy-pill-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-pill-btn:hover {
  background: rgba(99, 102, 241, 0.4);
  border-color: #818cf8;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* =========================================================================
   Tokens Warning Banner & Menu Highlighting
   ========================================================================= */
.tokens-warning-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
  animation: bannerPulse 3.5s infinite ease-in-out;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.tokens-warning-banner:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.14));
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.22);
}

@keyframes bannerPulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.45); box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15); }
  50% { border-color: rgba(245, 158, 11, 0.8); box-shadow: 0 6px 28px rgba(245, 158, 11, 0.3); }
}

.banner-content {
  width: 100%;
  box-sizing: border-box;
}

.banner-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 4px;
  line-height: 1.35;
}

.banner-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.banner-btn,
.banner-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  outline: none;
}

.banner-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fff;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.banner-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55);
  filter: brightness(1.06);
}

.banner-btn-tg {
  background: rgba(0, 136, 204, 0.15);
  border: 1px solid rgba(0, 136, 204, 0.4);
  color: #38bdf8;
}

.banner-btn-tg:hover {
  background: rgba(0, 136, 204, 0.28);
  border-color: rgba(56, 189, 248, 0.7);
  color: #bae6fd;
  transform: translateY(-1px);
}

.banner-btn-wa {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #4ade80;
}

.banner-btn-wa:hover {
  background: rgba(37, 211, 102, 0.28);
  border-color: rgba(74, 222, 128, 0.7);
  color: #bbf7d0;
  transform: translateY(-1px);
}

.banner-btn-contacts {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.banner-btn-contacts:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .tokens-warning-banner {
    padding: 14px 14px;
    gap: 10px;
    box-sizing: border-box;
  }
  .banner-title {
    font-size: 0.95rem;
  }
  .banner-desc {
    font-size: 0.84rem;
  }
  .banner-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    box-sizing: border-box;
  }
  .banner-btn,
  .banner-sub-btn {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    padding: 11px 14px;
    font-size: 0.86rem;
    white-space: normal;
    text-align: center;
  }
  .banner-btn-primary {
    font-size: 0.92rem;
    padding: 12px 14px;
  }
}

/* Dropdown Menu Token Item Highlighting */
.dropdown-menu-item.token-item-highlight {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  animation: itemBorderPulse 2.5s infinite ease-in-out;
}

@keyframes itemBorderPulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }
  50% { border-color: rgba(245, 158, 11, 0.7); background: rgba(245, 158, 11, 0.18); }
}

.token-status-pill {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.token-status-pill.pill-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.token-status-pill.pill-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* =========================================================================
   Client Tokens Modal Styling
   ========================================================================= */
.tokens-modal-card {
  width: 95%;
  max-width: 680px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.token-platform-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.token-platform-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.7);
}

.token-platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.token-platform-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.platform-icon {
  font-size: 1.1rem;
}

.platform-status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.token-input-group {
  margin-bottom: 10px;
}

.token-input-group:last-child {
  margin-bottom: 0;
}

.token-input-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.token-field {
  width: 100%;
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.token-field:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.token-field-hint {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
}

.token-field-hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
  color: #a5b4fc;
}

/* =========================================================================
   AI Assistant Floating Widget
   ========================================================================= */
.ai-assistant-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', system-ui, sans-serif;
}

.ai-assistant-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-assistant-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.ai-launcher-sparkle {
  font-size: 1.15rem;
  animation: sparkleRotate 3s infinite linear;
}

@keyframes sparkleRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: dotPulse 2s infinite ease-in-out;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Floating Chat Window */
.ai-chat-window {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 380px;
  height: 520px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpAi 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpAi {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.ai-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}

.ai-header-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-indicator {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ai-header-mgr {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-ai-header-mgr:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
  border-color: #818cf8;
}

.ai-chat-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.ai-chat-close-btn:hover {
  color: #fff;
}

/* Chat Messages Stream */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.ai-msg.ai-msg-ai {
  align-self: flex-start;
}

.ai-msg.ai-msg-user {
  align-self: flex-end;
}

.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-msg-ai .ai-msg-bubble {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.ai-msg-time {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 3px;
  padding: 0 4px;
}

.ai-msg-user .ai-msg-time {
  text-align: right;
}

/* Typing Indicator */
.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(1) { animation-delay: 0s; }
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Quick Suggestion Chips */
.ai-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
}

.ai-quick-chips::-webkit-scrollbar {
  display: none;
}

.ai-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.ai-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-1px);
}

/* Input Area */
.ai-chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-chat-input-area input {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.86rem;
  color: #fff;
  outline: none;
  transition: all 0.2s;
}

.ai-chat-input-area input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.ai-send-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.ai-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.55);
}

/* ==========================================================================
   AI Video Studio & Automount Options Box (Checkboxes)
   ========================================================================== */
.ai-automount-box {
  margin-top: 0.9rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.15);
  padding: 1.1rem;
  animation: fadeIn 0.3s ease forwards;
}

.ai-automount-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-automount-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ddd6fe;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-automount-badge {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ai-automount-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .ai-automount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Concise Collapsible Accordion: ШІ-автомонтаж (PRO / AI)
   ========================================================================== */
.ai-automount-accordion {
  margin: 0 0 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.ai-automount-accordion:hover {
  border-color: rgba(168, 85, 247, 0.55);
}

.ai-accordion-trigger {
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #f1f5f9;
  text-align: left;
  user-select: none;
  transition: background 0.2s ease;
}

.ai-accordion-trigger:hover {
  background: rgba(139, 92, 246, 0.08);
}

.ai-accordion-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-sparkle-icon {
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6));
}

.ai-accordion-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.ai-accordion-badge {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.ai-accordion-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-accordion-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
}

.ai-accordion-arrow {
  font-size: 0.85rem;
  color: #a78bfa;
  transition: transform 0.25s ease;
  display: inline-block;
}

.ai-accordion-trigger.expanded .ai-accordion-arrow {
  transform: rotate(180deg);
}

.ai-accordion-body {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 15, 30, 0.35);
}

/* 4 compact pill options */
.ai-automount-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 520px) {
  .ai-automount-pills {
    grid-template-columns: 1fr;
  }
}

.ai-pill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ai-pill-item:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}

.ai-pill-item input[type="checkbox"] {
  display: none;
}

.ai-pill-check {
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
}

.ai-pill-item input[type="checkbox"]:checked ~ .ai-pill-check {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #a78bfa;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.ai-pill-check::after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.ai-pill-item input[type="checkbox"]:checked ~ .ai-pill-check::after {
  display: block;
}

.ai-pill-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
}

/* Toolbar & buttons inside accordion */
.ai-automount-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-automount-run {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.35);
  transition: all 0.2s ease;
}

.btn-automount-run:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(124, 58, 237, 0.5);
  filter: brightness(1.08);
}

.btn-automount-run:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-automount-subtitles-quick {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-automount-subtitles-quick:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Video Preview Player Wrap */
.ai-preview-player-wrap {
  margin-top: 12px;
  background: #090d16;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.ai-cover-intro-overlay {
  position: absolute;
  top: 36px;
  bottom: 28px;
  left: 0;
  right: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 5;
  transition: opacity 0.35s ease;
  pointer-events: none;
  background-color: #000;
}

.ai-preview-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-preview-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
}

.ai-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-preview-dl {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-preview-dl:hover {
  background: #10b981;
  color: #fff;
}

.btn-preview-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.btn-preview-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.ai-preview-player-wrap video {
  width: 100%;
  max-height: 360px;
  display: block;
  background: #000;
  object-fit: contain;
}

.ai-preview-status-bar {
  padding: 6px 12px;
  font-size: 0.75rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Step Notice (Synchronization & Prerequisite) */
.ai-automount-step-notice {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.ai-automount-step-notice.ready {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* High-Impact Viral Subtitles in HTML5 Player (Yellow text with extra bold black stroke, +25% size) */
.ai-preview-player-wrap video::cue {
  background-color: transparent !important;
  color: #ffe600 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Montserrat", Impact, sans-serif !important;
  font-weight: 900 !important;
  -webkit-text-stroke: 2.5px #000000 !important;
  text-shadow: 
    -5px -5px 0 #000, 
    0 -5px 0 #000, 
    5px -5px 0 #000, 
    5px 0 0 #000, 
    5px 5px 0 #000, 
    0 5px 0 #000, 
    -5px 5px 0 #000, 
    -5px 0 0 #000,
    -4px -4px 0 #000, 
    4px -4px 0 #000, 
    4px 4px 0 #000, 
    -4px 4px 0 #000,
    -3px -3px 0 #000, 
    3px -3px 0 #000, 
    3px 3px 0 #000, 
    -3px 3px 0 #000,
    0 0 14px rgba(0, 0, 0, 0.98),
    0 6px 18px rgba(0, 0, 0, 0.99) !important;
  font-size: 1.6rem !important; /* +25% size */
  line-height: 1.3 !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
}

/* Custom Modern Glassmorphic Confirm Modal */
.custom-confirm-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 8, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
  animation: fadeIn 0.2s ease forwards;
}

.custom-confirm-card {
  background: linear-gradient(145deg, rgba(26, 27, 46, 0.98), rgba(15, 16, 28, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(124, 58, 237, 0.25);
  max-width: 440px;
  width: 100%;
  padding: 26px 24px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.custom-confirm-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.custom-confirm-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.custom-confirm-msg {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 22px;
}

.custom-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-confirm-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-confirm-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
}

.custom-confirm-btn-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-confirm-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
}

/* 0.5s Cover Thumbnail Preview Box */
.ai-cover-preview-box {
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.ai-cover-preview-thumb {
  width: 50px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.ai-cover-preview-meta {
  flex: 1;
  min-width: 0;
}

.ai-cover-preview-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-cover-preview-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.35;
}

/* ==========================================================================
   CONCEPT 1: MODERN SAAS / LINEAR WORKSPACE (DESKTOP & MOBILE RESPONSIVE)
   ========================================================================== */

/* 2-Column Responsive Workspace Grid (Equal 1:1 Left & Right Widths) */
.crosspost-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 1.2rem;
}

.workspace-main-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
}

.workspace-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 959px) {
  .container {
    max-width: 680px;
  }
  .glass-card {
    padding: 1.5rem 1.15rem;
    border-radius: 20px;
  }
  .crosspost-workspace-grid {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
  }
}

/* --------------------------------------------------------------------------
   Profile Dropdown Redesign: Minimal Meter & Clean SVG Icons
   -------------------------------------------------------------------------- */
.dropdown-limits-meter {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 11px 12px;
  margin: 10px 0;
}

.meter-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.meter-lbl {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.meter-val {
  font-size: 0.82rem;
  color: #f1f5f9;
}

.meter-val b {
  color: #818cf8;
  font-weight: 700;
}

.meter-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 9px;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.dropdown-limits-meter .btn-upgrade-limit-action {
  width: 100%;
  padding: 7px 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dropdown-limits-meter .btn-upgrade-limit-action:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.6);
}

.dropdown-menu-item .item-svg,
.dropdown-logout-item .item-svg {
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.dropdown-menu-item:hover .item-svg {
  color: #818cf8;
}

.dropdown-logout-item:hover .item-svg {
  color: #ef4444;
}

/* --------------------------------------------------------------------------
   Streamlined Media Drop & Inspector Card
   -------------------------------------------------------------------------- */
.media-card-group {
  margin-bottom: 0;
}

.file-drop-area {
  position: relative;
  border: 1.5px dashed rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  cursor: pointer;
  padding: 1.35rem 1.2rem;
  text-align: center;
}

.file-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  gap: 4px;
}

.file-drop-icon-box {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 2px;
}

.file-drop-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.file-change-pill {
  display: none;
  align-items: center;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

/* When a file is loaded: transform into a sleek horizontal media card! */
.file-drop-area.has-file {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 28, 48, 0.85);
  padding: 12px 16px;
  border-radius: 16px 16px 0 0;
}

.file-drop-area.has-file .file-drop-inner {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 14px;
}

.file-drop-area.has-file .file-drop-icon-box {
  font-size: 1.6rem;
  margin-bottom: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-drop-area.has-file .file-drop-meta {
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.file-drop-area.has-file .file-msg {
  font-size: 0.9rem;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.file-drop-area.has-file .file-hint {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
}

.file-drop-area.has-file .file-change-pill {
  display: inline-flex;
}

.file-drop-area.has-file:hover .file-change-pill {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

/* Seamless dock of video analysis card right below media card */
.file-drop-area.has-file + .video-analysis-card {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 16px 16px;
  border-color: rgba(52, 211, 153, 0.3);
}

/* --------------------------------------------------------------------------
   Caption Editor: Integrated Modern Bottom Toolbar
   -------------------------------------------------------------------------- */
.caption-editor-wrapper {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.caption-editor-wrapper:focus-within {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.caption-editor-wrapper textarea#caption {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  box-shadow: none;
  font-family: inherit;
  min-height: 140px;
}

.caption-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.5);
  gap: 10px;
  flex-wrap: wrap;
}

.caption-editor-toolbar .caption-ai-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.caption-editor-toolbar .btn-ai-action {
  padding: 5px 11px;
  font-size: 0.78rem;
  border-radius: 10px;
  font-weight: 600;
}

.caption-editor-toolbar .char-counter {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   AI Video Studio: Modern Toggle Switches
   -------------------------------------------------------------------------- */
.ai-automount-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ai-pill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ai-pill-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}

.ai-pill-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-pill-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f1f5f9;
}

.ai-pill-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.ai-pill-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Sleek iOS/Linear style toggle switch (Universal for Automount, Platforms & Cover) */
.cab-toggle-switch-wrap {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  width: 44px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.cab-toggle-switch-wrap input,
.cab-toggle-hidden-input,
.automount-toggle-input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

.cab-toggle-switch-wrap .cab-toggle-track,
.cab-toggle-switch-wrap .ai-toggle-switch,
.ai-toggle-switch {
  display: block !important;
  position: relative !important;
  width: 44px !important;
  height: 24px !important;
  background: #374151 !important;
  border-radius: 20px !important;
  border: none !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: background 0.25s ease, box-shadow 0.25s ease !important;
}

.cab-toggle-switch-wrap input:checked ~ .cab-toggle-track,
.cab-toggle-switch-wrap input:checked ~ .ai-toggle-switch,
.automount-toggle-row input:checked ~ .ai-toggle-switch,
input:checked ~ .ai-toggle-switch {
  background: #6366f1 !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35) !important;
}

.cab-toggle-switch-wrap .cab-toggle-knob,
.cab-toggle-switch-wrap .ai-toggle-slider,
.ai-toggle-slider {
  display: block !important;
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 18px !important;
  height: 18px !important;
  background: #ffffff !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cab-toggle-switch-wrap input:checked ~ .cab-toggle-track .cab-toggle-knob,
.cab-toggle-switch-wrap input:checked ~ .ai-toggle-switch .ai-toggle-slider,
.automount-toggle-row input:checked ~ .ai-toggle-switch .ai-toggle-slider,
input:checked ~ .ai-toggle-switch .ai-toggle-slider {
  transform: translateX(20px) !important;
}

/* Progressive Disclosure Card: Прев'ю-обкладинка (Left Column) */
.preview-cover-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  transition: all 0.25s ease;
}

.preview-cover-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-cover-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-cover-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-cover-icon svg {
  display: block;
}

.preview-cover-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preview-cover-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
}

.preview-cover-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.preview-cover-pill-label {
  padding: 0;
  background: transparent;
  border: none;
  margin: 0;
  cursor: pointer;
}

.preview-cover-pill-label:hover {
  background: transparent;
  border-color: transparent;
}

/* AI Cover Text Box */
.ai-cover-custom-wrap {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.ai-cover-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ai-cover-header-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0;
}

.btn-gen-cover-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-gen-cover-ai:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
}

.btn-gen-cover-ai svg {
  display: block;
}

.ai-cover-custom-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  color: #ffe600;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.35;
  text-transform: uppercase;
  font-family: inherit;
}

.ai-cover-custom-wrap textarea:focus {
  border-color: rgba(99, 102, 241, 0.7);
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.ai-cover-hint-text {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 5px;
}

/* Step Notice: clean subtle badge instead of harsh blue banner */
.ai-automount-step-notice {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-automount-step-notice.ready {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Platforms Card in Sidebar (Concept 1 / Screenshot 1 Match) */
.platforms-section-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.platforms-section-card .platform-header-row {
  margin-bottom: 12px;
}

.platforms-section-card .platform-header-row label {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.2px;
}

.platforms-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 0 !important;
}

.platform-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.platform-checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.platform-checkbox input.platform-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.platform-left-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  margin-right: 0;
}

.platform-checkbox:hover .platform-logo-badge {
  transform: scale(1.05);
}

.platform-logo-badge.logo-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #ffffff;
}

.platform-logo-badge.logo-tiktok {
  background: #010101;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.platform-logo-badge.logo-youtube {
  background: #ff0000;
  color: #ffffff;
}

.platform-logo-badge.logo-facebook {
  background: #1877F2;
  color: #ffffff;
}

.platform-logo-badge.logo-telegram {
  background: #24A1DE;
  color: #ffffff;
}

.platform-logo-badge.logo-threads {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.platform-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.platform-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.2;
}

.platform-status {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.platform-status.status-disabled {
  color: #64748b;
}

/* Linear/iOS Toggle Switch on Right (Screenshot 1 Match) */
.platform-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #374151;
  border-radius: 20px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.platform-switch-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Checked state: Purple/Violet Pill with Slider on the Right */
.platform-checkbox input:checked ~ .platform-switch {
  background: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.platform-checkbox input:checked ~ .platform-switch .platform-switch-slider {
  transform: translateX(20px);
}

.platform-checkbox input:not(:checked) {
  opacity: 0.65;
}

/* ==========================================================================
   Automount Section Card (Top block in right sidebar)
   ========================================================================== */
.automount-section-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.automount-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.automount-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.automount-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.automount-main-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.2px;
  margin: 0;
}

.automount-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.automount-toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.automount-toggle-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.automount-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.automount-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.automount-toggle-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.2;
}

.automount-toggle-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.2;
}

.automount-toggle-row .ai-toggle-switch {
  width: 44px;
  height: 24px;
  background: #374151;
  border-radius: 20px;
  border: none;
  position: relative;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.automount-toggle-row .ai-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.automount-toggle-row input:checked ~ .ai-toggle-switch {
  background: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.automount-toggle-row input:checked ~ .ai-toggle-switch .ai-toggle-slider {
  transform: translateX(20px);
}

.automount-actions {
  margin-top: 12px;
}

.btn-automount-run {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-automount-run:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-automount-run:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Ensure pixel-perfect horizontal top row alignment */
.workspace-main-col > *:first-child,
.workspace-sidebar-col > *:first-child {
  margin-top: 0 !important;
}

/* ==========================================================================
   INLINE VIDEO PREVIEW PLAYER (LEFT COLUMN)
   ========================================================================== */
.cab-player-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cab-player-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.cab-player-title {
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.btn-cab-change-media {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cab-change-media:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.cab-player-screen-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 380px;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.cab-player-screen-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cab-main-sub-overlay {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 23%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  z-index: 10;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.cab-main-sub-text {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #FFE600;
  text-align: center;
  line-height: 1.25;
  padding: 4px 10px;
  border-radius: 15px;
  text-shadow: 0 0 5px #000, 0 0 5px #000, 0 0 5px #000;
  transition: all 0.2s ease;
}

.cab-player-ctrls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cab-ctrl-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.1s;
}

.cab-ctrl-btn:hover {
  transform: scale(1.15);
  color: #a855f7;
}

.cab-ctrl-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.cab-ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.9);
}

.cab-ctrl-time {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  white-space: nowrap;
  min-width: 75px;
  text-align: right;
}

/* File Parameters Accordion Under Video */
.file-params-trigger {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  transition: background 0.15s;
}

.file-params-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-params-trigger-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cab-badge-ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.file-params-arrow {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.file-params-arrow.open {
  transform: rotate(180deg);
}

/* Pencil Icon Next to Video Montage Title */
.btn-cab-pencil-edit {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 8px;
}

.btn-cab-pencil-edit:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #8b5cf6;
  color: #ffffff;
  transform: scale(1.08);
}

/* ==========================================================================
   TYPOGRAPHY STUDIO MODAL & PHONE LIVE MONITOR
   ========================================================================== */
.studio-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 16, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.studio-modal-window {
  background: #090e1d;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 24px;
  width: 100%;
  max-width: 1260px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(139, 92, 246, 0.15);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.studio-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-close-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-modal-close-icon:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.studio-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.studio-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.btn-modal-apply {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
}

.btn-modal-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Studio Grid Inside Modal */
.studio-app-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-app-grid {
    grid-template-columns: 1fr;
  }
}

/* Tabs for Subtitles vs Cover Hook */
.preview-content-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-tab-btn {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.preview-tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.hook-input-wrapper {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
}

.hook-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  outline: none;
  resize: vertical;
  line-height: 1.4;
}

/* 8 FONT SELECTOR CARDS */
.font-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.font-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  box-sizing: border-box;
  overflow: hidden;
}

.font-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.font-card.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 0 1px #8b5cf6, 0 4px 16px rgba(139, 92, 246, 0.25);
}

.font-card-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.font-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.font-card-name {
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Two-Column Controls Matching User Screenshot 1 */
.controls-two-columns-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: rgba(10, 15, 28, 0.75);
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .controls-two-columns-box {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.ctrl-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  box-sizing: border-box;
}

.col-header-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.decor-mode-btns-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.decor-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  height: 28px;
  box-sizing: border-box;
}

.decor-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.decor-toggle-btn.active {
  background: #3b2d6a;
  border-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}

.color-swatches-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  height: 34px;
  box-sizing: border-box;
}

.swatch-item {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
  position: relative;
}

.swatch-item:hover {
  transform: scale(1.1);
}

.swatch-item.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.rainbow-swatch {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: conic-gradient(from 0deg, #ff0000, #ff7700, #ffdd00, #00ff00, #00ffff, #0000ff, #aa00ff, #ff00aa, #ff0000);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rainbow-swatch:hover {
  transform: scale(1.1);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
}

.rainbow-swatch input[type="color"] {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 70px;
  height: 70px;
  opacity: 0;
  cursor: pointer;
}

.slider-pill-container {
  background: rgba(6, 10, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  box-sizing: border-box;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider-pill-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.pill-range-input {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.pill-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.9);
  transition: transform 0.15s;
}

.slider-pill-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffe600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-width: 38px;
  text-align: right;
  line-height: 1;
  flex-shrink: 0;
}

/* Positioning Controls */
.position-controls-box {
  background: rgba(10, 15, 28, 0.75);
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
}

.pos-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pos-header-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pos-reset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-pos-reset:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
  border-color: #8b5cf6;
}

.pos-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 768px) {
  .pos-columns-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.pos-col-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-col-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.pos-align-btn-group {
  display: flex;
  background: rgba(6, 10, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px;
  gap: 4px;
  height: 44px;
  box-sizing: border-box;
}

.pos-align-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.pos-align-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.pos-align-btn.active {
  background: #3b2d6a;
  color: #ffffff;
  border: 1px solid #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.pos-val-pill {
  font-size: 0.72rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Smartphone Live Monitor (Right Column of Studio Modal) */
.phone-mockup-frame {
  width: 300px;
  height: 560px;
  background: #000000;
  border-radius: 40px;
  border: 8px solid #1e293b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 2px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 20px;
  background: #1e293b;
  border-radius: 12px;
  z-index: 50;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #050811;
  overflow: hidden;
}

.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.safe-zone-guide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px dashed rgba(239, 68, 68, 0.45);
  pointer-events: none;
  z-index: 9;
}

.safe-zone-label {
  position: absolute;
  top: 36px;
  left: 10px;
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.safe-zone-bottom-limit {
  position: absolute;
  bottom: 20%;
  left: 0;
  right: 0;
  border-bottom: 2px dashed rgba(239, 68, 68, 0.6);
}

.social-ui-mockup {
  position: absolute;
  right: 12px;
  bottom: 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 10;
}

.social-ui-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.live-subtitle-preview {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 23%;
  text-align: center;
  user-select: none;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.subtitle-text-element {
  display: inline-block;
  font-size: 24px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 7px 14px;
  border-radius: 15px;
  word-break: break-word;
  max-width: 95%;
  transition: all 0.15s ease;
}

.live-cover-preview {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 23%;
  text-align: center;
  user-select: none;
  z-index: 15;
  display: none;
  justify-content: center;
  align-items: center;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.cover-text-element {
  display: inline-block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 15px;
  max-width: 95%;
  transition: all 0.15s ease;
}

.phone-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 0 4px;
  box-sizing: border-box;
}

.ctrl-time-single-row {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  white-space: nowrap;
  min-width: 75px;
  text-align: right;
}

/* Credit Confirmation Modal */
.credit-modal-box {
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  max-width: 440px;
  width: 90%;
  padding: 24px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15);
  animation: slideUp 0.2s ease-out;
}





/* ========================================================================== */
/* INLINE 9:16 VIDEO PLAYER & TYPOGRAPHY STUDIO MODAL SUITE                   */
/* ========================================================================== */

/* Pencil Edit Button */
.btn-cab-pencil-edit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 0.9rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 8px;
  padding: 0;
  position: relative;
  z-index: 10;
  vertical-align: middle;
}

.btn-cab-pencil-edit:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: #8b5cf6;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

/* Inline 9:16 Video Player Card */
.cab-player-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cab-player-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cab-player-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Media Header Row (Identical height/alignment to Caption Header) */
.media-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  min-height: 24px;
}

.media-header-label {
  margin-bottom: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.cab-player-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cab-change-media {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cab-change-media:hover {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.25);
  border-color: #8b5cf6;
}

.btn-cab-close-media {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #fca5a5;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-cab-close-media:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
  transform: scale(1.08);
}

/* Volume Group in Player Controls */
.cab-volume-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.cab-volume-slider {
  width: 52px;
  height: 4px;
  accent-color: #a855f7;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* Cover Section Card on Right Column (between Caption & Platforms) */
.cover-section-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease;
}

.cover-section-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
}

.cover-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cover-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cover-main-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.cover-icon-badge {
  font-size: 1.1rem;
}

/* Cover Overlay on Main Player Screen */
.cab-main-cover-overlay {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 23%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  z-index: 12;
  transition: bottom 0.2s ease;
}

.cab-main-cover-text {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #FFE600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  text-align: center;
  line-height: 1.25;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 12px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 230, 0, 0.3);
}

/* REAL 9:16 VERTICAL ASPECT RATIO SCREEN */
.cab-player-screen-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  min-height: 480px;
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cab-player-screen-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000000;
}

/* Fullscreen Mode for 9:16 Screen */
.cab-player-screen-wrap:fullscreen,
.cab-player-screen-wrap:-webkit-full-screen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cab-player-screen-wrap:fullscreen video,
.cab-player-screen-wrap:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Subtitle Overlay Layer on Main Player */
.cab-main-sub-overlay {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 23%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  z-index: 10;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.cab-main-sub-text {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #FFE600;
  text-align: center;
  line-height: 1.25;
  padding: 4px 10px;
  transition: all 0.2s ease;
}

/* Controls bar on Main Player */
.cab-player-ctrls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cab-ctrl-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: transform 0.15s, color 0.15s;
}

.cab-ctrl-btn:hover {
  transform: scale(1.18);
  color: #c4b5fd;
}

.cab-ctrl-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.cab-ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.9);
}

.cab-ctrl-time {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  white-space: nowrap;
  min-width: 75px;
  text-align: right;
}

/* ========================================================================== */
/* STUDIO MODAL OVERLAY & SMARTPHONE MONITOR                                  */
/* ========================================================================== */

.studio-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 16, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.studio-modal-window {
  background: #090e1d;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 24px;
  width: 100%;
  max-width: 1260px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(139, 92, 246, 0.15);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.studio-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.studio-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-close-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-modal-close-icon:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.studio-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.studio-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.btn-modal-apply {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
}

.btn-modal-apply:hover {
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.studio-app-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .studio-app-grid {
    grid-template-columns: 1fr;
  }
}

.preview-content-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-tab-btn.active {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hook-input-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.hook-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 700;
  resize: none;
  outline: none;
}

/* Realistic Smartphone Live Monitor Mockup */
.phone-mockup-frame {
  width: 250px;
  height: 480px;
  background: #000000;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 36px;
  margin: 0 auto 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 16px;
  background: #000000;
  border-radius: 10px;
  z-index: 30;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000000;
  overflow: hidden;
}

.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.safe-zone-guide {
  position: absolute;
  top: 10%;
  left: 6%;
  right: 6%;
  bottom: 18%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  pointer-events: none;
  z-index: 8;
}

.safe-zone-label {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: sans-serif;
  text-transform: uppercase;
}

.social-ui-mockup {
  position: absolute;
  right: 8px;
  bottom: 22%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 12;
  pointer-events: none;
}

.social-ui-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.social-ui-btn span {
  font-size: 0.58rem;
  margin-top: 1px;
}

.live-subtitle-preview {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 23%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  z-index: 15;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.subtitle-text-element {
  display: inline-block;
  font-size: 20px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 12px;
  word-break: break-word;
  max-width: 95%;
  transition: all 0.15s ease;
}

/* ==========================================================================
   COVER HOOK SECTION CARD (Positioned between Caption and Platforms)
   ========================================================================== */
.workspace-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 12px !important;
}

.workspace-sidebar-col > .form-group,
.workspace-sidebar-col > .cover-section-card,
.workspace-sidebar-col > .platforms-section-card {
  margin-bottom: 0 !important;
}

.cover-section-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.cover-section-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
}

.cover-card-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.cover-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.cover-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cover-main-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.cover-duration-row,
.cover-duration-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.safe-zone-guide {
  display: none !important;
}

.cover-duration-num-input {
  width: 48px;
  height: 22px;
  padding: 0 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-align: center;
  outline: none;
  transition: all 0.15s ease;
}

.cover-duration-num-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
  background: #090e1d;
}

/* Player Volume Controls */
.cab-volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cab-volume-slider {
  width: 60px;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cab-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(56, 189, 248, 0.8);
}

/* Cover Overlay on Main 9:16 Screen */
.cab-main-cover-overlay {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  z-index: 12;
  transition: bottom 0.2s ease, justify-content 0.15s ease;
}

.cab-main-cover-text {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 19px;
  color: #ffe600;
  text-align: center;
  line-height: 1.25;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.82);
  border-radius: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  max-width: 95%;
  word-break: break-word;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

