/* AnswerTube AI v3 - Modern Design System */
:root {
  --dark-primary: #0f0f23;
  --dark-secondary: #1a1a2e;
  --dark-accent: #16213e;
  --dark-text: #e2e8f0;
  --dark-muted: #64748b;
  
  --brand-primary: #667eea;
  --brand-secondary: #764ba2;
  --brand-accent: #f093fb;
  
  --youtube-red: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--dark-primary);
  color: var(--dark-text);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--dark-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-muted);
}

/* Header */
.header {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-accent);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.brand-logo {
  width: 140px;
  height: auto;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: none;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-primary);
}

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

.theme-toggle {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--dark-muted);
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: var(--dark-accent);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu:hover {
  background: var(--dark-accent);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

/* Main Layout */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 20px;
}

.grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
}

/* Card Base */
.card {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--dark-accent);
  padding: 24px;
}

.card-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Left Sidebar */
.left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: calc(100vh - 115px);
}

.gradient-border-input {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  padding: 1px;
  border-radius: 12px;
}

.url-input {
  width: 100%;
  background: rgba(15, 15, 35, 0.8);
  border: none;
  border-radius: 11px;
  padding: 12px 40px 12px 16px;
  color: var(--dark-text);
  font-size: 14px;
  outline: none;
}

.url-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-action-btn {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  color: var(--dark-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.input-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-text);
}

.url-input::placeholder {
  color: var(--dark-muted);
}

.url-input:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 16px;
}

.generate-btn:hover {
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.25);
  transform: translateY(-1px);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.card-history {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.history-item {
  padding: 12px;
  background: rgba(22, 33, 62, 0.5);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--dark-accent);
}

.history-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 12px;
  color: var(--dark-muted);
  margin-top: 4px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-item {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark-text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.action-item:hover {
  background: rgba(22, 33, 62, 0.5);
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
}

.content-card {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--dark-accent);
  height: calc(100vh - 115px);
  display: flex;
  flex-direction: column;
}

.video-info {
  padding: 24px;
  display: flex;
  gap: 16px;
}

.video-thumb {
  width: 80px;
  height: 48px;
  background: var(--dark-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-details {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.video-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--dark-muted);
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-action-btn {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--dark-muted);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-action-btn:hover {
  background: var(--dark-accent);
}

.video-action-btn i {
  font-size: 18px;
}

.regenerate-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.regenerate-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15, 15, 35, 0.98);
  border: 1px solid var(--dark-accent);
  border-radius: 8px;
  padding: 8px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.regenerate-menu.active {
  display: flex;
}

.regenerate-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--dark-text);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: left;
}

.regenerate-option:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--brand-primary);
}

.regenerate-option i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.content-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 24px;
  background: rgba(15, 15, 35, 0.5);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--dark-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover:not(.active) {
  background: rgba(22, 33, 62, 0.5);
  color: var(--dark-text);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: white;
}

.tab-btn i {
  font-size: 16px;
}

.tab-content-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.tab-content .empty-state {
  margin-top: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--dark-muted);
  padding: 40px;
  text-align: center;
}

.tab-content .empty-state i {
  color: var(--dark-muted);
}

.tab-content .empty-state p {
  font-size: 16px;
  margin: 0;
}

.transcript-content:focus {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.5);
}

.transcript-content {
  flex: 1;
  padding: 5px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Bookmarks view: reuse transcript-style inner scroll */
#bookmarksView {
  display: flex;
  flex-direction: column;
}

#bookmarksView .transcript-content {
  flex: 1;
  min-height: 0;
}

#bookmarksView #bookmarksList {
  flex: 1;
  overflow-y: auto;
}

.transcript-blocks {
  display: flex;
  flex-direction: column;
  gap: 0px;
  flex: 1;
}

.transcript-block {
  padding: 16px;
  border-radius: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.transcript-block:hover {
  background: rgba(22, 33, 62, 0.3);
}

.transcript-block.active {
  background: rgba(116, 82, 172, 0.1);
}

.transcript-block-content {
  display: flex;
  gap: 16px;
}

.timestamp {
  color: var(--brand-primary);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  font-size: 14px;
  background: rgba(102, 126, 234, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  font-weight: 500;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transcript-text {
  flex: 1;
}

.transcript-text p {
  color: var(--dark-text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.transcript-text blockquote {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(118, 75, 162, 0.22);
  border-left: 4px solid var(--brand-secondary);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.16) 0%, rgba(118, 75, 162, 0.18) 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  color: rgba(226, 232, 240, 0.92);
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.transcript-text blockquote > p {
  margin: 0;
}

.transcript-text h2 + blockquote,
.transcript-text h3 + blockquote {
  margin-top: 10px;
}

.transcript-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.transcript-action-btn {
  background: transparent;
  border: none;
  color: var(--dark-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.transcript-action-btn:hover {
  color: var(--brand-primary);
}

/* Right Sidebar - AI Chat */
.ai-chat {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--dark-accent);
  height: calc(100vh - 115px);
  display: flex;
  flex-direction: column;
}

/* Chat inner layout */
.chat-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(244, 114, 182, 0.16) 0, transparent 60%),
              radial-gradient(circle at 80% 30%, rgba(129, 140, 248, 0.18) 0, transparent 65%),
              radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.16) 0, transparent 55%),
              rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.chat-overlay.active {
  display: flex;
}

.chat-overlay-content {
  max-width: 420px;
  padding: 20px 24px;
  margin: 20px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.chat-overlay-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--dark-text);
}

.chat-overlay-content p {
  margin: 0;
  font-size: 13px;
  color: var(--dark-muted);
}

.chat-overlay-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(236, 72, 153, 0.25));
  color: var(--brand-primary);
}

