:root {
  --bg-color: #0f0f0f;
  --card-bg: #1f1f1f;
  --text-color: #ffffff;
  --text-dim: #aaa;
  --accent-color: #cc0000;
  --accent-hover: #e60000;
  --border-color: #2e2e2e;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}

input, select, textarea, button {
  font-size: 16px !important;
}

.search-toggle-btn, .logo, .btn, .category-pill, .clickable-author, .logout-btn, .action-btn {
  user-select: none;
  -webkit-user-select: none;
}

/* Header */
.site-header {
  width: 100%;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
}

.header-inner {
  max-width: 1500px;
  width: 100%;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.logo span {
  color: var(--accent-color);
}

.nav-search {
  flex: 1;
  max-width: 550px;
}

.nav-search input {
  width: 100%;
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: #121212;
  color: var(--text-color);
  outline: none;
}

.nav-search input:focus {
  border-color: #666;
}

/* Lupa */
.search-toggle-btn {
  display: none;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--text-color);
  cursor: pointer;
  padding: 6px;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.search-toggle-btn:hover,
.search-toggle-btn:focus,
.search-toggle-btn:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  opacity: 0.8;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem !important;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* WIDGET PROFILU V HLAVIČCE */
.user-header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
  max-width: 160px;
}

.user-header-profile:hover {
  background: rgba(255,255,255,0.08);
}

.user-header-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* AVATARY */
.avatar-img {
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.avatar-initial {
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  user-select: none;
  flex-shrink: 0;
}

.avatar-xs { width: 22px; height: 22px; font-size: 0.75rem !important; }
.avatar-sm { width: 30px; height: 30px; font-size: 0.85rem !important; }
.avatar-md { width: 42px; height: 42px; font-size: 1.1rem !important; }
.avatar-xl { width: 90px; height: 90px; font-size: 2.2rem !important; }

.clickable-author {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  transition: opacity 0.2s;
}

.clickable-author:hover {
  opacity: 0.85;
  text-decoration: none !important;
}

/* MAIN CONTAINER & RUBRIKY */
.main-container {
  width: 100%;
  max-width: 1500px;
  padding: 20px 16px;
  margin: 0 auto;
  flex: 1;
}

.categories-wrapper {
  width: 100%;
  margin-bottom: 24px;
}

.categories-bar {
  display: flex;
  width: 100%;
  gap: 12px;
}

.category-pill {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.category-pill:hover, .category-pill.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* GRID VIDEÍ */
.empty-msg {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 10px;
  grid-column: 1 / -1;
  font-size: 1rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .thumb-wrapper img {
  transform: scale(1.04);
}

/* MODERNÍ OVERLAY PLAY IKONKA (HLAVNÍ GRID) */
.thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 48px;
  height: 48px;
  background: rgba(204, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.thumb-play-icon svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.card:hover .thumb-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  background: var(--accent-hover);
}

.thumb-badges {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.thumb-badge {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 3px 7px;
  font-size: 0.75rem !important;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}

.type-badge {
  background: rgba(204, 0, 0, 0.9);
}

.card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

/* ================= DETAIL TRAILERU & KINO REŽIM ================= */

.watch-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-areas:
    "player sidebar"
    "details sidebar"
    "comments sidebar";
  gap: 24px;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-wrapper {
  grid-area: player;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-details-header {
  grid-area: details;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.comments-section {
  grid-area: comments;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* KINO REŽIM (DESKTOP) */
.watch-container.cinema-mode {
  grid-template-columns: 1fr;
  grid-template-areas:
    "player"
    "details"
    "sidebar"
    "comments";
}

.watch-container.cinema-mode .player-wrapper {
  max-height: 72vh;
  aspect-ratio: 16/9;
}

.watch-container.cinema-mode .sidebar-section {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.watch-container.cinema-mode #relatedList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.watch-container.cinema-mode .related-card {
  flex-direction: column;
}

.watch-container.cinema-mode .related-thumb {
  width: 100%;
}

/* ================= MODERNÍ YOUTUBE AKČNÍ TLAČÍTKA ================= */

.video-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.video-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.video-views {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tlačítko Kino Režimu */
.cinema-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cinema-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #555;
}

.cinema-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

@media (min-width: 1025px) {
  .cinema-btn {
    display: inline-flex;
  }
}

/* YouTube Style Pill (Like & Dislike) */
.yt-vote-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  height: 38px;
  transition: background 0.2s ease;
}

.yt-vote-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem !important;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.yt-vote-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.yt-vote-btn svg {
  transition: transform 0.15s ease;
}

.yt-vote-btn:active svg {
  transform: scale(1.2);
}

.yt-vote-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
}

/* POPIS TRAILERU */
.video-description-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-top: 8px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #ddd;
  white-space: pre-line;
}

/* KOMENTÁŘE */
.comment-input-box {
  display: flex;
  gap: 10px;
}

.comment-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 0;
  outline: none;
}

.comment-input-box input:focus {
  border-color: var(--text-color);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: rgba(255,255,255,0.02);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-author-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author {
  font-weight: 600;
  color: #fff;
}

.comment-date {
  color: var(--text-dim);
  font-size: 0.75rem !important;
}

.comment-text {
  font-size: 0.9rem;
  padding-left: 38px;
}

/* SIDEBAR KARTA A PLAY IKONKA V SIDEBARU */
.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
}

#relatedList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  transition: background 0.2s;
  align-items: center;
}

.related-card:hover {
  background: rgba(255,255,255,0.06);
}

.related-thumb {
  width: 140px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-thumb img {
  transform: scale(1.04);
}

.related-card:hover .thumb-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  background: var(--accent-hover);
}

.related-thumb .thumb-play-icon {
  width: 32px;
  height: 32px;
}

.related-thumb .thumb-play-icon svg {
  width: 14px;
  height: 14px;
  margin-left: 1px;
}

.related-thumb .thumb-badges {
  position: absolute;
  bottom: 4px;
  right: 4px;
  display: flex;
  gap: 3px;
  z-index: 2;
}

.related-thumb .thumb-badge {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 5px;
  font-size: 0.65rem !important;
  border-radius: 3px;
  font-weight: 600;
  line-height: 1.2;
}

.related-thumb .type-badge {
  background: rgba(204, 0, 0, 0.9);
}

.watch-container.cinema-mode .related-thumb .thumb-play-icon {
  width: 44px;
  height: 44px;
}

.watch-container.cinema-mode .related-thumb .thumb-play-icon svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.watch-container.cinema-mode .related-thumb .thumb-badges {
  bottom: 8px;
  right: 8px;
  gap: 6px;
}

.watch-container.cinema-mode .related-thumb .thumb-badge {
  padding: 3px 7px;
  font-size: 0.75rem !important;
  border-radius: 4px;
}

.related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.related-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-author {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ================= NOVÝ MODERNÍ PROFIL & FACEBOOK BANNER ================= */
.profile-top-bar {
  margin-bottom: 16px;
}

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  position: relative;
}

/* Facebook style úvodní fotka / banner */
.profile-banner-wrapper {
  width: 100%;
  height: 240px;
  position: relative;
  background: #111;
  overflow: hidden;
}

.profile-banner-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a0808 50%, #111111 100%);
}

.banner-edit-overlay {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  z-index: 5;
}

.banner-edit-overlay:hover {
  background: rgba(204, 0, 0, 0.9);
  border-color: rgba(204, 0, 0, 1);
  transform: translateY(-1px);
}

.profile-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  gap: 20px;
  position: relative;
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: -55px; /* Překrytí avataru s bannerem ve stilu FB */
  z-index: 6;
}

.profile-avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid var(--card-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  background: var(--card-bg);
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem !important;
  cursor: pointer;
}

.profile-avatar-container:hover .avatar-edit-overlay {
  display: flex;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 40px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-name-row h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

.profile-stats {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.name-notice {
  font-size: 0.82rem;
  color: #888;
}

/* PRAVÁ STRANA PROFILU (DESKTOP) */
.profile-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* SRDÍČKO / LAJKOVÁNÍ PROFILU */
.profile-like-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 90px;
  outline: none;
}

.profile-like-btn .heart-icon {
  font-size: 1.8rem;
  transition: transform 0.2s ease;
}

.profile-like-btn .like-count {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-color);
  margin-top: 2px;
}

.profile-like-btn:hover {
  background: rgba(255, 0, 80, 0.15);
  border-color: #ff0050;
  transform: translateY(-2px);
}

.profile-like-btn:hover .heart-icon {
  transform: scale(1.2);
}

.profile-like-btn.active {
  background: rgba(255, 0, 80, 0.25);
  border-color: #ff0050;
  box-shadow: 0 0 15px rgba(255, 0, 80, 0.4);
}

/* VELKÝ HISTOGRAM / STATISTICKÝ BOX POČTU TRAILERŮ VPROVO */
.profile-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-stat-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.profile-stat-box .stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.profile-stat-box .stat-label-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 6px;
  font-weight: 700;
}

