*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #fff;
  color: #0f0f0f;
}

.app-body {
  min-height: 100vh;
  background-color: #fff;
  color: #0f0f0f;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 10;
}

.app-header--watch {
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff0000, #ff5252);
}

.logo-text {
  font-weight: 600;
  font-size: 18px;
}

.icon-button {
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.icon-button:active {
  background-color: rgba(0, 0, 0, 0.06);
}

.app-main {
  padding-top: 56px;
  padding-bottom: 56px;
}

.app-main--watch {
  padding-top: 56px;
  padding-bottom: 56px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background-color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 10;
}

.bottom-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #606060;
}

.bottom-nav-item--active {
  color: #111;
}

.bottom-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.bottom-nav-label {
  line-height: 1;
}

.genre-strip {
  position: sticky;
  top: 56px;
  z-index: 5;
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.genre-strip-inner {
  display: flex;
  overflow-x: auto;
  padding: 8px 12px;
  gap: 8px;
}

.genre-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  font-size: 13px;
  color: #111;
}

.genre-pill--active {
  background-color: #111;
  color: #fff;
  border-color: #111;
}

.video-list {
  padding: 8px 0 8px;
}

.video-list--secondary {
  padding-top: 4px;
}

.video-card {
  padding: 8px 12px 16px;
}

.video-thumb-shell {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #e3e3e3;
}

.video-thumb {
  display: block;
  width: 100%;
  height: auto;
}

.video-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 4px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
}

.video-info-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.video-meta {
  flex: 1;
}

.video-title {
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 4px;
}

.video-genre,
.video-date {
  font-size: 12px;
  color: #606060;
  margin: 0;
}

.skeleton-card {
  height: 260px;
  margin: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.list-loader {
  padding-bottom: 64px;
}

.player-shell {
  background-color: #000;
}

.player-aspect {
  position: relative;
  padding-top: 56.25%;
}

.player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.watch-meta {
  padding: 12px 12px 4px;
}

.watch-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.watch-genre,
.watch-date {
  margin: 0;
  font-size: 13px;
  color: #606060;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.98);
  display: none;
  flex-direction: column;
  padding-top: 56px;
  z-index: 20;
}

.search-overlay--visible {
  display: flex;
}

.search-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
}

.search-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  font-size: 14px;
}

.search-results-empty {
  padding: 16px 12px;
  font-size: 14px;
  color: #606060;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.upload-card {
  padding: 16px 12px 80px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 13px;
  color: #606060;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="file"],
.field select {
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 14px;
}

.primary-button {
  border-radius: 999px;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background-color: #111;
}

.primary-button:active {
  background-color: #222;
}

.upload-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background-color: #eee;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  background-color: #ff0000;
  transition: width 0.2s linear;
}

.upload-status {
  min-height: 18px;
  font-size: 13px;
  color: #606060;
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: 20px 16px 24px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-error {
  min-height: 18px;
  font-size: 13px;
  color: #c62828;
}

@media (min-width: 768px) {
  .app-main,
  .app-main--watch {
    max-width: 900px;
    margin: 0 auto;
  }

  .bottom-nav {
    max-width: 900px;
    margin: 0 auto;
    left: 0;
    right: 0;
  }
}