.chat-overlay-icon i {
  font-size: 18px;
}

.chat-header {
  padding: 24px;
  border-bottom: 1px solid var(--dark-accent);
}

.chat-header-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-subtitle {
  font-size: 14px;
  color: var(--dark-muted);
  margin-top: 4px;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.message-bubble {
  background: rgba(22, 33, 62, 0.5);
  border-radius: 12px;
  padding: 12px;
  max-width: 90%;
}

.chat-message.user .message-bubble {
  background: rgba(102, 126, 234, 0.2);
}

.message-text {
  font-size: 14px;
  color: var(--dark-text);
  line-height: 1.5;
}

.message-text p {
  margin: 8px 0;
}

.message-text p:first-child {
  margin-top: 0;
}

.message-text p:last-child {
  margin-bottom: 0;
}

.message-text code {
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
}

.message-text pre {
  background: rgba(15, 15, 35, 0.8);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.message-text pre code {
  background: none;
  padding: 0;
}

.message-text ul, .message-text ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-text li {
  margin: 4px 0;
}

.message-text strong {
  font-weight: 600;
  color: var(--dark-text);
}

.message-text em {
  font-style: italic;
}

.message-text a {
  color: var(--brand-primary);
  text-decoration: underline;
}

.message-text a:hover {
  color: var(--brand-accent);
}

.typing-indicator {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  color: var(--dark-muted);
}

.typing-indicator .dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

.message-reference {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--dark-muted);
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--dark-accent);
}

.chat-input-wrapper {
  position: relative;
}

.chat-input {
  width: 100%;
  background: rgba(22, 33, 62, 0.5);
  border: none;
  border-radius: 8px;
  padding: 8px 40px 8px 12px;
  color: var(--dark-text);
  font-size: 14px;
  outline: none;
}

.chat-input::placeholder {
  color: var(--dark-muted);
}

.chat-input:focus {
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.5);
}

