/* ===========================
   YouTube-Inspired Design - Malware Analysis Platform
   =========================== */

/* CSS VARIABLES */
:root {
  --yt-bg: #0f0f0f;
  --yt-surface: #212121;
  --yt-hover: #3f3f3f;
  --yt-text: #f1f1f1;
  --yt-text-secondary: #aaaaaa;
  --yt-border: #3f3f3f;
  --yt-primary: #ff0000;
  --yt-danger: #ff4444;
  --yt-warning: #ff9800;
  --yt-success: #4caf50;
  --yt-info: #2196f3;
  --yt-accent: #9c27b0;
  --yt-spacing: 16px;
  --yt-radius: 12px;
  --transition-fast: 0.2s;
  --transition-medium: 0.3s;
}

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

body {
  font-family: "Roboto", "Arial", sans-serif;
  background: var(--yt-bg);
  color: var(--yt-text);
  line-height: 1.6;
}

/* LAYOUT */
.yt-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.site-header {
  background: var(--yt-surface);
  border-bottom: 1px solid var(--yt-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 24px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1920px;
  margin: 0 auto;
}

.site-logo a {
  color: var(--yt-text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.main-nav a {
  color: var(--yt-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.main-nav a:hover {
  background: var(--yt-hover);
  color: var(--yt-text);
}

/* STATS BANNER */
.stats-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px;
  border-radius: var(--yt-radius);
  margin: 24px 0;
  overflow: hidden;
}

.stats-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
}

.stats-scroll::-webkit-scrollbar {
  display: none;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition-medium);
}

.stat-chip:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.stat-chip.highlight {
  background: rgba(255, 152, 0, 0.3);
  border: 2px solid var(--yt-warning);
}

.stat-icon {
  font-size: 20px;
}

.stat-text {
  color: white;
  font-size: 14px;
}

/* FILTER SECTION */
.filter-section {
  margin: 24px 0;
  position: sticky;
  top: 72px;
  background: var(--yt-bg);
  z-index: 100;
  padding: 12px 0;
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}

.chip {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  color: var(--yt-text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.chip:hover {
  background: var(--yt-hover);
}

.chip.active {
  background: var(--yt-text);
  color: var(--yt-bg);
}

/* TAG FILTERS */
.tag-filter-section {
  background: var(--yt-surface);
  padding: 16px 20px;
  border-radius: var(--yt-radius);
  margin: 24px 0;
  border: 1px solid var(--yt-border);
}

.tag-filter-section.compact {
  padding: 12px 20px;
  margin-bottom: 20px;
}

.tag-filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-icon {
  font-size: 20px;
}

.tag-filter-section.compact .filter-icon {
  font-size: 16px;
}

.filter-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--yt-text);
}

.tag-filter-section.compact .filter-title {
  font-size: 13px;
}

.tag-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter-chip {
  background: var(--yt-hover);
  border: 2px solid var(--yt-border);
  color: var(--yt-text);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-filter-section.compact .tag-filter-chip {
  border: 1px solid transparent;
  padding: 6px 12px;
  font-size: 12px;
}

.tag-filter-chip:hover {
  background: var(--yt-primary);
  color: white;
  border-color: var(--yt-primary);
  transform: translateY(-2px);
}

.tag-filter-section.compact .tag-filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.tag-filter-chip.active {
  background: var(--yt-primary);
  color: white;
  border-color: var(--yt-primary);
}

.tag-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

.tag-filter-section.compact .tag-count {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 4px;
}

/* SECTION HEADERS */
.section-header,
.section-header-combined {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--yt-text);
  margin: 0;
  flex-shrink: 0;
}

.title-icon {
  font-size: 24px;
  line-height: 1;
}

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

.pagination-info {
  font-size: 13px;
  color: var(--yt-text-secondary);
  white-space: nowrap;
  font-weight: 500;
}

/* SORT CONTROLS */
.sort-button-group,
.sort-controls-modern {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--yt-surface);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--yt-border);
}

.sort-label {
  font-size: 13px;
  color: var(--yt-text-secondary);
  padding-left: 8px;
  font-weight: 500;
}

