:root {
  /* Default = Dark Mode */
  --bg-primary: #0a0a0c;
  --bg-secondary: #141417;
  --bg-glass: rgba(30, 30, 35, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-solid: rgba(255, 255, 255, 0.1);
  --bg-hover: rgba(255, 255, 255, 0.08);
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a5;
  --text-inverse: #000000;
  
  --accent-primary: #a855f7;
  --accent-secondary: #7B2CBF;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.4);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);

  --button-bg: rgba(255,255,255,0.06);
  --button-bg-hover: rgba(255,255,255,0.15);
  --input-bg: rgba(255, 255, 255, 0.03);
}

:root[data-theme='light'] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-solid: rgba(0, 0, 0, 0.1);
  --bg-hover: rgba(0, 0, 0, 0.05);
  
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-inverse: #ffffff;
  
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.25);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);

  --button-bg: rgba(0, 0, 0, 0.05);
  --button-bg-hover: rgba(0, 0, 0, 0.1);
  --input-bg: rgba(0, 0, 0, 0.02);
}

.logo-dark { display: block; }
.logo-light { display: none; }
:root[data-theme='light'] .logo-dark { display: none; }
:root[data-theme='light'] .logo-light { display: block; }

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

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Base Layout Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  /* 'backwards' (nie 'forwards'): po skonceni animacie nezostane transform, ktory by zo stranky urobil rodica pre position:fixed */
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

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

.floating-logo {
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.3));
}

/* Responsive Utilities & Layouts */
.home-header {
  text-align: center;
  margin: 4rem 0;
}
.home-logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.home-title {
  font-size: 4rem;
  font-weight: 800;
}
.home-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}
.mobile-break {
  display: none;
}

/* Watch Page Header */
.watch-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.watch-logo {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
}
.watch-search-wrapper {
  flex: 0 1 500px;
  width: 100%;
}
.watch-auth-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}
.home-auth-wrapper {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Language toggle button */
.lang-toggle-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: var(--shadow-glass);
  transition: all 0.2s;
}
.lang-toggle-placeholder {
  width: 70px;
  height: 36px;
}

/* Playlist Layout */
.playlist-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.playlist-left {
  flex: 0 0 350px;
  width: 350px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  padding-right: 4px;
}
.playlist-left::-webkit-scrollbar {
  width: 5px;
}
.playlist-left::-webkit-scrollbar-track {
  background: transparent;
}
.playlist-left::-webkit-scrollbar-thumb {
  background: var(--border-glass-solid);
  border-radius: 4px;
}
.playlist-left::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
.playlist-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}
.playlist-input-wrapper {
  display: flex;
  gap: 1rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .home-header {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
  }
  .home-auth-wrapper {
    position: static;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
    order: 1;
    flex-wrap: nowrap;
    gap: 0.6rem;
  }
  .lang-toggle-btn {
    position: static;
    top: unset;
    left: unset;
  }
  .home-logo-title {
    gap: 0.5rem;
    order: 2;
  }
  .home-logo-title img {
    height: 50px !important;
  }
  .home-title {
    font-size: 2.5rem;
  }
  .home-subtitle {
    font-size: 0.85rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    order: 3;
  }
  .mobile-break {
    display: block;
  }
  .home-search-wrapper {
    order: 4;
    width: 100%;
  }
  .watch-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
  }
  .watch-auth-wrapper {
    margin-left: 0 !important;
    justify-content: center;
    width: 100%;
    order: 1; /* na samý vrch */
  }
  .watch-logo {
    justify-content: center;
    order: 2;
  }
  .watch-search-wrapper {
    flex: none;
    width: 100%;
    order: 3;
  }

  .playlist-container {
    flex-direction: column;
  }
  .playlist-left {
    position: static;
    flex: none;
    width: 100%;
    margin-bottom: 1.5rem;
  }
  .playlist-right {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .playlist-input-wrapper {
    flex-direction: column;
  }
}

.playlist-input-card {
  padding: 3rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .playlist-input-card {
    padding: 1.5rem 1rem;
  }
}

/* Search Page Styles */
.search-header-container {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.search-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.search-title {
  font-size: 2.5rem;
  margin: 0;
}
.search-home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  background: var(--accent-gradient);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  border: none;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (max-width: 768px) {
  .search-header-container {
    margin-bottom: 2rem;
    gap: 1rem;
  }
  .search-header-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
  }
  .search-title {
    font-size: 1.7rem;
    line-height: 1.2;
  }
  .search-home-btn {
    align-self: flex-start;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
}

/* Fix ugly browser autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  transition: background-color 5000s ease-in-out 0s;
  -webkit-text-fill-color: var(--text-primary) !important;
}

/* ===== SearchBar ===== */
.searchForm {
  display: flex;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-glass);
  border-radius: 50px;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.searchForm:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-primary);
}

.searchInput {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: inherit;
  outline: none;
}

.searchInput::placeholder {
  color: var(--text-secondary);
}

.searchButton {
  background: var(--accent-gradient);
  border: none;
  padding: 0 2rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.searchButton:hover {
  opacity: 0.9;
}

/* ===== VideoCard ===== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(124, 58, 237, 0.5);
}

.thumbnailContainer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .thumbnail {
  transform: scale(1.05);
}

.playOverlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .playOverlay {
  opacity: 1;
}

.playButton {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  padding-left: 5px; /* Visual center for play icon */
  box-shadow: var(--shadow-glow);
}

.info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-uploader {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ===== VideoPlayer ===== */
.playerContainer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.5s ease-out;
}

.video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #000;
  box-shadow: var(--shadow-glass);
  outline: none;
  border: 1px solid var(--border-glass);
}

.infoBox {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-glass);
}

