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

:root {
  --primary-color: #ff6b9d;
  --primary-hover: #ff4d88;
  --secondary-color: #6a11cb;
  --accent-color: #2575fc;
  --success-color: #00d4aa;
  --bg-dark: #0f0f23;
  --bg-darker: #0a0a16;
  --bg-card: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #c5c6d0;
  --text-muted: #7a7b8f;
  --border-color: #2a2a44;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.navbar {
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.brand:hover {
  transform: scale(1.05);
}

.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary-color);
}

.brand-name {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 107, 157, 0.1);
}

.nav-link.active {
  color: var(--primary-color);
  background: rgba(255, 107, 157, 0.15);
}

.nav-search {
  flex: 1;
  max-width: 24rem;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search svg {
  position: absolute;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
}

.nav-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s;
}

.nav-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.hero {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(106, 17, 203, 0.15), rgba(37, 117, 252, 0.1));
  padding: 4rem 0;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-search {
  display: flex;
  gap: 1rem;
  max-width: 36rem;
  margin: 0 auto;
}

.hero-search input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-text:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.main-content {
  padding: 2rem 0 4rem;
  min-height: calc(100vh - 25rem);
}

.video-section {
  margin-bottom: 3rem;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-filters {
  display: flex;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-darker);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

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

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--border-color);
  position: relative;
}

.video-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.08) 0%, rgba(106, 17, 203, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.video-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 48px rgba(255, 107, 157, 0.25), 0 0 0 1px var(--primary-color);
  border-color: var(--primary-color);
}

.video-card:hover::before {
  opacity: 1;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  z-index: 1;
  padding-bottom: 133%;
  overflow: hidden;
  background: var(--bg-darker);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

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

.video-card:hover .video-thumbnail img {
  transform: scale(1.1);
}

.video-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 212, 170, 0.95);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-badge.completed {
  background: rgba(255, 107, 157, 0.95);
}

.video-rating {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 117, 252, 0.9);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.video-play {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1.5rem;
  background: rgba(255, 107, 157, 0.95);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.video-card:hover .video-play {
  opacity: 1;
  transform: translateX(-50%) translateY(-0.25rem);
}

.video-play svg {
  width: 1rem;
  height: 1rem;
  color: white;
}

.video-info {
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  min-height: 2.8rem;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.video-chapter {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 500;
}

.video-year {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.video-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.page-info {
  color: var(--text-secondary);
  font-size: 1rem;
}

.page-info span {
  color: var(--primary-color);
  font-weight: 600;
}

.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-domain {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 0.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-seo {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 107, 157, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 157, 0.1);
}

.seo-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: justify;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0.5rem 0;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--primary-color);
}

.footer-notice {
  font-size: 0.85rem;
  opacity: 0.8;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid var(--border-color);
}

.modal-large {
  max-width: 64rem;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-2rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: var(--bg-darker);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg);
}

.video-detail-header {
  margin-bottom: 2rem;
}

.video-detail-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.video-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.video-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.video-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.375rem 1rem;
  background: rgba(255, 107, 157, 0.15);
  color: var(--primary-color);
  font-size: 0.9rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 157, 0.3);
}

.video-detail-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

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

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .navbar-content {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-search {
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-search {
    flex-direction: column;
  }

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .modal-content {
    padding: 1.5rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