.sort-btn,
.sort-quick-btn {
  background: transparent;
  border: none;
  color: var(--yt-text-secondary);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sort-btn svg,
.sort-quick-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.sort-btn:hover,
.sort-quick-btn:hover {
  background: var(--yt-hover);
  color: var(--yt-text);
}

.sort-btn.active,
.sort-quick-btn.active {
  background: var(--yt-primary);
  color: white;
}

.sort-divider {
  width: 1px;
  height: 24px;
  background: var(--yt-border);
  margin: 0 4px;
}

.custom-select-wrapper,
.sort-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.sort-dropdown-minimal,
.sort-select {
  background: transparent;
  border: none;
  color: var(--yt-text);
  padding: 8px 28px 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all var(--transition-fast);
  min-width: 160px;
}

.sort-select {
  border-left: 1px solid var(--yt-border);
  border-radius: 0 6px 6px 0;
  min-width: 170px;
}

.sort-dropdown-minimal:hover,
.sort-select:hover {
  background: var(--yt-hover);
}

.sort-dropdown-minimal:focus,
.sort-select:focus {
  background: rgba(255, 255, 255, 0.1);
}

.custom-select-wrapper::after,
.dropdown-arrow {
  content: '▼';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--yt-text-secondary);
  font-size: 10px;
  transition: transform var(--transition-fast);
}

.dropdown-arrow {
  content: '';
}

.sort-dropdown-minimal option,
.sort-select option {
  background: var(--yt-surface);
  color: var(--yt-text);
  padding: 10px;
}

/* VIDEO CARDS */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.video-card {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  overflow: hidden;
  transition: all var(--transition-medium);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--yt-hover);
  overflow: hidden;
  flex-shrink: 0;
}

.video-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.video-card:hover .video-thumb {
  transform: scale(1.05);
}

.warning-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--yt-warning);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.video-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.video-info {
  padding: 12px;
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
}


.channel-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.channel-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #9e9e9e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    flex-shrink: 0;
}

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

.video-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--yt-text);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-name {
  font-size: 13px;
  color: var(--yt-text-secondary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  font-size: 12px;
  color: var(--yt-text-secondary);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 44px;
  overflow: hidden;
}

.video-tag {
  background: var(--yt-hover);
  color: var(--yt-text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--yt-border);
  white-space: nowrap;
}

.keyword-tag {
  display: inline-block;
  background: var(--yt-primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.video-actions {
  padding: 0 12px 12px;
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-shrink: 0;
}

.action-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.action-btn.primary {
  background: var(--yt-primary);
  color: white;
}

.action-btn.primary:hover {
  background: #cc0000;
}

.action-btn.secondary {
  background: var(--yt-hover);
  color: var(--yt-text);
}

.action-btn.secondary:hover {
  background: #5f5f5f;
}

/* CHANNELS GRID */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.channel-card {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  overflow: hidden;
  transition: all var(--transition-medium);
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.channel-header {
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.channel-thumb {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--yt-surface);
  object-fit: cover;
}

.channel-body {
  padding: 48px 16px 16px;
  text-align: center;
}

.channel-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--yt-text);
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-item {
  background: var(--yt-hover);
  padding: 12px 8px;
  border-radius: 8px;
}

.stat-item.danger {
  background: rgba(255, 152, 0, 0.2);
  border: 1px solid var(--yt-warning);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--yt-text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: var(--yt-text);
}

.stat-item.danger .stat-value {
  color: var(--yt-warning);
}

/* ANALYTICS & STATS */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.analytics-card {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  padding: 20px;
  transition: all var(--transition-medium);
}

.analytics-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--yt-text-secondary);
}

.card-icon {
  font-size: 24px;
}

.card-body {
  text-align: center;
}

.big-number {
  font-size: 36px;
  font-weight: bold;
  color: var(--yt-text);
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--yt-text-secondary);
}

/* KEYWORDS */
.keywords-section {
  background: var(--yt-surface);
  padding: 24px;
  border-radius: var(--yt-radius);
  margin-bottom: 48px;
}

.keywords-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.keyword-bubble {
  background: var(--yt-hover);
  border: 1px solid var(--yt-border);
  color: var(--yt-text);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.keyword-bubble:hover {
  background: var(--yt-primary);
  color: white;
  transform: scale(1.05);
}

.bubble-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  font-size: 12px;
}

/* PAGINATION */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0 16px;
  flex-wrap: wrap;
}

.pagination-btn {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  color: var(--yt-text);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--yt-hover);
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.page-number-btn {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  color: var(--yt-text);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 40px;
}

.page-number-btn:hover {
  background: var(--yt-hover);
}

.page-number-btn.active {
  background: var(--yt-primary);
  color: white;
  border-color: var(--yt-primary);
}

.page-ellipsis {
  color: var(--yt-text-secondary);
  padding: 0 8px;
  font-size: 14px;
}