.player-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.player-uploader {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-uploader::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('../img/logo.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
}

.views {
  color: var(--text-secondary);
  font-size: 1rem;
}

.description {
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 1rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 1rem;
}

/* Scrollbar pre popis */
.description::-webkit-scrollbar {
  width: 8px;
}
.description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.description::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.player-loading, .player-error {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 1.2rem;
  border: 1px solid var(--border-glass);
}

.loadingMedia {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 16px;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  animation: fadeIn 0.3s ease-out;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .infoBox {
    padding: 1.2rem;
    border-radius: 12px;
  }
  
  .player-title {
    font-size: 1.3rem;
  }
  
  .player-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
  }
  
  .player-uploader {
    font-size: 1rem;
  }
}

.choiceOverlay {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  animation: fadeIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.choiceOverlay::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--accent-gradient);
  filter: blur(80px);
  opacity: 0.15;
  border-radius: 50%;
  top: 20%;
  left: 20%;
}

.choiceOverlay::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--accent-gradient);
  filter: blur(80px);
  opacity: 0.15;
  border-radius: 50%;
  bottom: 20%;
  right: 20%;
}

.choiceCard {
  z-index: 1;
  text-align: center;
  max-width: 80%;
  padding: 2.2rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.choiceCard h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.choiceCard p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.choiceButtons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.choiceBtnVideo, .choiceBtnAudio {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  cursor: pointer;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.choiceBtnVideo {
  background: rgba(255, 255, 255, 0.08);
}

.choiceBtnVideo:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.05);
}

.choiceBtnAudio {
  background: var(--accent-gradient);
}

.choiceBtnAudio:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100,50,255,0.3);
}

@media (max-width: 768px) {
  .choiceCard {
    padding: 1.5rem;
    max-width: 90%;
    gap: 1rem;
  }
  
  .choiceCard h2 {
    font-size: 1.25rem;
  }
  
  .choiceCard p {
    font-size: 0.85rem;
  }
  
  .choiceButtons {
    gap: 0.8rem;
    flex-direction: column;
    width: 100%;
  }
  
  .choiceBtnVideo, .choiceBtnAudio {
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
}

.audioPlayerWrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.15) 0%, var(--bg-primary) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.audioPosterWrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.audioPoster {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.4));
  animation: floatAudio 4s ease-in-out infinite;
}

@keyframes floatAudio {
  0%, 100% { transform: translateY(0px); filter: drop-shadow(0 4px 12px rgba(168, 85, 247, 0.3)); }
  50% { transform: translateY(-10px); filter: drop-shadow(0 10px 20px rgba(168, 85, 247, 0.6)); }
}

.audio {
  width: 80%;
  max-width: 600px;
  height: 40px;
  border-radius: 30px;
  outline: none;
}

/* Music Wave animation */
.musicWave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
  margin-top: 0.5rem;
}

.musicWave span {
  display: block;
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite alternate;
}

.musicWave span:nth-child(1) { height: 10px; }
.musicWave span:nth-child(2) { animation-delay: 0.2s; height: 15px; }
.musicWave span:nth-child(3) { animation-delay: 0.4s; height: 25px; }
.musicWave span:nth-child(4) { animation-delay: 0.1s; height: 10px; }
.musicWave span:nth-child(5) { animation-delay: 0.3s; height: 20px; }

@keyframes wave {
  0% { height: 5px; }
  100% { height: 28px; }
}

@media (max-width: 768px) {
  .audioPlayerWrapper {
    aspect-ratio: auto;
    padding: 2.5rem 1.5rem;
  }
  .audioPoster {
    width: 140px;
    height: 140px;
  }
  .audio {
    width: 100%;
  }
}

