.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 12px;
}

.video-card {
  display: block;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-3px);
}

.video-card:hover .video-title {
  color: var(--accent);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.video-card:hover .video-thumb {
  border-color: rgba(255, 144, 0, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.video-thumb img,
.video-thumb .thumb-placeholder,
.video-thumb .thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

.thumb-fallback.visible {
  display: flex;
}

.thumb-fallback svg {
  width: 40px;
  height: 40px;
  fill: rgba(255, 255, 255, 0.15);
}

.video-thumb img,
.video-thumb .thumb-fallback.visible {
  transition: transform 0.25s ease;
}

.thumb-placeholder {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

.category-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 60px);
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 3px;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-card:hover .category-pill {
  opacity: 1;
  transform: translateY(0);
}

.duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 2px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
}

.hd-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 5px;
  background: var(--accent);
  border-radius: 2px;
  color: #000;
  font-size: 10px;
  font-weight: 700;
}

.video-info {
  padding: 8px 4px 0;
}

.video-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  transition: color var(--transition);
  min-height: 2.7em;
}

.video-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.meta-dot {
  opacity: 0.5;
}

.meta-time {
  color: var(--text-muted);
}

.video-meta .rating {
  color: var(--success);
  font-weight: 600;
}

.video-uploader {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-block;
}

.video-uploader:hover {
  color: var(--accent);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.category-tile {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  transition: transform var(--transition);
}

.category-tile:hover {
  transform: scale(1.02);
}

.category-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1a1a1a, #333);
  position: relative;
  overflow: hidden;
}

.category-thumb .cat-gradient {
  width: 100%;
  height: 100%;
}

.category-label {
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.category-tile:hover .category-label {
  color: var(--accent);
}

.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 12px;
  transition: all var(--transition);
}

.tag-chip:hover {
  background: var(--accent);
  color: #000;
}

.section-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 0;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-logo {
  margin-bottom: 12px;
}

.player-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.play-button {
  width: 72px;
  height: 72px;
  background: rgba(255, 153, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  cursor: pointer;
}

.play-button:hover {
  transform: scale(1.1);
}

.play-button svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  fill: #000;
}

.video-detail-title {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin: 12px 0 8px;
  line-height: 1.3;
}

.video-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.video-detail-meta .rating {
  color: var(--success);
  font-weight: 600;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.uploader-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.uploader-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #444, #666);
  flex-shrink: 0;
}

.uploader-info {
  flex: 1;
}

.uploader-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.uploader-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.comments-section {
  margin-top: 20px;
}

.comment-input-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-input-wrap textarea {
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  resize: vertical;
  outline: none;
}

.comment-input-wrap textarea:focus {
  border-color: var(--accent);
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-author {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.comment-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.related-sidebar .video-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.related-sidebar .video-card {
  display: flex;
  gap: 10px;
}

.related-sidebar .video-thumb {
  width: 168px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
}

.related-sidebar .video-info {
  flex: 1;
  padding: 0;
}

.related-sidebar .video-title {
  font-size: 12px;
  -webkit-line-clamp: 3;
}

.upload-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

.upload-progress {
  margin-top: 12px;
}

.upload-progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.upload-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.real-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 1;
}

.uploaded-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 5px;
  background: var(--success);
  border-radius: 2px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.profile-header-info h1 {
  color: var(--text-primary);
  font-size: 24px;
  margin-bottom: 4px;
}

.profile-header-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.profile-header .btn-subscribe {
  max-width: 160px;
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-xs { width: 20px; height: 20px; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 96px; height: 96px; }

.avatar-placeholder {
  background: linear-gradient(135deg, #444, #666);
}

.video-uploader-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.video-uploader-row .video-uploader {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-uploader-row:hover .video-uploader {
  color: var(--accent);
}

.video-card-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #161616 25%, #242424 50%, #161616 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #161616 25%, #242424 50%, #161616 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-line-title {
  height: 12px;
  width: 92%;
}

.skeleton-line-meta {
  width: 55%;
}

.skeleton-line-uploader {
  width: 38%;
}

.video-grid.is-loading {
  pointer-events: none;
}

.category-banner {
  margin-bottom: 14px;
}

.category-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.category-banner-inner strong {
  color: var(--accent);
}

.category-banner-clear {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
}

.category-banner-clear:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-state-full {
  grid-column: 1 / -1;
  padding: 72px 24px;
  text-align: center;
}

.empty-state-full h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  border: 1px solid var(--border);
}

.empty-state-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--text-muted);
}

.empty-state-action {
  margin-top: 16px;
}

.uploader-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #444, #666);
  flex-shrink: 0;
  overflow: hidden;
  display: block;
}

.uploader-avatar.has-img img,
.uploader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploader-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.uploader-name:hover {
  color: var(--accent);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.auth-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.auth-tab-beta.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.auth-beta-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.profile-edit-avatar {
  text-align: center;
  margin-bottom: 16px;
}

.dropdown-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

