/* Global Styles */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

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

/* Navigation */
nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  color: #fff;
  text-decoration: none;
  padding: 16px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.1);
}

nav a:last-child {
  border-right: none;
}

nav a:hover {
  background: rgba(52, 152, 219, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  nav a {
    padding: 12px 6px;
    font-size: 13px;
  }
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
}

.site-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5em;
  font-weight: 700;
}

.site-subtitle {
  font-size: 1.1em;
  opacity: 0.95;
  margin: 0;
}

.page-header {
  background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
  color: white;
  text-align: center;
  padding: 50px 20px;
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.2em;
}

.page-header p {
  margin: 0;
  font-size: 1em;
  opacity: 0.9;
}

/* Sections */
section {
  background: white;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

section h2 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
  font-size: 1.8em;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.video-card {
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #3498db;
}

.video-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.2em;
}

.video-card .meta {
  color: #7f8c8d;
  font-size: 0.9em;
  margin: 5px 0;
}

.video-card .one-line {
  color: #555;
  font-size: 0.95em;
  line-height: 1.5;
}

/* Video List */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.video-item {
  display: flex;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.video-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #3498db;
}

.item-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  margin-right: 20px;
}

.item-content h3 {
  margin: 0 0 8px 0;
}

.item-content .summary {
  color: #555;
  margin: 8px 0 0 0;
}

/* Rank List */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rank-item {
  display: flex;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.rank-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.rank-badge {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5em;
  margin-right: 20px;
}

.rank-badge:nth-child(1) {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.rank-content h3 {
  margin: 0 0 8px 0;
}

.rank-content .review {
  color: #16a085;
  font-style: italic;
  margin: 8px 0 0 0;
  padding: 10px;
  background: #ecf0f1;
  border-radius: 4px;
}

/* Topic Container */
.topic-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.topic-group {
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
}

.topic-group h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.topic-list li {
  padding: 8px 0;
  border-bottom: 1px solid #ecf0f1;
}

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

.topic-list .year {
  color: #95a5a6;
  font-size: 0.9em;
}

/* Latest Container */
.latest-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.latest-item {
  display: flex;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.latest-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-date {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #1abc9c, #16a085);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.3em;
  margin-right: 20px;
}

.item-body h3 {
  margin: 0 0 8px 0;
}

.item-body .tags {
  color: #7f8c8d;
  font-size: 0.85em;
  margin: 8px 0 0 0;
}

/* Detail Page */
.detail-page {
  max-width: 900px;
}

.video-detail {
  background: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-detail h1 {
  color: #2c3e50;
  border-bottom: 3px solid #3498db;
  padding-bottom: 15px;
  margin-bottom: 30px;
}

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

.info-list li {
  padding: 10px 0;
  border-bottom: 1px solid #ecf0f1;
}

.info-list strong {
  color: #2c3e50;
  min-width: 80px;
  display: inline-block;
}

.highlight {
  background: linear-gradient(135deg, #3498db15, #2980b915);
  padding: 20px;
  border-left: 4px solid #3498db;
  font-size: 1.1em;
  font-style: italic;
  color: #2c3e50;
  border-radius: 4px;
}

.summary-section p {
  font-size: 1.05em;
  line-height: 1.8;
  color: #34495e;
}

.review {
  background: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
  font-style: italic;
  color: #16a085;
  font-size: 1.05em;
  line-height: 1.7;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.related-card {
  background: #f8f9fa;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: white;
}

.related-card h4 {
  margin: 0 0 8px 0;
  font-size: 1.1em;
}

.related-card p {
  margin: 5px 0;
  font-size: 0.9em;
}

/* Links Section */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
}

.link-list li {
  background: linear-gradient(135deg, #f8f9fa, #ecf0f1);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.link-list li:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.link-list a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.link-list a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

.site-footer p {
  margin: 0;
}

/* Links */
a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .site-header h1 {
    font-size: 1.8em;
  }

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

  .video-detail {
    padding: 20px;
  }

  section {
    padding: 20px;
  }
}