/* ===== PHP verzia: doplnky ===== */
.page-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.page-main { flex: 1; }
.site-footer { text-align: center; padding: 1.5rem; font-size: .85rem; color: var(--text-secondary); border-top: 1px solid var(--border-glass-solid); }
.site-footer a { color: inherit; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.section-title { font-size: 2rem; margin-bottom: 2rem; display: flex; align-items: center; gap: 10px; }
.empty-panel { padding: 2rem; text-align: center; color: var(--text-secondary); }
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-uploader { font-size: .95rem; color: var(--text-secondary); font-weight: 500; }
.card-meta { font-size: .85rem; color: var(--text-secondary); opacity: .8; }
.player-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }
.player-meta { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-glass); }
.player-uploader { font-weight: 600; font-size: 1.1rem; color: var(--text-primary); display: flex; align-items: center; gap: .5rem; }
.player-uploader::before { content: ''; display: inline-block; width: 32px; height: 32px; background: url('../img/logo.png') center/contain no-repeat; border-radius: 6px; }
.player-error { width: 100%; padding: 1rem; color: #ff4d4d; background: rgba(255,70,70,.08); border-radius: 12px; white-space: pre-wrap; font-size: .9rem; }
.player-loading { width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border-radius: 16px; color: var(--text-secondary); }
@media (max-width: 768px) { .player-title { font-size: 1.3rem; } .player-meta { flex-direction: column; align-items: flex-start; gap: .8rem; margin-bottom: 1.2rem; padding-bottom: 1.2rem; } }
.theme-toggle { background: var(--bg-glass); border: 1px solid var(--border-glass); color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-glass); transition: all .2s; flex-shrink: 0; }
.btn { padding: .5rem 1.2rem; border-radius: 16px; border: none; background: var(--accent-gradient); color: #fff; font-weight: bold; cursor: pointer; box-shadow: var(--shadow-glass); font-family: inherit; }
.btn-ghost { padding: .5rem 1rem; border-radius: 12px; border: 1px solid var(--border-glass); background: var(--button-bg); color: var(--text-primary); cursor: pointer; white-space: nowrap; flex-shrink: 0; font-family: inherit; }
.btn-ghost:hover { background: rgba(255,70,70,.2); }
[data-auth-widget] { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.auth-name { font-size: .9rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.promo-banner { background: linear-gradient(135deg, rgba(168,85,247,.1), rgba(124,58,237,.05)); border: 1px solid rgba(168,85,247,.2); border-radius: 16px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.promo-banner p { margin: 0; font-size: .95rem; color: var(--text-secondary); line-height: 1.4; flex: 1 1 300px; }
.promo-banner strong { color: var(--accent-primary); }
.pill { padding: .6rem 1.2rem; border-radius: 20px; border: 1px solid var(--border-glass); background: var(--button-bg); color: var(--text-primary); cursor: pointer; font-weight: 500; font-size: .9rem; transition: all .3s; white-space: nowrap; display: flex; align-items: center; gap: .4rem; font-family: inherit; }
.pill.active { border-color: var(--accent-primary); background: var(--accent-gradient); color: #fff; font-weight: bold; box-shadow: var(--shadow-glow); }
.pill-count { background: var(--button-bg-hover); border-radius: 10px; padding: .1rem .5rem; font-size: .75rem; }
.pill-x { background: var(--button-bg); border: 1px solid var(--border-glass-solid); color: var(--text-secondary); cursor: pointer; border-radius: 50%; min-width: 28px; min-height: 28px; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.pill-x:hover { background: rgba(255,70,70,.2); color: #ff4d4d; border-color: rgba(255,70,70,.4); }
.tabs-row { display: flex; gap: .5rem; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.fav-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; transition: all .3s; position: relative; }
.fav-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(124,58,237,.2); }
.fav-card img.fav-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px 16px 0 0; }
.fav-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; }
.fav-info { padding: .8rem 1rem; }
.fav-info h4 { font-size: .95rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.fav-info p { margin-top: .3rem; font-size: .8rem; color: var(--text-secondary); }
.pl-row { display: flex; gap: 1rem; padding: .7rem 1rem; border-radius: 12px; align-items: center; transition: background .2s; }
.pl-row:hover { background: var(--bg-hover); }
.pl-row .n { color: var(--text-secondary); width: 20px; text-align: right; font-size: .9rem; }
.pl-row img { width: 80px; height: 45px; border-radius: 6px; object-fit: cover; }
.pl-row .t { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: .2rem; }
.pl-row h4 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row p { font-size: .85rem; color: var(--text-secondary); }
.pl-play { background: var(--text-primary); color: var(--bg-primary); padding: .8rem 1.5rem; border-radius: 30px; text-align: center; font-weight: bold; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; gap: .5rem; }
.pl-del { background: var(--button-bg); border: 1px solid var(--border-glass-solid); color: var(--text-primary); padding: .8rem 1.5rem; border-radius: 30px; cursor: pointer; font-weight: bold; font-size: 1rem; font-family: inherit; }
.pl-del:hover { background: rgba(255,70,70,.15); border-color: rgba(255,70,70,.4); color: #ff4d4d; }
.mt-spinner { width: 40px; height: 40px; border: 3px solid var(--border-glass-solid); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 1rem; }
.mt-input { padding: 1rem; border-radius: 12px; border: 1px solid var(--border-glass); background: var(--input-bg); color: var(--text-primary); font-size: 1rem; width: 100%; font-family: inherit; }
.mt-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding-top: 6rem; backdrop-filter: blur(8px); }
.mt-modal { background: var(--bg-secondary); border: 1px solid var(--border-glass); border-radius: 24px; padding: 2rem; width: 90%; max-width: 400px; box-shadow: var(--shadow-glow); position: relative; }
.mt-modal h2 { text-align: center; margin-bottom: 1.5rem; }
.mt-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }
.mt-msg-err { color: #ff4d4d; background: rgba(255,70,70,.1); padding: .8rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.mt-msg-ok { color: #4ade80; background: rgba(74,222,128,.1); padding: .8rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.mt-link { background: none; border: none; color: var(--accent-primary); cursor: pointer; font-size: .9rem; font-family: inherit; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; padding: .5rem 1rem; border-radius: 16px; font-size: .85rem; font-weight: bold; background: var(--button-bg); color: var(--text-primary); border: 1px solid var(--border-glass-solid); cursor: pointer; transition: all .2s; font-family: inherit; }
.mode-btn { display: flex; align-items: center; gap: 8px; padding: .7rem 1.4rem; border-radius: 24px; cursor: pointer; font-weight: bold; font-size: .95rem; background: var(--button-bg); color: var(--text-primary); border: 1px solid var(--border-glass-solid); transition: all .3s; font-family: inherit; }
.mode-btn.active { background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-glass); }
.nav-row { display: flex; justify-content: space-between; padding: 1rem; background: var(--bg-glass); border-radius: 0 0 12px 12px; }
.nav-btn { background: var(--button-bg); border: none; padding: .8rem 1.5rem; border-radius: 8px; color: var(--text-primary); cursor: pointer; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.nav-btn.primary { background: var(--accent-gradient); color: #fff; }
.global-overlay { position: fixed; inset: 0; background: var(--bg-glass); backdrop-filter: blur(12px); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-primary); }
.global-overlay .big-spin { width: 60px; height: 60px; border: 4px solid var(--border-glass-solid); border-left-color: var(--accent-primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 1.5rem; }

.tap-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; z-index: 5; padding: 1rem 2rem; border: none; border-radius: 40px; background: var(--accent-gradient); color: #fff; font-weight: bold; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-glow); display: flex; align-items: center; gap: .6rem; font-family: inherit; }

.queue-box { background: var(--bg-glass); backdrop-filter: blur(12px); border: 1px solid var(--border-glass); border-radius: 16px; overflow: hidden; }
.q-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--border-glass); }
.q-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--button-bg); border: 1px solid var(--border-glass-solid); border-radius: 10px; cursor: pointer; color: var(--text-secondary); transition: all .2s; padding: 0; }
.q-btn:hover { color: var(--text-primary); background: var(--button-bg-hover); }
.q-btn.on { color: #fff; background: var(--accent-gradient); border-color: transparent; box-shadow: var(--shadow-glow); }
.q-list { max-height: 340px; overflow-y: auto; }
.q-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 1rem; content-visibility: auto; contain-intrinsic-size: 56px; transition: background .2s; }
.q-row:hover { background: var(--bg-hover); }
.q-row.current { background: rgba(168,85,247,.15); }
.q-row .n { width: 26px; text-align: right; color: var(--text-secondary); font-size: .85rem; flex-shrink: 0; }
.q-row.current .n { color: var(--accent-primary); }
.q-row img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.q-row .t { display: flex; flex-direction: column; min-width: 0; }
.q-row .t b { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .t i { font-style: normal; font-size: .78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.filter-row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Posuvniky: tmavá dráha + priesvitný jazdec (rovnako ako pri popise videa) */
.q-list, .description, .playlist-left, .tabs-row { scrollbar-color: rgba(255,255,255,.25) rgba(255,255,255,.05); }
:root[data-theme='light'] .q-list, :root[data-theme='light'] .description, :root[data-theme='light'] .playlist-left, :root[data-theme='light'] .tabs-row { scrollbar-color: rgba(0,0,0,.3) rgba(0,0,0,.05); }
.q-list::-webkit-scrollbar { width: 8px; }
.q-list::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 4px; }
.q-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }
.q-list::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }
.description::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }
:root[data-theme='light'] .q-list::-webkit-scrollbar-track, :root[data-theme='light'] .description::-webkit-scrollbar-track { background: rgba(0,0,0,.05); }
:root[data-theme='light'] .q-list::-webkit-scrollbar-thumb, :root[data-theme='light'] .description::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); }

