:root {
  --bg-dark: #090b10;
  --bg-card: #141824;
  --bg-panel: #1a2030;
  --bg-nav: #0e1218;
  
  --accent-orange: #ff6b00;
  --accent-orange-glow: rgba(255, 107, 0, 0.45);
  --accent-orange-soft: rgba(255, 107, 0, 0.15);

  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.45);
  --accent-cyan-soft: rgba(0, 240, 255, 0.15);

  --accent-green: #00ff87;
  --accent-green-glow: rgba(0, 255, 135, 0.45);

  --accent-red: #ff3366;
  --accent-red-glow: rgba(255, 51, 102, 0.45);

  --text-primary: #f3f6fc;
  --text-secondary: #8e9bae;
  --border-glass: rgba(255, 255, 255, 0.12);

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: #050608;
  color: var(--text-primary);
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mobile-frame {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 920px;
  background: linear-gradient(180deg, #0d1017 0%, #090b10 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

@media (max-width: 500px) {
  .mobile-frame {
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Header Bar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px 20px;
  background: rgba(14, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 10;
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex: 1;
}

.header-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 10px var(--accent-orange-glow);
  border: 1px solid var(--accent-orange);
}

.header-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, #ff9d00 0%, #ff5500 50%, #ff7700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
  text-align: center;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-orange);
}

/* Scroll Content Area */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 80px 20px;
  display: flex;
  flex-direction: column;
}

.tab-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--accent-cyan-soft);
  padding: 2px 8px;
  border-radius: 12px;
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-clear:hover {
  color: var(--accent-orange);
}

/* Large Intense Neon Glowing Input Box */
.glowing-input-box {
  display: flex;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-card);
  position: relative;

  border: 1.5px solid var(--accent-orange);
  box-shadow: 
    0 0 12px var(--accent-orange-glow),
    0 0 24px rgba(255, 107, 0, 0.25),
    inset 0 0 8px rgba(255, 107, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.glowing-input-box:focus-within {
  box-shadow: 
    0 0 16px var(--accent-orange),
    0 0 32px rgba(255, 107, 0, 0.4),
    inset 0 0 12px rgba(255, 107, 0, 0.25);
}

/* Download Android APK Banner */
.apk-download-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 240, 255, 0.08);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  margin-top: 10px;
}

.apk-download-banner:hover {
  background: rgba(0, 240, 255, 0.18);
  transform: translateY(-2px);
}

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

.apk-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.apk-text strong {
  font-size: 13px;
  color: var(--accent-cyan);
}

.apk-text small {
  font-size: 10px;
  color: var(--text-secondary);
}

.apk-arrow {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.input-inner {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.input-inner input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
}

.input-inner input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-start-download {
  width: 128px;
  height: 100%;
  background: linear-gradient(135deg, #ff7700 0%, #ff4500 100%);
  border: none;
  color: white;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
}

.btn-start-download:hover {
  background: linear-gradient(135deg, #ff8800 0%, #ff5500 100%);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Active Downloads List */
.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(20, 24, 36, 0.4);
  border-radius: 12px;
  border: 1px dashed var(--border-glass);
}

.empty-icon {
  font-size: 40px;
  opacity: 0.4;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Download Cards */
.dl-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.25s;
}

.dl-thumb-box {
  width: 82px;
  height: 50px;
  border-radius: 8px;
  background: #10131d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;

  border: 1.5px solid var(--accent-cyan);
  box-shadow: 
    0 0 10px var(--accent-cyan-glow),
    0 0 20px rgba(0, 240, 255, 0.2);
}

.dl-card.completed .dl-thumb-box {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green-glow);
}

.dl-card.failed .dl-thumb-box {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red-glow);
}

.dl-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dl-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dl-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-percent {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.dl-progress-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.dl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6b00 0%, #00f0ff 100%);
  border-radius: 3px;
  transition: width 0.2s linear;
}

.dl-card.completed .dl-progress-bar {
  background: var(--accent-green);
}

.dl-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.dl-actions {
  display: flex;
  gap: 6px;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-card-action:hover {
  background: rgba(255, 107, 0, 0.2);
  color: var(--accent-orange);
}

.btn-card-action.btn-del:hover {
  background: rgba(255, 51, 102, 0.2);
  color: var(--accent-red);
}

/* 2-Column Library Grid View */
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.library-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.library-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.lib-thumb {
  width: 100%;
  height: 110px;
  background: #10131d;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
  cursor: pointer;
}

.lib-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-play-overlay {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  backdrop-filter: blur(4px);
  transition: transform 0.2s;
}

.lib-thumb:hover .lib-play-overlay {
  transform: scale(1.15);
  background: var(--accent-orange);
}

.lib-details {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lib-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lib-size {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.lib-actions {
  display: flex;
  gap: 4px;
}

/* Bottom Nav */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 18, 24, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 40px env(safe-area-inset-bottom, 0px) 40px;
  z-index: 20;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px 20px;
  border-radius: 12px;
}

.nav-item.active {
  color: var(--accent-orange);
  background: var(--accent-orange-soft);
}

.nav-item.cyan-tab.active {
  color: var(--accent-cyan);
  background: var(--accent-cyan-soft);
}

/* Modal Popup Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-glass);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
}

/* Custom Branded HK Media Player Modal Card */
.player-modal-card {
  max-width: 480px;
  border-color: var(--accent-orange);
  box-shadow: 0 0 35px var(--accent-orange-glow);
  padding: 14px;
  gap: 10px;
}

.player-branding {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-badge {
  font-size: 9px;
  font-weight: 900;
  color: var(--accent-orange);
  background: var(--accent-orange-soft);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-orange);
  letter-spacing: 0.5px;
}

/* Aspect-Ratio Adaptive Video Container */
.video-container {
  width: 100%;
  height: 320px;
  max-height: 55vh;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container.fit-contain .video-element {
  object-fit: contain;
}

.video-container.fit-cover .video-element {
  object-fit: cover;
}

.video-element {
  width: 100%;
  height: 100%;
  background: #000;
}

/* Custom Glowing Video Player Controls Bar Overlay */
.custom-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 12, 0.92) 100%);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.seekbar-container {
  position: relative;
  width: 100%;
  height: 6px;
  display: flex;
  align-items: center;
}

.seekbar-input {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  z-index: 2;
}

.seekbar-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 10px var(--accent-orange);
  cursor: pointer;
}

.seekbar-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff7700, #ff4500);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.ctrl-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
}