.profile-videos-section .section-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

/* MODÁLNÍ OKNA */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  position: relative;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem !important;
  cursor: pointer;
  color: var(--text-dim);
  line-height: 1;
}

.close-btn:hover {
  color: #fff;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-content input[type="text"], 
.modal-content input[type="url"], 
.modal-content input[type="password"],
.modal-content select,
.modal-content textarea {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #121212;
  color: var(--text-color);
  outline: none;
  width: 100%;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: #666;
}

.modal-info-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
}

.auth-switch {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  cursor: pointer;
}

.auth-switch:hover {
  color: #fff;
  text-decoration: underline;
}

/* RESPONZIVITA PRO MOBILY & TABLETY */
@media (max-width: 1050px) {
  .watch-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "player"
      "details"
      "sidebar"
      "comments";
  }

  .sidebar-section {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
  }

  #relatedList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }

  .related-card {
    flex-direction: column;
    align-items: stretch;
  }

  .related-thumb {
    width: 100%;
  }

  .related-thumb .thumb-play-icon {
    width: 44px;
    height: 44px;
  }

  .related-thumb .thumb-play-icon svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
  }

  .related-thumb .thumb-badges {
    bottom: 8px;
    right: 8px;
    gap: 6px;
  }

  .related-thumb .thumb-badge {
    padding: 3px 7px;
    font-size: 0.75rem !important;
    border-radius: 4px;
  }
}