.hist-item { position: relative; }
.hist-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; opacity: 0; transition: all .2s; z-index: 2; }
.hist-item:hover .hist-x, .hist-x:focus { opacity: 1; }
.hist-x:hover { background: rgba(255,70,70,.85); }
@media (hover: none) { .hist-x { opacity: .85; } }

/* ===== Viditelny focus (klavesnica / ovladac na TV) ===== */
:focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 3px; }
.card:focus-visible, .fav-card:focus-visible, .q-row:focus-visible, .pl-row:focus-visible { outline-offset: 2px; transform: translateY(-4px); box-shadow: var(--shadow-glow); }
input:focus-visible { outline-offset: 1px; }

/* ===== Android aplikacia: natívny prehravac ===== */
.native-bar { width: min(90%, 640px); display: flex; flex-direction: column; gap: .8rem; z-index: 2; }
.native-bar .n-row { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.n-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border-glass-solid); background: var(--button-bg); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.n-btn.big { width: 68px; height: 68px; background: var(--accent-gradient); color: #fff; border: none; box-shadow: var(--shadow-glow); }
.n-seek { flex: 1; accent-color: var(--accent-primary); height: 28px; }
.t-cur, .t-dur { font-size: .85rem; color: var(--text-secondary); min-width: 42px; text-align: center; }

/* ===== Android TV / Google TV ===== */
html.tv body { zoom: 1.1; }
html.tv .home-auth-wrapper { position: static; justify-content: center; margin-bottom: 1.5rem; }
html.tv .lang-toggle-btn { position: static; }
html.tv .home-header { display: flex; flex-direction: column; }
html.tv .hist-x, html.tv .fav-remove { display: none; }
html.tv .video-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
html.tv .q-list { max-height: 420px; }
html.tv :focus-visible { outline-width: 4px; }

/* ===== Mobil: nic nesmie pretekat za okraj obrazovky ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.container, .playerContainer, .infoBox, .queue-box { min-width: 0; max-width: 100%; }
.nav-row { gap: .6rem; }
.nav-row > div { flex: 1 1 0; }
.nav-btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .nav-row { padding: .7rem; }
  .nav-btn { font-size: .85rem; gap: 6px; padding: .8rem .4rem; }
  .mode-btn { padding: .6rem 1.1rem; }
  .player-meta > div { min-width: 0; }
}

/* ===== Android TV: kompaktnejsia uvodna stranka, velke zamerane prvky ===== */
html.tv .container { padding: 1.2rem 2.5rem; max-width: 100%; }
html.tv .home-header { margin: .8rem 0 1.2rem; }
html.tv .home-logo-title { margin-bottom: .4rem; }
html.tv .home-logo-title img { height: 46px !important; }
html.tv .home-subtitle { font-size: .95rem; margin-bottom: 1.1rem; }
html.tv .home-auth-wrapper { margin-bottom: .8rem; }
html.tv section { margin-top: 2rem !important; }
html.tv .section-title { font-size: 1.5rem; margin-bottom: 1rem; }
html.tv .searchInput { font-size: 1.1rem; padding: .8rem 1.4rem; }
html.tv .card:focus-visible, html.tv .fav-card:focus-visible { transform: scale(1.04); z-index: 2; }
html.tv .pill, html.tv .btn, html.tv .btn-ghost, html.tv .nav-btn, html.tv .dl-btn, html.tv .mode-btn { padding-top: .75rem; padding-bottom: .75rem; }
html.tv .q-btn { width: 46px; height: 46px; }
html.tv .q-row { padding-top: .7rem; padding-bottom: .7rem; }
html.tv .n-btn { width: 60px; height: 60px; }
html.tv .n-btn.big { width: 80px; height: 80px; }
html.tv .n-seek { height: 36px; }
html.tv .watch-header { margin-bottom: 1rem; }
html.tv ::-webkit-scrollbar { display: none; }

/* ===== Video na celu obrazovku (pseudo-fullscreen; zostava aj pri dalsom videu) ===== */
body.fs-on { overflow: hidden; }
#mt-media-box.fs { position: fixed; inset: 0; z-index: 9998; background: #000; display: flex; align-items: center; justify-content: center; }
#mt-media-box.fs video, #mt-media-box.fs iframe { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: none; object-fit: contain; background: #000; }
#mt-media-box:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
#mt-media-box:fullscreen video, #mt-media-box:fullscreen iframe { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: none; object-fit: contain; background: #000; }
.fs-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: .5rem; justify-content: flex-end; padding: .8rem 1rem; background: linear-gradient(to bottom, rgba(0,0,0,.75), transparent); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 6; }
.fs-bar.show { opacity: 1; pointer-events: auto; }
.fs-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.35); font-weight: bold; font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; }
.fs-btn svg { width: 18px; height: 18px; }
.fs-btn:hover, .fs-btn:focus-visible { background: var(--accent-primary); border-color: transparent; }
html.tv .fs-btn { width: 46px; height: 46px; }