.pagination-summary {
  text-align: center;
  color: var(--yt-text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
  font-weight: 500;
}

/* STATS PAGE */
.stats-page {
  padding-bottom: 64px;
}

.page-header {
  text-align: center;
  margin: 32px 0 48px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--yt-radius);
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.page-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.overview-section {
  margin-bottom: 48px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.overview-card {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-medium);
  border: 2px solid transparent;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.overview-card.primary { border-color: var(--yt-primary); }
.overview-card.danger { border-color: var(--yt-danger); }
.overview-card.warning { border-color: var(--yt-warning); }
.overview-card.success { border-color: var(--yt-success); }
.overview-card.info { border-color: var(--yt-info); }
.overview-card.accent { border-color: var(--yt-accent); }

.overview-card .card-icon {
  font-size: 40px;
  line-height: 1;
}

.overview-card .card-content {
  flex: 1;
}

.overview-card .card-number {
  font-size: 28px;
  font-weight: bold;
  color: var(--yt-text);
  line-height: 1.2;
}

.overview-card .card-label {
  font-size: 13px;
  color: var(--yt-text-secondary);
  margin-top: 4px;
}

/* CHARTS */
.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.chart-section {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  padding: 24px;
  margin: 24px 0;
  border: 1px solid var(--yt-border);
}

.chart-section.full-width {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 16px;
}

.chart-section.full-width .chart-container {
  height: 400px;
}

/* DATA TABLES */
.tables-section {
  margin-top: 48px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.data-table-container {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  padding: 24px;
  border: 1px solid var(--yt-border);
}

.table-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--yt-text);
  margin-bottom: 16px;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background: var(--yt-hover);
  color: var(--yt-text);
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid var(--yt-border);
}

.data-table tbody td {
  padding: 12px;
  color: var(--yt-text);
  font-size: 14px;
  border-bottom: 1px solid var(--yt-border);
}

.data-table tbody tr:hover {
  background: var(--yt-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

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

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.metric-label {
  font-weight: 500;
  color: var(--yt-text-secondary);
}

.metric-value {
  text-align: right;
  font-weight: 600;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge.primary { background: rgba(255, 0, 0, 0.2); color: var(--yt-primary); }
.badge.danger { background: rgba(255, 68, 68, 0.2); color: var(--yt-danger); }
.badge.warning { background: rgba(255, 152, 0, 0.2); color: var(--yt-warning); }
.badge.success { background: rgba(76, 175, 80, 0.2); color: var(--yt-success); }
.badge.info { background: rgba(33, 150, 243, 0.2); color: var(--yt-info); }
.badge.accent { background: rgba(156, 39, 176, 0.2); color: var(--yt-accent); }

.keyword-badge {
  display: inline-block;
  background: var(--yt-hover);
  color: var(--yt-text);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.tag-badge {
  display: inline-block;
  background: var(--yt-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* TIMELINE CHART */
.timeline-chart {
  padding: 20px 0;
}

.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: stretch;
}

/* chart block + explanation side by side on wide screens, stacked on narrow ones */
.timeline-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
}

.timeline-main {
  flex: 2 1 760px;
  min-width: 0;
}

.timeline-about {
  flex: 1 1 460px;
  min-width: 0;
  padding: 16px 20px;
  background: var(--yt-hover);
  border-radius: 12px;
  color: var(--yt-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.timeline-about p {
  margin: 0 0 10px;
}

.timeline-about strong {
  color: var(--yt-text);
}

.about-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--yt-text);
}



.timeline-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  height: 300px; /* same as .timeline-bars so both sides line up */
}

.timeline-figure {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-width: 0;
  background: var(--yt-hover);
  border-radius: 12px;
}

.timeline-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--yt-text-secondary);
  text-align: right;
}

.figure-icon {
  flex: none;
  font-size: 26px;
  line-height: 1;
}

.figure-text {
  min-width: 0;
}

.figure-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--yt-text);
  line-height: 1.1;
}

.figure-label a {
  color: inherit;
  text-decoration: underline dotted;
}

.figure-label a:hover {
  color: var(--yt-text);
}

.figure-label {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--yt-text-secondary);
}

.timeline-bars {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  height: 300px;
  padding: 16px 20px 12px;
  background: var(--yt-hover);
  border-radius: 12px;
  overflow-x: auto;
}

.timeline-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 110px;
  min-width: 26px;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform var(--transition-fast) ease;
}

.timeline-bar-group:hover {
  transform: translateY(-4px);
}

.timeline-bar-area {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.timeline-count {
  flex: none;
  height: 18px;
  line-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text);
}

.timeline-bar {
  flex: none;
  max-height: calc(100% - 18px);
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: all 0.4s ease-out;
  background: linear-gradient(to top, var(--yt-primary), var(--yt-danger), #ff6666);
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
  min-height: 3px;
  animation: growBar 0.8s ease-out;
}

.timeline-bar:hover {
  filter: brightness(1.2);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.5);
}

