:root {
  --primary-color: #667eea;
  --primary-dark: #764ba2;
  --text-color: #333;
  --text-light: #666;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

body.ui-style-3 {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
}

.container {
  animation: fadeIn 0.5s ease-in;
}

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

.home-page, .list-page, .detail-page {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.home-hero h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.home-intro {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.home-intro p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
}

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

.home-section h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

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

.grid-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  overflow: hidden;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  border-color: var(--primary-color);
}

.grid-item a {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
}

.grid-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

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

.grid-item .desc {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.link-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.link-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.link-card p {
  font-size: 0.95rem;
  opacity: 0.9;
}

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

.list-intro {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  line-height: 1.6;
}

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

.list-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.list-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.list-item .item-rank {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  opacity: 0.3;
}

.list-item .item-group {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.list-item .item-date {
  display: inline-block;
  background: var(--text-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.list-item a {
  text-decoration: none;
  color: var(--text-color);
  display: block;
  margin-left: 0;
}

.list-item.has-rank a {
  margin-left: 3rem;
}

.list-item h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.list-item .item-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.list-item .item-desc {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.5;
}

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

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

.detail-page section {
  margin-bottom: 2.5rem;
}

.detail-page h2 {
  font-size: 1.4rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  padding-left: 1rem;
}

.detail-page h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.2rem;
  background: var(--primary-color);
  border-radius: 2px;
}

.info-list {
  list-style: none;
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

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

.info-list strong {
  color: var(--text-color);
  min-width: 80px;
  display: inline-block;
}

.highlight-text {
  font-size: 1.15rem;
  color: var(--primary-dark);
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius);
  line-height: 1.8;
  font-weight: 500;
}

.summary-text, .review-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-color);
  text-align: justify;
}

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

.related-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.related-item a {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text-color);
}

.related-item h3 {
  font-size: 1.05rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.related-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .home-page, .list-page, .detail-page {
    padding: 1.5rem 1rem;
  }

  .home-hero h1 {
    font-size: 1.5rem;
  }

  .home-intro {
    padding: 1rem;
  }

  .home-section h2 {
    font-size: 1.3rem;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .detail-page h2 {
    font-size: 1.2rem;
  }

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

  .list-item {
    padding: 1rem;
  }

  .list-item .item-rank {
    font-size: 1.5rem;
    left: 1rem;
  }

  .list-item.has-rank a {
    margin-left: 2.5rem;
  }
}