/* ===== Prehravac hudby: kompaktny (nezaberie celu obrazovku) ===== */
.audioPlayerWrapper { aspect-ratio: auto !important; flex-direction: row; justify-content: flex-start; align-items: center; gap: 1.6rem; padding: 1.2rem 1.8rem; }
.audioPosterWrapper { flex-shrink: 0; gap: .4rem; }
.audioPoster { width: 84px; height: 84px; }
.musicWave { height: 22px; margin-top: 0; }
.native-bar { flex: 1; width: auto; min-width: 0; }
.audioPlayerWrapper .audio { flex: 1; width: auto; max-width: none; }
@media (max-width: 768px) {
  .audioPlayerWrapper { flex-direction: column; padding: 1rem; gap: .8rem; }
  .audioPoster { width: 64px; height: 64px; }
  .native-bar { width: 100%; }
}
html.tv .n-btn { width: 52px; height: 52px; }
html.tv .n-btn.big { width: 64px; height: 64px; }

/* TV: pri celej obrazovke bez zvacsenia (video sa inak posunie) */
html.tv body.fs-on { zoom: 1; }

/* ===== Ekvalizer a logo: animacie len cez transform (bez prekreslovania - na TV inak bliká tmavý obdĺžnik) ===== */
@keyframes floatAudio2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes waveScale { 0% { transform: scaleY(.2); } 100% { transform: scaleY(1); } }
.audioPoster { animation: floatAudio2 4s ease-in-out infinite; will-change: transform; }
.musicWave { height: 28px; align-items: flex-end; }
.musicWave span { height: 28px !important; transform-origin: bottom; animation-name: waveScale; animation-duration: 1.2s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; will-change: transform; }
/* v aplikacii (WebView/TV) bez filtra pod animovanym logom - sposobuje blikanie */
html.app .audioPoster { filter: none; }
html.app .audioPlayerWrapper { background: radial-gradient(circle at 12% 50%, rgba(168,85,247,.15) 0%, var(--bg-primary) 70%); }

/* ===== TV: zameranie kopiruje tvar prvku (kruh pri okruhlych tlacidlach) ===== */
html.tv :focus, html.tv :focus-visible { outline: none; }
html.tv a:focus-visible, html.tv button:focus-visible, html.tv [tabindex]:focus-visible, html.tv input[type=range]:focus-visible {
  box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary), 0 0 18px 6px rgba(168,85,247,.55);
}
html.tv .searchForm:focus-within { border-color: #fff; box-shadow: 0 0 0 4px var(--accent-primary), var(--shadow-glow); }
html.tv .card:focus-visible, html.tv .fav-card:focus-visible { box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary), 0 0 22px 6px rgba(168,85,247,.55); }
html.tv .fs-btn:focus-visible { box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--accent-primary); }

/* ===== Stiahnutie aplikacie (len na webe, v aplikacii skryte) ===== */
.app-downloads { text-align: center; padding: 2rem 1rem 1.2rem; }
.app-dl-title { font-size: 1.05rem; margin-bottom: 1rem; color: var(--text-primary); }
.app-dl-btns { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.app-dl { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.3rem; border-radius: 30px; background: var(--button-bg); border: 1px solid var(--border-glass-solid); color: var(--text-primary); font-weight: 600; transition: all .2s; }
.app-dl:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.app-dl-hint { margin-top: .8rem; font-size: .8rem; color: var(--text-secondary); }
html.app .app-downloads { display: none; }

/* ===== Jednotny tvar: tlacidla su vsade "pilulka" (zaoblene do stran), ikonove tlacidla su kruh. Nic hranate. ===== */
.btn, .btn-ghost, .nav-btn, .dl-btn, .mode-btn, .pill, .pl-play, .pl-del, .search-home-btn, .app-dl, .lang-toggle-btn, .tap-play { border-radius: 999px; }
.q-btn, .hist-x, .fav-remove, .pill-x, .theme-toggle, .n-btn, .fs-btn { border-radius: 50%; }
.nav-btn { padding: .8rem 1.5rem; }
.mt-input { border-radius: 999px; padding: 1rem 1.4rem; }
.mt-input[name=p1], .mt-input[name=p2] { padding-right: 1.4rem; }
.pill-count { border-radius: 999px; }
/* vyhladavanie: tlacidlo lupy je vnutri ako maly kruh/pilulka, nie hranaty blok */
.searchForm { padding: 4px; overflow: visible; }
.searchInput { padding: .8rem 1.3rem; }
.searchButton { border-radius: 999px; padding: 0 1.8rem; }
@media (max-width: 480px) { .searchButton { padding: 0 1.3rem; } }
/* TV: hlavicka prehravaca sa nesmie rozbehnut za okraj */
html.tv .watch-header { flex-wrap: wrap; justify-content: space-between; gap: .8rem 1rem; }
html.tv .watch-logo { flex: 0 0 auto; }
html.tv .watch-search-wrapper { flex: 1 1 320px; }
html.tv .watch-auth-wrapper { flex: 0 0 auto; }

/* ===== TV: 4 ukazky vedla seba (nie 2), mensie texty pod nimi ===== */
html.tv .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
html.tv .fav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
html.tv .card .info { padding: .6rem .75rem .75rem; gap: .25rem; }
html.tv .card-title { font-size: .88rem; line-height: 1.3; }
html.tv .card-uploader { font-size: .76rem; }
html.tv .card-meta { font-size: .7rem; }
html.tv .playButton { width: 44px; height: 44px; font-size: 1.1rem; }
html.tv .fav-info { padding: .6rem .75rem; }
html.tv .fav-info h4 { font-size: .85rem; }
html.tv .fav-info p { font-size: .72rem; }
html.tv .fav-card img.fav-thumb { border-radius: 14px 14px 0 0; }

/* ===== Polia: jedno zvyraznenie (okruhle), nie dvojity stvorcovy obrys ===== */
input:focus, input:focus-visible, textarea:focus-visible { outline: none; }
.searchInput:focus, .searchInput:focus-visible { outline: none; box-shadow: none; }
.searchForm:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(168,85,247,.35), var(--shadow-glow); }
.mt-input:focus, .mt-input:focus-visible { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(168,85,247,.35); }

