:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #7f8c8d;
  --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);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB";
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--secondary-color);
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

nav {
  background: var(--secondary-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  color: #ecf0f1;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover {
  background: #34495e;
  text-decoration: none;
  transform: translateY(-1px);
}

.video-card {
  background: var(--card-bg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.video-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.8rem;
}

.video-card h3 a {
  color: inherit;
  text-decoration: none;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #34495e;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-hover);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top:hover {
  background: #2980b9;
  transform: scale(1.1);
}

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

footer {
  background: #34495e;
  color: #ecf0f1;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer p {
  margin-bottom: 0.5rem;
}

.ui-style-0 { --primary-color: #3498db; }
.ui-style-1 { --primary-color: #e74c3c; }
.ui-style-2 { --primary-color: #27ae60; }
.ui-style-3 { --primary-color: #9b59b6; }
.ui-style-4 { --primary-color: #f39c12; }
.ui-style-5 { --primary-color: #1abc9c; }
.ui-style-6 { --primary-color: #34495e; }
.ui-style-7 { --primary-color: #e67e22; }
.ui-style-8 { --primary-color: #16a085; }
.ui-style-9 { --primary-color: #2980b9; }
.ui-style-10 { --primary-color: #8e44ad; }
.ui-style-11 { --primary-color: #c0392b; }
.ui-style-12 { --primary-color: #d35400; }
.ui-style-13 { --primary-color: #2c3e50; }
.ui-style-14 { --primary-color: #7f8c8d; }
.ui-style-15 { --primary-color: #27ae60; }

@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }

  nav {
    padding: 0.7rem 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  nav {
    padding: 0.6rem 0.5rem;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .video-card {
    padding: 1.2rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  nav {
    padding: 0.5rem 0.3rem;
  }

  nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.1rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .video-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  footer {
    padding: 1.5rem 0.5rem;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-auto {
    grid-template-columns: 1fr;
  }
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-3 {
  margin-top: 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

.card-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 12px;
  background: var(--primary-color);
  color: white;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-secondary {
  background: var(--text-muted);
}

.badge-success {
  background: var(--success-color);
}

.badge-warning {
  background: var(--warning-color);
}

.badge-danger {
  background: var(--accent-color);
}

.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
}

.highlight h1,
.highlight h2,
.highlight h3 {
  color: white;
}

.divider {
  border: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 2rem 0;
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

::selection {
  background: var(--primary-color);
  color: white;
}