@media (max-width: 850px) {
  .profile-banner-wrapper {
    height: 160px;
  }

  .profile-header-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    gap: 16px;
  }

  .profile-header-left {
    flex-direction: column;
    align-items: center;
    margin-top: -55px;
    gap: 10px;
  }

  .profile-details {
    margin-top: 0;
    align-items: center;
  }

  .profile-name-row {
    justify-content: center;
  }

  .profile-header-right {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .profile-stat-box, .profile-like-btn {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }

  .profile-stat-box .stat-number {
    font-size: 1.8rem;
  }

  .banner-edit-overlay {
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 10px 12px;
    gap: 8px;
  }

  .logo {
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  .search-toggle-btn {
    display: flex;
  }

  .nav-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.8);
    z-index: 99;
  }

  .nav-search.mobile-active {
    display: block;
    animation: slideDown 0.2s ease-out forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .btn {
    padding: 6px 10px;
    font-size: 0.8rem !important;
  }

  .user-header-profile {
    max-width: 110px;
    padding: 3px 6px;
  }

  .user-header-name {
    font-size: 0.8rem;
  }

  .categories-bar {
    flex-wrap: wrap;
  }

  .category-pill {
    flex: 1 1 calc(50% - 8px);
    padding: 8px 6px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .comment-text {
    padding-left: 0;
  }
}

@media (max-width: 420px) {
  .header-inner {
    padding: 8px 10px;
    gap: 6px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-actions .btn {
    padding: 5px 8px;
    font-size: 0.75rem !important;
  }

  .user-header-profile {
    max-width: 95px;
  }
}

/* ADMIN STYLY */
.admin-body {
  background-color: #0a0a0a;
}

.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.admin-login-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.admin-login-card h2 {
  font-size: 1.5rem;
}

.admin-login-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.admin-login-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.admin-logo {
  font-size: 1.4rem;
  font-weight: 800;
}

.admin-logo span {
  color: var(--accent-color);
}

.admin-nav-actions {
  display: flex;
  gap: 10px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 18px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  font-size: 2.2rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-search-input {
  max-width: 380px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: #121212;
  color: #fff;
  outline: none;
}

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th, .admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table th {
  background: #121212;
  color: var(--text-dim);
  font-weight: 600;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-thumb-img {
  width: 80px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
}

.btn-danger {
  background: #cc0000;
  color: white;
}

.btn-danger:hover {
  background: #ff1a1a;
}

.btn-warning {
  background: #e67e22;
  color: white;
}

.btn-warning:hover {
  background: #f39c12;
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-success:hover {
  background: #2ecc71;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-block;
}

.badge-active {
  background: rgba(39, 174, 96, 0.2);
  color: #2ecc71;
  border: 1px solid #27ae60;
}

.badge-banned {
  background: rgba(204, 0, 0, 0.2);
  color: #ff4d4d;
  border: 1px solid #cc0000;
}

.action-buttons-cell {
  display: flex;
  gap: 8px;
}

.comment-text-cell {
  max-width: 320px;
  line-height: 1.4;
}

.font-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.label-with-ai {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ai-generate {
  background: linear-gradient(135deg, #cc0000 0%, #800000 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem !important;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.4);
}

.btn-ai-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.6);
  filter: brightness(1.1);
}

.btn-ai-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ================= EMOJI PICKER & PODKOMENTÁŘE ================= */

.comment-input-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-with-emoji-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-with-emoji-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 36px 8px 0;
  outline: none;
}

.input-with-emoji-wrapper input:focus {
  border-color: var(--text-color);
}

.btn-emoji-trigger {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  font-size: 1.2rem !important;
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-emoji-trigger:hover {
  opacity: 1;
  transform: scale(1.15);
}

.emoji-picker-popover {
  position: absolute;
  z-index: 1200;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  width: 270px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  overflow: hidden;
}

.emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.emoji-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem !important;
  cursor: pointer;
  line-height: 1;
}

.emoji-close-btn:hover {
  color: #fff;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding: 4px 4px 8px 4px;
  box-sizing: border-box;
}

.emoji-picker-grid::-webkit-scrollbar {
  width: 5px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.emoji-item-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem !important;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  height: 36px;
  width: 100%;
  border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.emoji-item-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

.comment-actions {
  margin-top: 4px;
}

.reply-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem !important;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
}

.reply-toggle-btn:hover {
  color: #fff;
}

.reply-input-box {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-replies-list {
  margin-top: 10px;
  padding-left: 18px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-reply-item {
  background: rgba(255, 255, 255, 0.015);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-reply-item .comment-text {
  font-size: 0.85rem;
  padding-left: 28px;
}

/* ================= UPOZORNĚNÍ / NOTIFIKACE (FB STYLE) ================= */

.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, transform 0.2s;
}

.notif-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ff3b30;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #141414;
  box-sizing: border-box;
}

.notif-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: 330px;
  max-width: 90vw;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1300;
  overflow: hidden;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.notif-clear-all {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.2s;
}

.notif-clear-all:hover {
  color: #ff4757;
}

.notif-list {
  max-height: 360px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
  align-items: flex-start;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.notif-content {
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.35;
  color: #eee;
}

.notif-title-quote {
  color: var(--text-dim);
  font-style: italic;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .notif-dropdown {
    position: fixed;
    top: 60px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
}

.comment-highlight {
  animation: highlightComment 3s ease-out;
  border-radius: 8px;
}

@keyframes highlightComment {
  0% {
    background: rgba(255, 215, 0, 0.25);
    border: 1px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  }
  100% {
    background: transparent;
  }
}

/* ================= CENTROVANÁ MODERNÍ PAGINACE ================= */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 35px 0 20px 0;
  width: 100%;
}

.pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  flex-wrap: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.page-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.page-btn:hover:not(.disabled):not(.active) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.page-btn.active {
  background: #ff3b30;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.5);
}

.page-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.nav-page-btn {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}

.page-dots {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .pagination-container {
    margin: 25px 0 15px 0;
  }

  .pagination-inner {
    padding: 4px 8px;
    gap: 3px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }

  .nav-page-btn {
    font-size: 1rem;
  }
}