/* Global Styles */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 1.8; color: #2c3e50; background: #f8f9fa; margin: 0; padding: 0; }

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

.page-header { background: #fff; padding: 2rem; margin-bottom: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.page-header h1 { font-size: 2rem; color: #1a1a1a; margin-bottom: 0.5rem; }
.page-header .intro { color: #666; font-size: 1rem; line-height: 1.6; }

/* Sections */
section { background: #fff; padding: 2rem; margin-bottom: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
section h2 { font-size: 1.5rem; color: #2c3e50; margin-bottom: 1rem; border-left: 4px solid #1a73e8; padding-left: 1rem; }
section p { margin-bottom: 1rem; }

.intro { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.intro h2 { color: #fff; border-left-color: #fff; }
.intro p { color: rgba(255,255,255,0.95); }
.intro a { color: #fff; font-weight: bold; text-decoration: underline; }

/* Card Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: #f8f9fa; padding: 1.5rem; border-radius: 8px; border: 1px solid #e9ecef; transition: all 0.3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card h3 a { color: #1a73e8; }
.card .meta { color: #666; font-size: 0.9rem; margin-bottom: 0.5rem; }
.card .one-line { color: #555; font-size: 0.95rem; }

/* List Cards */
.list-content { display: flex; flex-direction: column; gap: 1rem; }
.list-card { background: #f8f9fa; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #1a73e8; transition: all 0.3s; }
.list-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.list-card h3, .list-card h4 { margin-bottom: 0.5rem; }
.list-card h3 a, .list-card h4 a { color: #1a73e8; }
.list-card .meta { color: #666; font-size: 0.9rem; margin-bottom: 0.5rem; }
.list-card .tags { color: #888; font-size: 0.85rem; }

.list-card.ranked { position: relative; padding-left: 4rem; }
.list-card.ranked .rank { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem; font-weight: bold; color: #1a73e8; }

.topic-group { margin-bottom: 2rem; }
.topic-group .group-title { font-size: 1.3rem; color: #2c3e50; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e9ecef; }

/* Detail Page */
.detail { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.detail header h1 { font-size: 2.2rem; color: #1a1a1a; margin-bottom: 1rem; }
.detail section { background: transparent; box-shadow: none; padding: 1.5rem 0; border-bottom: 1px solid #e9ecef; }
.detail section:last-of-type { border-bottom: none; }
.basic-info ul { list-style: none; padding: 0; }
.basic-info li { padding: 0.5rem 0; font-size: 1rem; }
.highlight { background: #f0f7ff; padding: 1.5rem !important; border-radius: 8px; border: 1px solid #d0e7ff; }
.highlight p { font-size: 1.1rem; color: #1a73e8; font-weight: 500; margin: 0; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.related-card { background: #f8f9fa; padding: 1rem; border-radius: 6px; border: 1px solid #e9ecef; }
.related-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.related-card h4 a { color: #1a73e8; }
.related-card p { font-size: 0.9rem; color: #666; margin: 0; }

/* Footer */
footer { text-align: center; padding: 2rem 1rem; color: #666; background: #fff; margin-top: 2rem; box-shadow: 0 -2px 8px rgba(0,0,0,0.05); }
footer a { color: #1a73e8; margin: 0 0.5rem; }

/* Links Section */
.links-section p { font-size: 1.1rem; }
.links-section a { margin: 0 1rem; font-weight: 500; }

/* Responsive */
@media (max-width: 768px) {
  main { padding: 0 0.5rem; margin: 1rem auto; }
  .page-header { padding: 1.5rem 1rem; }
  .page-header h1 { font-size: 1.5rem; }
  section { padding: 1.5rem 1rem; }
  .card-grid { grid-template-columns: 1fr; gap: 1rem; }
  .detail header h1 { font-size: 1.6rem; }
  .list-card.ranked { padding-left: 3rem; }
  .list-card.ranked .rank { font-size: 1.5rem; left: 0.5rem; }
}

/* UI Style Variations */
.ui-style-0 { --primary-color: #1a73e8; }
.ui-style-1 { --primary-color: #34a853; }
.ui-style-2 { --primary-color: #ea4335; }
.ui-style-3 { --primary-color: #fbbc04; }
.ui-style-4 { --primary-color: #9c27b0; }
.ui-style-5 { --primary-color: #00bcd4; }
.ui-style-6 { --primary-color: #ff5722; }
.ui-style-7 { --primary-color: #4caf50; }
.ui-style-8 { --primary-color: #2196f3; }
.ui-style-9 { --primary-color: #e91e63; }
.ui-style-10 { --primary-color: #009688; }
.ui-style-11 { --primary-color: #ff9800; }
.ui-style-12 { --primary-color: #673ab7; }
.ui-style-13 { --primary-color: #3f51b5; }
.ui-style-14 { --primary-color: #8bc34a; }
.ui-style-15 { --primary-color: #607d8b; }