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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

body.ui-style-1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #000;
  color: #fff;
}

body.ui-style-1 a {
  color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #000;
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.ui-style-1 header {
  background: #111;
  border-bottom: 1px solid #333;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.ui-style-1 .logo {
  color: #ff6700;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.ui-style-1 nav a:hover {
  background: rgba(255, 103, 0, 0.2);
  color: #ff6700;
}

main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

body.ui-style-1 .page-header h1 {
  color: #fff;
}

.page-header p {
  color: #666;
  font-size: 1rem;
}

body.ui-style-1 .page-header p {
  color: #aaa;
}

.intro-section {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.ui-style-1 .intro-section {
  background: #1a1a1a;
  border: 1px solid #333;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

body.ui-style-1 .video-card {
  background: #1a1a1a;
  border: 1px solid #333;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-cover {
  position: relative;
  padding-top: 140%;
  background: #e0e0e0;
  overflow: hidden;
}

body.ui-style-1 .video-cover {
  background: #2a2a2a;
}

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

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}

body.ui-style-1 .video-title {
  color: #fff;
}

.video-one-line {
  font-size: 0.875rem;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.ui-style-1 .video-one-line {
  color: #999;
}

.video-player-section {
  margin-bottom: 2rem;
}

.video-player {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.ui-style-1 .player-play-btn {
  background: rgba(255, 103, 0, 0.9);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, 1);
}

body.ui-style-1 .player-play-btn:hover {
  background: rgba(255, 103, 0, 1);
}

.player-play-icon {
  font-size: 2rem;
  color: #000;
}

body.ui-style-1 .player-play-icon {
  color: #fff;
}

.video-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.video-detail h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #333;
}

body.ui-style-1 .video-detail h1 {
  color: #fff;
}

.video-detail section {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.ui-style-1 .video-detail section {
  background: #1a1a1a;
  border: 1px solid #333;
}

.video-detail h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 2px solid #ff6700;
  padding-bottom: 0.5rem;
}

body.ui-style-1 .video-detail h2 {
  color: #ff6700;
}

.info-list {
  list-style: none;
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: flex-start;
}

body.ui-style-1 .info-list li {
  border-bottom: 1px solid #333;
}

.info-list strong {
  min-width: 80px;
  color: #666;
}

body.ui-style-1 .info-list strong {
  color: #999;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.video-card--related {
  font-size: 0.9rem;
}

.page--with-sidebar {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.layout__side--filters {
  width: 250px;
  flex-shrink: 0;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

body.ui-style-1 .layout__side--filters {
  background: #1a1a1a;
  border: 1px solid #333;
}

.layout__main {
  flex: 1;
  min-width: 0;
}

.top-list__items {
  list-style: none;
  counter-reset: ranking;
}

.top-list__items li {
  counter-increment: ranking;
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}

body.ui-style-1 .top-list__items li {
  background: #1a1a1a;
  border: 1px solid #333;
}

.top-list__items li::before {
  content: counter(ranking);
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: #ff6700;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
}

.top-list__items li:nth-child(1)::before { background: #ffd700; color: #000; }
.top-list__items li:nth-child(2)::before { background: #c0c0c0; color: #000; }
.top-list__items li:nth-child(3)::before { background: #cd7f32; color: #fff; }

.top-list__cover {
  width: 100px;
  height: 140px;
  flex-shrink: 0;
  margin-left: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: #e0e0e0;
}

body.ui-style-1 .top-list__cover {
  background: #2a2a2a;
}

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

.top-list__info {
  flex: 1;
}

.top-list__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

body.ui-style-1 .top-list__title {
  color: #fff;
}

.page--grouped .group {
  margin-bottom: 3rem;
}

.group h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
  border-bottom: 2px solid #ff6700;
  padding-bottom: 0.5rem;
}

body.ui-style-1 .group h2 {
  color: #ff6700;
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #ff6700;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

footer {
  background: #000;
  color: #fff;
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

body.ui-style-1 footer {
  background: #111;
  border-top: 1px solid #333;
}

footer p {
  color: #999;
}

@media (max-width: 768px) {
  nav ul {
    gap: 0.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .video-cover {
    padding-top: 140%;
  }

  .video-info {
    padding: 0.75rem;
  }

  .video-title {
    font-size: 0.875rem;
  }

  .video-one-line {
    font-size: 0.75rem;
  }

  .page--with-sidebar {
    flex-direction: column;
    padding: 1rem;
  }

  .layout__side--filters {
    width: 100%;
    position: static;
  }

  .video-detail section {
    padding: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .top-list__items li {
    flex-direction: column;
    padding: 1rem 1rem 1rem 3rem;
  }

  .top-list__cover {
    width: 100%;
    height: 200px;
    margin-left: 0;
  }
}