.chat-send-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.chat-send-btn:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.chat-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.chat-action-btn {
  background: transparent;
  border: none;
  color: var(--dark-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.chat-action-btn:hover {
  color: var(--brand-primary);
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

/* Responsive */
@media (max-width: 1280px) {
  .grid-layout {
    grid-template-columns: 260px 1fr 300px;
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
  
  .left-sidebar,
  .ai-chat {
    display: none;
  }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--dark-muted);
  flex: 1;
  width: 100%;
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Streaming Progress Container */
.streaming-container {
  padding: 24px;
  min-height: 300px;
}

.streaming-progress {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  padding: 24px;
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
  50% {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 20px 0 rgba(102, 126, 234, 0.2);
  }
}

.streaming-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.streaming-icon {
  font-size: 24px;
  color: var(--brand-primary);
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(5deg);
  }
}

.streaming-status {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-text);
  animation: fade-text 0.5s ease-out;
}

@keyframes fade-text {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.streaming-preview {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.streaming-paragraph {
  background: rgba(15, 15, 35, 0.5);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 3px solid var(--brand-primary);
  animation: slide-in 0.4s ease-out;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-text);
}

.streaming-paragraph:last-child {
  border-left-color: var(--brand-accent);
  background: rgba(240, 147, 251, 0.1);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.streaming-paragraph p {
  margin: 0;
}

.streaming-paragraph h1,
.streaming-paragraph h2,
.streaming-paragraph h3 {
  color: var(--brand-primary);
  margin-bottom: 8px;
  font-size: 1.1em;
}

/* Typing indicator for chat */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--dark-muted);
}

.typing-indicator .dots::after {
  content: '';
  animation: typing-dots 1.4s infinite;
}

@keyframes typing-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Translate Menu Custom Styles */
.translate-menu-custom {
  width: 220px !important;
  padding: 8px !important;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.translate-menu-custom.active {
  display: flex !important;
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px 0;
}

.lang-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dark-text);
  outline: none;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.lang-option .flag {
  font-size: 24px;
  line-height: 1;
}

.lang-option .lang-name {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.lang-option.full-width {
  grid-column: span 2;
  width: 100%;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  padding: 10px;
}

.lang-option.full-width .lang-name {
  font-size: 13px;
  letter-spacing: 1px;
}

.lang-option.full-width .flag {
  font-size: 18px;
  margin-bottom: 0;
}

.regenerate-option.full-width {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
}

/* Translation Warning */
.translation-warning {
  background: rgba(234, 179, 8, 0.1); /* Yellow-500 with opacity */
  border: 1px solid rgba(234, 179, 8, 0.2);
  color: #eab308; /* Yellow-500 */
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.translation-warning i {
  font-size: 16px;
  flex-shrink: 0;
}

.translation-warning strong {
  font-weight: 600;
  color: #facc15; /* Yellow-400 */
}

.warning-btn {
  cursor: pointer;
  border: 1px solid #eab308; /* Yellow-500 */
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  text-decoration: none !important;
  margin: 0 4px;
}

.warning-btn:hover {
  background: rgba(234, 179, 8, 0.2);
  transform: translateY(-1px);
}

.delete-option {
  color: #ef4444 !important;
}

.delete-option:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Active Translate Button Style (Glow instead of bg) */
.video-action-btn.active-lang {
  position: relative;
}

.video-action-btn.active-lang::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.4), inset 0 0 0 1px rgba(102, 126, 234, 0.6);
  pointer-events: none;
}

.video-action-btn .active-flag {
  font-size: 18px;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

/* Chat Sources (Modern Chips) */
.chat-sources-container {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sources-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.source-chip:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
}

.source-chip:active {
  transform: translateY(0);
}

.source-chip i {
  font-size: 10px;
  opacity: 0.7;
}

/* --- Interactive Empty States & Animations --- */

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(102, 126, 234, 0)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.3)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(102, 126, 234, 0)); }
}

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

.empty-state-icon {
  font-size: 64px;
  color: var(--dark-muted);
  margin-bottom: 24px;
  opacity: 0.8;
  display: inline-block;
}

.empty-state-icon.animated-float {
  animation: float 4s ease-in-out infinite;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state-icon.animated-pulse {
  animation: pulse-glow 3s ease-in-out infinite;
  color: #fbbf24; /* Amber */
  background: none;
  -webkit-text-fill-color: initial;
}

.empty-state-icon.animated-spin {
  animation: spin-slow 12s linear infinite;
  color: var(--brand-accent);
}

.empty-state p {
  font-size: 16px;
  color: var(--dark-text);
  margin-bottom: 8px;
  font-weight: 500;
}

.empty-state-sub {
  font-size: 13px;
  color: var(--dark-muted);
  max-width: 300px;
  margin: 0 auto 24px auto;
  line-height: 1.5;
}

.action-btn-large {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  position: relative;
  overflow: hidden;
}

.action-btn-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.action-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.action-btn-large:hover::before {
  left: 100%;
}

.action-btn-large i {
  color: white !important;
  opacity: 1 !important;
}

.action-btn-large:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  background: var(--dark-accent);
  box-shadow: none;
}

.transcript-inner-container {
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Markdown Content Styling */
.markdown-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--dark-text);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: var(--brand-primary);
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.markdown-body h2 {
  font-size: 22px;
  margin-top: 40px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  width: 100%;
}

.markdown-body h3 {
  font-size: 18px;
  color: var(--dark-text);
  margin-top: 24px;
}

.markdown-body p {
  margin-bottom: 20px;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.markdown-body li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 4px;
}

.markdown-body li::marker {
  color: var(--brand-accent);
  font-weight: bold;
}

/* --- Key Points Specific Styling (Cards) --- */
.keypoints-content .markdown-body ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keypoints-content .markdown-body li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px 16px 54px; /* Left padding for icon */
  position: relative;
  margin-bottom: 0;
  transition: all 0.2s ease;
  padding-left: 54px !important; /* Force override default padding */
}

.keypoints-content .markdown-body li:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.keypoints-content .markdown-body li::marker {
  content: none;
}

.keypoints-content .markdown-body li::before {
  content: '\f0eb'; /* fa-lightbulb */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 18px;
  color: #fbbf24; /* Amber */
  opacity: 0.9;
}

.keypoints-content .markdown-body strong {
  color: var(--brand-primary);
  font-weight: 700;
}

/* General Bold */
.markdown-body strong {
  color: #fff;
  font-weight: 700;
}

.markdown-body blockquote {
  border-left: 4px solid var(--brand-secondary);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.35) 100%);
  border: 1px solid rgba(118, 75, 162, 0.22);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.markdown-body code {
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  color: var(--brand-accent);
}