/* ===== Radia ===== */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.radio-grid [hidden], .radio-card[hidden] { display: none !important; }
.radio-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .7rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border-glass); border-radius: 18px; color: var(--text-primary); cursor: pointer; text-align: center; font: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.radio-card:hover { transform: translateY(-4px); border-color: rgba(124,58,237,.6); box-shadow: var(--shadow-glow); }
.radio-card.current { border-color: var(--accent-primary); }
.radio-logo { width: 84px; height: 84px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: .3rem; position: relative; }
.radio-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.radio-logo b { display: none; font-size: 1.6rem; color: #fff; }
.radio-logo.nologo { background: var(--accent-gradient); }
.radio-logo.nologo b { display: block; }
.radio-name { font-weight: 700; font-size: .95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.radio-sub { font-size: .75rem; color: var(--text-secondary); }
.radio-eq { position: absolute; top: 10px; right: 12px; display: none; align-items: flex-end; gap: 2px; height: 16px; }
.radio-eq i { display: block; width: 3px; height: 16px; background: var(--accent-primary); border-radius: 2px; transform-origin: bottom; animation: waveScale .9s ease-in-out infinite alternate; }
.radio-eq i:nth-child(2) { animation-delay: .2s; } .radio-eq i:nth-child(3) { animation-delay: .4s; }
.radio-card.playing .radio-eq { display: flex; }
.radio-card.playing { border-color: var(--accent-primary); box-shadow: var(--shadow-glow); }

.radio-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(920px, calc(100% - 24px)); z-index: 900; display: flex; align-items: center; gap: .9rem; padding: .55rem .9rem; background: var(--bg-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--accent-secondary); border-radius: 999px; box-shadow: var(--shadow-glass); }
.radio-bar[hidden] { display: none; }
.radio-bar-logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.radio-bar-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.radio-bar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.radio-bar-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-bar-info small { color: var(--text-secondary); font-size: .78rem; } .radio-bar-info small.on { color: var(--accent-primary); font-weight: 700; } .radio-bar-info small.err { color: #ff4d4d; }
.radio-bar-ctl { display: flex; align-items: center; gap: .5rem; }
.radio-vol { width: 110px; accent-color: var(--accent-primary); }
.radio-bar .n-btn { width: 40px; height: 40px; } .radio-bar .n-btn.big { width: 48px; height: 48px; }
body.radio-on .radio-page { padding-bottom: 6.5rem; }
@media (max-width: 600px) { .radio-vol { display: none; } .radio-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; } .radio-logo { width: 70px; height: 70px; } }
html.tv .radio-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
html.tv .radio-logo { width: 64px; height: 64px; }
html.tv .radio-name { font-size: .82rem; } html.tv .radio-sub { font-size: .68rem; }
html.tv .radio-card:focus-visible { box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary), 0 0 22px 6px rgba(168,85,247,.55); transform: scale(1.04); }