@keyframes growBar {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.timeline-date {
  /* two lines: month, and the year under the first bar and every January */
  height: 34px;
  line-height: 16px;
  font-size: 12px;
  color: var(--yt-text-secondary);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 500;
}

.timeline-info {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.timeline-stat {
  color: var(--yt-text-secondary);
  font-size: 14px;
}

.timeline-stat strong {
  color: var(--yt-text);
  font-size: 18px;
}

/* COPY NOTIFICATION */
.copy-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--yt-primary);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: slideIn var(--transition-medium) ease-out;
  z-index: 2000;
}

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

/* FOOTER */
.site-footer {
  background: var(--yt-surface);
  border-top: 1px solid var(--yt-border);
  padding: 32px 24px;
  margin-top: 64px;
  text-align: center;
}

.site-footer p {
  color: var(--yt-text-secondary);
  font-size: 13px;
  margin: 8px 0;
}

/* ABOUT PAGE */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 48px;
  margin-top: 32px;
  align-items: start;
}

.about-content {
  max-width: 800px;
}

.about-sidebar {
  position: sticky;
  top: 100px;
}

.video-embed-box {
  background: var(--yt-surface);
  border-radius: var(--yt-radius);
  padding: 20px;
  border: 1px solid var(--yt-border);
}

.video-caption {
  font-size: 14px;
  color: var(--yt-text-secondary);
  margin: 0 0 16px;
  font-weight: 500;
  text-align: center;
}

.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

a {
  color: #ff0000;        /* YouTube red */
}

a:hover,
a:focus {
  color: #cc0000;        /* Slightly darker on hover/focus */
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--yt-bg);
}

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

::-webkit-scrollbar-thumb:hover {
  background: #5f5f5f;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .about-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .yt-container {
    padding: 0 12px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .main-nav {
    width: 100%;
    justify-content: center;
  }
  
  .videos-grid,
  .channels-grid,
  .analytics-grid,
  .tables-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header,
  .section-header-combined {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .header-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  
  .pagination-info {
    font-size: 12px;
  }
  
  .sort-button-group,
  .sort-controls-modern {
    flex: 1;
    min-width: 0;
  }
  
  .sort-btn span,
  .sort-quick-btn span {
    display: none;
  }
  
  .sort-btn,
  .sort-quick-btn {
    padding: 8px;
  }
  
  .sort-divider {
    display: none;
  }
  
  .sort-dropdown-minimal,
  .sort-select {
    min-width: 130px;
    padding: 6px 28px 6px 10px;
    font-size: 12px;
  }
  
  .keywords-cloud {
    justify-content: center;
  }
  
  .pagination-controls {
    gap: 4px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .page-number-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 36px;
  }
  
  .tag-filter-section {
    padding: 12px 16px;
  }
  
  .tag-filter-section.compact {
    padding: 10px 15px;
  }
  
  .tag-filter-chip {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .tag-filter-section.compact .tag-filter-chip {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .page-subtitle {
    font-size: 14px;
  }
  
  .overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .overview-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }
  
  .overview-card .card-icon {
    font-size: 32px;
  }
  
  .overview-card .card-number {
    font-size: 24px;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .chart-section.full-width .chart-container {
    height: 300px;
  }
  
  .timeline-bars {
    height: 190px;
    gap: 6px;
    padding: 12px 10px 10px;
  }

  .timeline-bar-group {
    max-width: 60px;
    min-width: 22px;
  }

  .timeline-date {
    font-size: 11px;
    margin-top: 4px;
  }
  
  .timeline-stat {
    font-size: 12px;
  }
  
  .timeline-stat strong {
    font-size: 16px;
  }
}

@media (max-width: 1250px) {
  .timeline-about {
    flex: 1 1 100%;
  }
}

@media (max-width: 900px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }

  .timeline-figures {
    height: auto;
    grid-template-rows: none;
    grid-auto-rows: minmax(56px, auto);
  }
}

@media (max-width: 480px) {
  .sort-controls-modern {
    width: 100%;
  }
  
  .sort-select {
    min-width: 130px;
  }
}


/* Make video thumbnail link display as block and maintain positioning */
a.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--yt-hover);
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}

/* Channel name link styling */
.channel-link {
    color: var(--yt-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.channel-link:hover {
    color: var(--yt-text);
}

/* Ensure the video card hover doesn't interfere with links */p
.video-card {
    cursor: default;
}

.logo-text {
    font-weight: 600;
    letter-spacing: -0.5px;
    font-size: 20px;
}

/* Pagination and sorting are server-side (Hugo); links styled like the old buttons */
a.pagination-btn,
span.pagination-btn,
a.page-number-btn,
a.sort-quick-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

span.pagination-btn {
  cursor: not-allowed;
}
