/* Fájl: styles.css | Date: 2026-09-05 | Version: 1.20 | Model: Gemini 3.8 Flash */

:root {
  --bg-main: #0a0e17;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(28, 38, 58, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(212, 175, 55, 0.4);
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --accent-crimson: #c0392b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 15% 15%, rgba(212, 175, 55, 0.04) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(192, 57, 43, 0.04) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  margin: -0.35rem -0.6rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.brand-container:hover {
  background: rgba(255, 255, 255, 0.04);
}

.brand-container:hover .emblem {
  transform: scale(1.04);
  box-shadow: 0 4px 18px rgba(192, 57, 43, 0.6);
}

.brand-container:hover h1 {
  color: var(--accent-gold);
}

.emblem {
  background: linear-gradient(135deg, #c0392b 0%, #8e1b10 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: color 0.18s ease;
}

.sub-brand {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sub-brand em {
  font-style: normal;
  color: var(--accent-gold);
}

/* Header DVD Cover Button */
.btn-cover-modal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cover-modal:hover {
  background: var(--accent-gold);
  color: #0a0e17;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
  transform: translateY(-1px);
}

/* Layout Grid */
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.75rem;
  flex: 1;
}

@media (max-width: 1100px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* Player Container */
.player-container {
  display: flex;
  flex-direction: column;
}

.video-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.video-viewport {
  position: relative;
  background: #000;
  width: 100%;
  max-width: calc(72vh * 4 / 3);
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.video-viewport video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Custom Controls Deck (Docked under 4:3 video, 0% overlap with subtitles) */
.controls-deck {
  width: 100%;
  max-width: calc(72vh * 4 / 3);
  margin: 0 auto;
  background: rgba(12, 17, 28, 0.95);
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

/* Subtitle Styling: crystal clear, readable, placed completely above controls */
video::cue {
  background-color: rgba(10, 14, 23, 0.85);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Progress Bar & Scrubbing */
.progress-bar-container {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 0.85rem;
  transition: height 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Invisible hit area expansion: 10px above & below for effortless clicking and dragging */
.progress-bar-container::before {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 0;
  right: 0;
  cursor: pointer;
}

.progress-bar-container:hover,
.progress-bar-container.is-dragging {
  height: 10px;
}

.progress-bar-container.is-dragging,
.progress-bar-container.is-dragging::before {
  cursor: grabbing !important;
}

.progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  width: 0%;
  pointer-events: none;
}

.progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #c0392b, var(--accent-gold));
  border-radius: 4px;
  width: 0%;
  pointer-events: none;
}

/* Scrub Handle / Thumb */
.progress-filled::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 2.5px solid var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6), 0 0 12px var(--accent-gold-glow);
  transition: transform 0.12s ease, background 0.12s ease;
  pointer-events: none;
}

.progress-bar-container:hover .progress-filled::after,
.progress-bar-container.is-dragging .progress-filled::after {
  transform: translateY(-50%) scale(1.35);
  background: #fffbe6;
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.8);
}

.progress-hover-marker {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  display: none;
  background: rgba(10, 14, 23, 0.9);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
  white-space: nowrap;
}

/* Controls Toolbar */
.controls-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-controls, .right-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.ctrl-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ctrl-label {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.volume-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.time-display {
  font-size: 0.85rem;
  font-family: var(--font-heading);
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.time-separator {
  margin: 0 0.25rem;
  color: var(--text-muted);
}

/* Dropdown Menus (Subtitles & Speed) */
.dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  bottom: 120%;
  right: 0;
  background: #111827;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  padding: 0.4rem 0;
  z-index: 20;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-header {
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

.dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: left;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item.active {
  color: var(--accent-gold);
  font-weight: 600;
  background: rgba(212, 175, 55, 0.08);
}

/* Video Info Bar */
.video-info-bar {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
}

.active-video-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.active-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-gold);
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.active-video-meta h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.active-video-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Sidebar */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.chapters-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Video Switcher List */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.video-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.video-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.video-item.active {
  background: rgba(212, 175, 55, 0.09);
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.video-item.active .item-badge {
  background: var(--accent-gold);
  color: #000;
}

.item-badge.badge-encoding {
  background: rgba(217, 119, 6, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulseEncoding 2s infinite ease-in-out;
}

@keyframes pulseEncoding {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Encoding Alert Banner */
.encoding-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fef3c7;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 0.85rem;
  line-height: 1.4;
}

.encoding-banner svg {
  flex-shrink: 0;
  color: #fbbf24;
}

.encoding-banner.hidden {
  display: none;
}

.item-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.item-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
}

.item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dynamic Chapters List */
.chapters-card {
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.chapters-list::-webkit-scrollbar {
  width: 5px;
}

.chapters-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.chapters-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.chapter-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.chapter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--border-subtle);
}

.chapter-btn.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold);
  font-weight: 600;
  border-color: rgba(212, 175, 55, 0.3);
}

.chapter-time {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chapter-btn.active .chapter-time {
  color: var(--accent-gold);
}

/* Modal Lightbox for DVD Cover */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  background: #0f1523;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  max-width: 1100px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(212, 175, 55, 0.15);
  overflow: hidden;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 24, 38, 0.95);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--transition);
}

.modal-btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-btn-close:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.2);
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #090d15;
}

.modal-cover-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Fullscreen Mode */
.video-card:fullscreen {
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  padding: 0;
  border-radius: 0;
}

.video-card:fullscreen .video-viewport {
  width: 100%;
  height: calc(100vh - 75px);
  max-width: calc((100vh - 75px) * 4 / 3);
}

.video-card:fullscreen .controls-deck {
  width: 100%;
  max-width: calc((100vh - 75px) * 4 / 3);
  background: rgba(12, 17, 28, 0.95);
}

.video-card:fullscreen .video-info-bar {
  display: none;
}