/* sekcia na uvodnej stranke */
.radio-strip { display: flex; gap: .9rem; overflow-x: auto; padding: .3rem .2rem 1rem; scrollbar-width: thin; }
.radio-chip { flex: 0 0 auto; width: 104px; display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--text-primary); text-align: center; }
.radio-chip .radio-logo { width: 84px; height: 84px; margin: 0; transition: transform .2s, box-shadow .2s; }
.radio-chip:hover .radio-logo { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.radio-chip span.n { font-size: .8rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.tv .radio-chip { width: 92px; } html.tv .radio-chip .radio-logo { width: 70px; height: 70px; }

.radio-logo.dark { background: #2b2b33; }
.radio-bar-logo.dark { background: #2b2b33; }

/* Obľúbené rádiá (srdiečko) */
.radio-fav { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-glass); background: rgba(0,0,0,.35); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: transform .15s, color .15s, background .15s; }
.radio-fav svg { fill: none; }
.radio-fav:hover { transform: scale(1.12); color: #fff; }
.radio-card.fav .radio-fav { color: #ff4d8d; background: rgba(255,77,141,.15); border-color: rgba(255,77,141,.5); }
.radio-card.fav .radio-fav svg { fill: currentColor; }
.radio-card:focus-visible, .radio-fav:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent-primary); }
/* domovska stranka: kompaktny rad 6 radii (na TV vsetky v jednom riadku) */
.radio-strip.compact { overflow-x: auto; padding-bottom: .4rem; }
.radio-strip.compact .radio-chip { width: 96px; }
.radio-strip.compact .radio-chip .radio-logo { width: 76px; height: 76px; }
.radio-chip .heart { color: #ff4d8d; font-size: .8rem; }
html.tv .radio-strip.compact { overflow: visible; flex-wrap: nowrap; justify-content: space-between; gap: .5rem; padding: .5rem .3rem; }
html.tv .radio-strip.compact .radio-chip { flex: 1 1 0; width: auto; min-width: 0; }
/* posuvnik radii rovnaky ako inde */
.radio-strip { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) rgba(255,255,255,.05); }
.radio-strip::-webkit-scrollbar { height: 8px; }
.radio-strip::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 999px; }
.radio-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }
.radio-strip::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }
.radio-strip::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
:root[data-theme='light'] .radio-strip { scrollbar-color: rgba(0,0,0,.3) rgba(0,0,0,.05); }
/* domov: mobil = 3 vedla seba, dalsie nizsie; TV = 6 vedla seba */
@media (max-width: 600px) {
  .radio-strip.compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem .5rem; overflow: visible; }
  .radio-strip.compact .radio-chip { width: auto; min-width: 0; }
}
html.tv .radio-strip.compact { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; overflow: visible; }
html.tv .radio-strip.compact .radio-chip { width: auto; }

/* srdiecko v prehravaci; na TV sa srdiecka na kartach skryju (ovlada sa cez prehravac) */
.radio-bar .n-btn.fav { color: #ff4d8d; }
.radio-bar .n-btn.fav svg { fill: currentColor; } .radio-bar .n-btn svg { fill: none; }
.radio-bar .n-btn.big svg, #rb-prev svg, #rb-next svg { fill: currentColor; }
html.tv .radio-fav { display: none; }

/* domov: len vybrane radia, po 6 v rade (dalsie do dalsieho radu) */
.radio-strip.compact { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem .6rem; overflow: visible; }
.radio-strip.compact .radio-chip { width: auto; min-width: 0; }
.radio-empty { color: var(--text-secondary); margin: .4rem 0 0; }
@media (max-width: 600px) { .radio-strip.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* TV: okno radia */
.radio-tv-modal { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; text-align: center; max-width: 440px; }
.radio-tv-modal .radio-logo { width: 110px; height: 110px; margin: 0 auto; }
.radio-tv-modal h2 { margin: .2rem 0 .6rem; }
.radio-tv-modal .btn { padding: 1rem; border-radius: 999px; font-size: 1.1rem; }
.radio-tv-modal .btn.secondary { background: var(--bg-glass); color: var(--text-primary); border: 1px solid var(--border-glass); }
.radio-tv-modal .btn.on { color: #ff4d8d; border-color: rgba(255,77,141,.6); }
.radio-tv-modal .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary), 0 0 22px 6px rgba(168,85,247,.55); }

/* prazdne miesto radia na domovskej stranke */
.radio-chip.empty .radio-logo { background: transparent; border: 2px dashed var(--border-glass); color: var(--text-secondary); font-size: 2rem; font-weight: 300; }
.radio-chip.empty:hover .radio-logo, .radio-chip.empty:focus-visible .radio-logo { border-color: var(--accent-primary); color: var(--accent-primary); }

/* poradie obluebenych radii: ‹ › na karte (len v zalozke Obluebene) */
.radio-move { display: none; gap: .5rem; margin-top: .4rem; }
.radio-grid.fav-mode .radio-card.fav .radio-move { display: flex; }
.radio-move button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-glass); background: var(--bg-glass); color: var(--text-primary); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0; }
.radio-move button:hover, .radio-move button:focus-visible { border-color: var(--accent-primary); color: var(--accent-primary); outline: none; }
html.tv .radio-move { display: none !important; }
/* mobil: mensie medzery hore a medzi sekciami na domovskej stranke */
@media (max-width: 600px) {
  main.container { padding-top: .8rem; }
  .radio-strip.compact { padding-bottom: 0; }
}
@media (max-width: 600px) {
  .home-header { margin-top: 0; }
  .radio-strip.compact { gap: .6rem .5rem; }
}
.radio-chip.empty .n { display: none; }
/* TV: oznacenie radia na domovskej stranke - zaoblene (nie hranate) */
.radio-chip:focus, .radio-chip:focus-visible { outline: none; }
.radio-chip:focus-visible .radio-logo, html.tv .radio-chip:focus .radio-logo { box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary), 0 0 22px 6px rgba(168,85,247,.55); transform: scale(1.06); }
.radio-chip:focus-visible .n, html.tv .radio-chip:focus .n { color: var(--accent-primary); }
/* TV: ziadny hranaty ram okolo celeho radia (rámik je len okolo loga) + bez orezanej žiary pri záložkách */
html.tv .radio-chip:focus-visible, html.tv .radio-chip:focus { box-shadow: none; }
html.tv .tabs-row > *:not(:focus-visible) { box-shadow: none; }
.tabs-row { padding-top: .5rem; padding-left: .4rem; }
/* TV: slaby grafický cip (GL context lost -> zamrznutie): bez rozmazania pozadia, bez animacie ekvalizera a prechodov */
html.tv *, html.tv *::before, html.tv *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.tv .radio-bar { background: var(--bg-secondary); }
html.tv .mt-modal-back { background: rgba(0,0,0,.92); }
html.tv .radio-eq i { animation: none; transform: scaleY(.7); }
html.tv .radio-card, html.tv .radio-chip .radio-logo, html.tv .radio-fav { transition: none; }
html.tv .radio-card:focus-visible, html.tv .radio-chip:focus-visible .radio-logo { transform: none; }
/* hlavicka domov: jazyk vlavo hore, tema + ucet vpravo hore (aj na TV, ako na PC); mensie logo */
html.tv .home-auth-wrapper { position: fixed; top: 1.2rem; right: 2rem; left: auto; width: auto; margin: 0; justify-content: flex-end; order: 0; }
html.tv .lang-toggle-btn { position: fixed; top: 1.2rem; left: 1.5rem; }
html.tv .home-header { margin-top: 3.2rem; }
.home-logo-title img { height: 48px !important; }
@media (max-width: 600px) { .home-logo-title img { height: 40px !important; } }
html.tv .home-logo-title img { height: 42px !important; }