.ctrl-btn.text-btn {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.time-display {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Delete Confirmation Modal */
.delete-card {
  max-width: 360px;
  border-color: var(--accent-red);
  box-shadow: 0 0 25px var(--accent-red-glow);
}

.delete-msg {
  font-size: 13px;
  color: var(--text-secondary);
}

.delete-options-col {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-top: 6px;
}

.btn-del-opt {
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.btn-del-opt:hover {
  border-color: var(--accent-orange);
  background: var(--accent-orange-soft);
}

.btn-del-opt.danger {
  color: var(--accent-red);
}

.btn-del-opt.danger:hover {
  border-color: var(--accent-red);
  background: rgba(255, 51, 102, 0.15);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-top h3 {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(90deg, #ff9d00 0%, #ff5500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.media-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-panel);
  padding: 10px;
  border-radius: 10px;
}

.thumb-box {
  width: 72px;
  height: 44px;
  border-radius: 6px;
  background: #10131d;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.media-details h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-orange);
  background: var(--accent-orange-soft);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.modal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.format-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

/* Hero Format Modal Styling */
.format-modal-card {
  width: 90vw;
  max-width: 440px;
  background: var(--bg-panel);
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-hero-banner {
  position: relative;
  width: 100%;
  height: 180px;
  background: #090c14;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}

.hero-cover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cover-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #182030, #090c14);
}

.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(13, 16, 23, 0.95) 100%);
}

.hero-type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 107, 0, 0.85);
  color: white;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.hero-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}

.hero-video-title {
  position: relative;
  z-index: 2;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-body-container {
  padding: 16px 20px 24px 20px;
}

.format-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  transition: all 0.25s;
}

.format-item-card:hover {
  background: rgba(255, 107, 0, 0.1);
  border-color: var(--accent-orange);
}

.option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.option-thumb-fallback {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.option-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.option-size {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.btn-dl-item {
  background: var(--accent-orange);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
}

.hidden {
  display: none !important;
}

/* MX Player Pro Custom Styles */
.player-modal-card {
  width: 95vw;
  max-width: 900px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 107, 0, 0.4);
  box-shadow: 0 0 40px rgba(255, 107, 0, 0.3);
}

.mx-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.mx-video-wrapper.fit-contain .mx-video-element { object-fit: contain; }
.mx-video-wrapper.fit-cover .mx-video-element { object-fit: cover; }
.mx-video-wrapper.fit-stretch .mx-video-element { object-fit: fill; }

.mx-video-element {
  width: 100%;
  height: 100%;
  display: block;
}

/* Touch Layer for Double-Tap Rewind/Forward */
.mx-touch-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 2;
}

.touch-zone {
  flex: 1;
  height: 100%;
}

/* Controls Overlay */
.mx-controls-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.mx-controls-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Top Bar */
.mx-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mx-brand-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mx-badge {
  background: linear-gradient(90deg, #ff6b00, #ff9d00);
  color: white;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.mx-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.mx-top-actions {
  display: flex;
  gap: 8px;
}

/* Center Action Hub */
.mx-center-hub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mx-hub-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b00, #ff9d00);
  border: none;
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.6);
  transition: transform 0.2s;
}

.mx-hub-play:hover {
  transform: scale(1.1);
}

.mx-hub-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}

.mx-hub-btn:hover {
  background: rgba(255, 107, 0, 0.3);
  border-color: var(--accent-orange);
}

/* Bottom Dock */
.mx-bottom-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mx-seekbar-wrap {
  position: relative;
  width: 100%;
  height: 8px;
  display: flex;
  align-items: center;
}

.mx-seekbar {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.mx-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6b00;
  box-shadow: 0 0 8px #ff6b00;
}

.mx-progress-fill {
  position: absolute;
  top: 1px;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff6b00, #ff9d00);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.mx-dock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mx-left-dock, .mx-right-dock {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mx-time {
  font-size: 12px;
  font-family: var(--font-mono);
  color: #ddd;
}

.mx-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mx-btn:hover {
  background: rgba(255, 107, 0, 0.4);
  border-color: var(--accent-orange);
}

.mx-text-btn {
  font-size: 11px;
  font-family: var(--font-mono);
}

.mx-close {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.5);
  font-size: 18px;
}
