:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem 1rem;
}

footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: auto;
}

footer p {
  font-size: 0.9rem;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
}

.site-intro {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.site-intro h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.site-intro p {
  line-height: 1.8;
  color: var(--text-color);
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
}

section > p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
  line-height: 1.6;
}

section > p a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s;
}

section > p a:hover {
  color: var(--secondary-color);
}

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

.video-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.video-card h3 a {
  color: var(--text-color);
  transition: color 0.3s;
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.video-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.video-intro {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rank-item {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.rank-item:hover {
  transform: translateX(8px);
}

.rank-num {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  width: 50px;
  text-align: center;
}

.rank-item:nth-child(1) .rank-num {
  color: #ffd700;
}

.rank-item:nth-child(2) .rank-num {
  color: #c0c0c0;
}

.rank-item:nth-child(3) .rank-num {
  color: #cd7f32;
}

.rank-info {
  flex: 1;
}

.rank-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.rank-info h3 a {
  color: var(--text-color);
  transition: color 0.3s;
}

.rank-info h3 a:hover {
  color: var(--primary-color);
}

.rank-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.video-list-compact {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.video-list-compact li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.video-list-compact li:last-child {
  border-bottom: none;
}

.video-list-compact a {
  color: var(--text-color);
  flex: 1;
  transition: color 0.3s;
}

.video-list-compact a:hover {
  color: var(--primary-color);
}

.video-list-compact .meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-left: 1rem;
}

.list-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.list-intro {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.list-intro p {
  line-height: 1.8;
  color: var(--text-color);
}

.video-list {
  display: grid;
  gap: 1.5rem;
}

.video-list.standard {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-list.detailed {
  grid-template-columns: 1fr;
}

.video-list.grouped {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.video-list .video-card {
  position: relative;
}

.rank-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--primary-color);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.video-list .video-card:nth-child(1) .rank-badge {
  background: #ffd700;
}

.video-list .video-card:nth-child(2) .rank-badge {
  background: #c0c0c0;
}

.video-list .video-card:nth-child(3) .rank-badge {
  background: #cd7f32;
}

.update-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.detail-page {
  max-width: 900px;
}

.detail-content {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
}

.detail-content section {
  margin-bottom: 2rem;
}

.detail-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.basic-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}

.basic-info dt {
  font-weight: 600;
  color: var(--text-color);
}

.basic-info dd {
  color: var(--text-light);
}

.one-line p,
.summary p,
.review p {
  line-height: 1.8;
  color: var(--text-color);
}

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

.related .video-card {
  background: var(--bg-color);
  padding: 1rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  section h2 {
    font-size: 1.4rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-list.standard,
  .video-list.grouped {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 1.5rem;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .basic-info dl {
    grid-template-columns: 1fr;
  }

  .basic-info dt {
    margin-top: 0.5rem;
  }

  .related .video-list {
    grid-template-columns: 1fr;
  }
}

body.ui-style-0 { --primary-color: #667eea; --secondary-color: #764ba2; }
body.ui-style-1 { --primary-color: #f093fb; --secondary-color: #f5576c; }
body.ui-style-2 { --primary-color: #4facfe; --secondary-color: #00f2fe; }
body.ui-style-3 { --primary-color: #43e97b; --secondary-color: #38f9d7; }
body.ui-style-4 { --primary-color: #fa709a; --secondary-color: #fee140; }
body.ui-style-5 { --primary-color: #30cfd0; --secondary-color: #330867; }
body.ui-style-6 { --primary-color: #a8edea; --secondary-color: #fed6e3; }
body.ui-style-7 { --primary-color: #ff9a56; --secondary-color: #ff6a88; }
body.ui-style-8 { --primary-color: #667eea; --secondary-color: #764ba2; }
body.ui-style-9 { --primary-color: #ffecd2; --secondary-color: #fcb69f; }
body.ui-style-10 { --primary-color: #ff6e7f; --secondary-color: #bfe9ff; }
body.ui-style-11 { --primary-color: #e0c3fc; --secondary-color: #8ec5fc; }
body.ui-style-12 { --primary-color: #f8b500; --secondary-color: #fceabb; }
body.ui-style-13 { --primary-color: #d299c2; --secondary-color: #fef9d7; }
body.ui-style-14 { --primary-color: #fdcbf1; --secondary-color: #e6dee9; }
body.ui-style-15 { --primary-color: #a1c4fd; --secondary-color: #c2e9fb; }