/* odhlasenie = len ikona (kruhove tlacidlo) */
.btn-ghost.logout-ico { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* odhlasenie rovnako velke ako prepinac temy */
.btn-ghost.logout-ico { width: 40px; height: 40px; min-width: 40px; min-height: 40px; box-sizing: border-box; }

/* TV: krizik pri playliste sa neoznacuje ovladacom (playlist sa maze az tlacidlom v jeho zozname) */
html.tv .pill-x { display: none; }

/* potvrdzovacie okno pri mazani */
.confirm-modal { display: flex; flex-direction: column; gap: .8rem; text-align: center; }
.confirm-modal h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
.confirm-modal .btn { padding: 1rem; border-radius: 999px; font-size: 1.05rem; }
.confirm-modal .btn.secondary { background: var(--bg-glass); color: var(--text-primary); border: 1px solid var(--border-glass); }
.confirm-modal .btn.danger { background: #c0392b; color: #fff; border: none; }
.confirm-modal .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 6px var(--accent-primary); }

.radio-tv-move { display: flex; gap: .6rem; } .radio-tv-move .btn { flex: 1; padding: .9rem .5rem; font-size: 1rem; white-space: nowrap; }
.radio-tv-modal { max-width: 560px; }
/* TV: okno radia musi sa zmestit na obrazovku (720 px vysoka) - vycentrovane a kompaktne */
html.tv .mt-modal-back { align-items: center; padding-top: 0; }
html.tv .radio-tv-modal { padding: 1rem 1.5rem; gap: .5rem; max-height: 94vh; overflow: hidden; }
html.tv .radio-tv-modal .radio-logo { width: 64px; height: 64px; }
html.tv .radio-tv-modal h2 { font-size: 1.3rem; margin: 0 0 .3rem; }
html.tv .radio-tv-modal .btn { padding: .65rem; font-size: 1rem; }
html.tv .radio-tv-move .btn { padding: .65rem .4rem; font-size: .95rem; }
html.tv .confirm-modal { padding: 1.2rem 1.5rem; }
/* TV: tlacidla posunu pod sebou (sipka dole ich prejde jedno po druhom) */
html.tv .radio-tv-move { flex-direction: column; gap: .5rem; }
html.tv .radio-tv-move .btn { padding: .55rem; }
/* TV: jazyk / tema / ucet su iba hore na stranke (pri posuvani dole zmiznu) */
html.tv .home-auth-wrapper, html.tv .lang-toggle-btn { position: absolute; }
/* TV: hlavicka = jeden riadok na celu sirku: jazyk vlavo, tema + ucet vpravo */
html.tv .home-auth-wrapper { position: absolute; top: 1.2rem; left: 0; right: 0; width: auto; padding: 0 2rem 0 1.5rem; justify-content: flex-end; gap: .8rem; }
html.tv .home-auth-wrapper .lang-toggle-btn { position: static; margin-right: auto; top: auto; left: auto; }

/* Web (PC/tablet): hlavicka len hore na stranke, pri posuvani odide (nie je fixna) */
@media (min-width: 769px) {
  .home-auth-wrapper { position: absolute; top: 1.2rem; left: 0; right: 0; width: auto; padding: 0 2rem 0 1.25rem; justify-content: flex-end; gap: .8rem; }
  .home-auth-wrapper .lang-toggle-btn { position: static; margin-right: auto; top: auto; left: auto; }
}

/* TV: hlavicka na stranke prehravania = jeden kompaktny riadok (logo | vyhladavanie | tema + ucet) */
html.tv .watch-header { flex-wrap: nowrap; justify-content: space-between; gap: 1.2rem; margin-bottom: .9rem; }
html.tv .watch-logo { flex: 0 0 auto; }
html.tv .watch-logo img { height: 24px !important; }
html.tv .watch-search-wrapper { flex: 1 1 auto; max-width: 560px; min-width: 0; }
html.tv .watch-header .searchForm { padding: 3px; }
html.tv .watch-header .searchInput { padding: .45rem 1.1rem; font-size: .95rem; }
html.tv .watch-header .searchButton { padding: 0 1.2rem; }
html.tv .watch-header .searchButton svg { width: 18px; height: 18px; }
html.tv .watch-auth-wrapper { flex: 0 0 auto; gap: .6rem; }
html.tv .watch-auth-wrapper .theme-toggle,
html.tv .watch-auth-wrapper .btn-ghost.logout-ico { width: 36px !important; height: 36px !important; min-width: 36px !important; min-height: 36px !important; padding: 0 !important; }
html.tv .watch-auth-wrapper .theme-toggle svg, html.tv .watch-auth-wrapper .logout-ico svg { width: 18px; height: 18px; }
html.tv .watch-auth-wrapper .auth-name { font-size: .85rem; }

/* TV: logo (navrat na uvod) - oznacenie zaoblene ako ostatne tlacidla, nie hranate */
html.tv .watch-logo { border-radius: 999px; padding: .35rem .9rem; margin-left: -.9rem; outline: none; }
html.tv .watch-logo:focus, html.tv .watch-logo:focus-visible { border-radius: 999px; outline: none; }
