:root {
    --cream: #FDFBF7;
    --wood-light: #D4A373;
    --wood-dark: #5C3A21;
    --wood-deep: #3E2723;
    --text-main: #332211;
    --text-muted: #7A6855;
    --accent-red: #C0392B;
    --shelf-shadow: inset 0 -8px 15px rgba(0,0,0,0.1);
    --radius: 8px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--cream);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
  }
  a { text-decoration: none; color: inherit; }
  ul { list-style: none; }
  
  /* Header */
  header {
    background: rgba(253, 251, 247, 0.95);
    border-bottom: 2px solid var(--wood-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
  }
  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo-box { display: flex; align-items: center; gap: 10px; }
  .logo-box img { height: 36px; border-radius: 4px; }
  .nav-links { display: flex; gap: 20px; font-weight: 500; }
  .nav-links a:hover { color: var(--accent-red); }
  .nav-right { display: flex; align-items: center; gap: 15px; }
  .search-box {
    padding: 8px 12px;
    border: 1px solid var(--wood-light);
    border-radius: 20px;
    background: #fff;
    outline: none;
  }
  .btn-nav-dl {
    background: var(--wood-dark);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Section Divider */
  .shelf-divider {
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="%23D4A373"/></svg>');
    box-shadow: var(--shelf-shadow);
    margin: 40px 0;
    border-top: 2px solid var(--wood-dark);
    border-bottom: 4px solid #8B5A2B;
  }

  /* Hero */
  .hero {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
  }
  .hero-text h1 { font-size: 2.5rem; margin-bottom: 20px; color: var(--wood-deep); }
  .hero-text p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; }
  .data-row { display: flex; gap: 20px; margin-bottom: 30px; }
  .data-tag {
    border: 2px dashed var(--accent-red);
    padding: 5px 15px;
    border-radius: 4px;
    color: var(--accent-red);
    font-weight: bold;
    position: relative;
  }
  .data-tag::after { content: '馆藏章'; position: absolute; top: -10px; right: 5px; font-size: 10px; background: var(--cream); padding: 0 4px; }
  .hero-btns { display: flex; gap: 15px; }
  .btn-dl-hero {
    flex: 1;
    text-align: center;
    background: var(--accent-red);
    color: #fff;
    padding: 15px 0;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 48px;
    box-shadow: 0 4px 6px rgba(192, 57, 43, 0.3);
  }
  .btn-dl-hero:last-child { background: var(--wood-dark); }

  /* Bookshelf Wall */
  .bookshelf-wall {
    background: var(--wood-dark);
    padding: 20px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    border: 8px solid var(--wood-light);
    height: 400px;
    overflow: hidden;
    position: relative;
  }
  .book-spine {
    background: #e0e0e0;
    border-radius: 2px;
    writing-mode: vertical-rl;
    text-align: center;
    padding: 10px 5px;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: inset -2px 0 5px rgba(0,0,0,0.2);
    overflow: hidden;
  }
  .book-spine img { width: 100%; height: 100%; object-fit: cover; }
  .book-spine:hover { transform: translateY(-20px); }
  .hero-feature {
    grid-column: span 2;
    grid-row: span 2;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
  }
  .hero-feature img { width: 100%; height: 80%; object-fit: contain; border-radius: 4px; }
  .hero-feature .tag { position: absolute; top: 10px; right: 10px; background: var(--accent-red); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
  .hero-feature h3 { margin-top: 8px; font-size: 1rem; text-align: center; }

  /* Common Section */
  .section { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
  .section-title { font-size: 2rem; text-align: center; margin-bottom: 40px; color: var(--wood-deep); }
  .section-title span { color: var(--accent-red); }
  
  /* Hot Grid */
  .hot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
  .book-card { background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; transition: all 0.3s; }
  .book-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
  .book-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
  .book-card h3 { font-size: 1rem; margin: 10px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .book-card .meta { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; }
  .book-card .corner-tag { position: absolute; top: 0; left: 0; background: var(--wood-light); color: #fff; padding: 2px 8px; font-size: 12px; border-radius: var(--radius) 0 var(--radius) 0; }
  
  /* Calendar */
  .calendar-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 30px; }
  .tab-btn { padding: 10px 20px; border: 1px solid var(--wood-light); background: #fff; border-radius: 20px; cursor: pointer; min-height: 44px; }
  .tab-btn.active { background: var(--wood-dark); color: #fff; }
  .calendar-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
  .calendar-card { text-align: center; position: relative; }
  .calendar-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
  .stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); border: 2px solid var(--accent-red); color: var(--accent-red); padding: 5px 10px; font-weight: bold; border-radius: 4px; opacity: 0.8; pointer-events: none; }

  /* Ranking */
  .ranking-list { display: flex; flex-direction: column; gap: 15px; }
  .rank-item { display: flex; align-items: center; background: #fff; padding: 15px; border-radius: var(--radius); box-shadow: 0 2px 5px rgba(0,0,0,0.05); gap: 15px; }
  .rank-num { font-size: 1.5rem; font-weight: bold; color: var(--text-muted); width: 40px; text-align: center; }
  .rank-item:nth-child(1) { background: #FFFAF0; border: 1px solid var(--accent-red); }
  .rank-item:nth-child(1) .rank-num { color: var(--accent-red); }
  .rank-item img { width: 60px; height: 80px; object-fit: cover; border-radius: 4px; }
  .rank-info { flex: 1; }
  .rank-info h3 { margin-bottom: 5px; }
  .rank-meta { font-size: 12px; color: var(--text-muted); }

  /* Categories */
  .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
  .cat-card { background: #fff; padding: 20px; border-radius: var(--radius); border-left: 4px solid var(--wood-dark); box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 10px; }
  .cat-card .call-number { font-family: monospace; font-size: 14px; color: var(--text-muted); border-bottom: 1px dashed var(--wood-light); padding-bottom: 5px; }
  .cat-card h3 { font-size: 1.2rem; }
  .cat-imgs { display: flex; gap: 10px; }
  .cat-imgs img { width: 50%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }

  /* Exclusive */
  .exclusive-section { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; padding: 30px; border-radius: var(--radius); border: 3px solid var(--wood-dark); }
  .ex-main { display: flex; flex-direction: column; gap: 15px; }
  .ex-main img { width: 100%; max-width: 300px; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; box-shadow: 5px 5px 15px rgba(0,0,0,0.2); }
  .ex-list { display: flex; flex-direction: column; gap: 15px; }
  .ex-item { display: flex; gap: 15px; align-items: center; }
  .ex-item img { width: 50px; height: 70px; object-fit: cover; border-radius: 4px; }

  /* Free Zone */
  .free-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
  .free-card { position: relative; background: #fff; padding: 10px; border-radius: var(--radius); text-align: center; transition: transform 0.3s; }
  .free-card:hover { transform: rotate(2deg); }
  .free-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
  .free-tag { position: absolute; top: 10px; right: 10px; background: #4CAF50; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; }

  /* Reviews */
  .review-stats { display: flex; justify-content: space-around; margin-bottom: 30px; text-align: center; }
  .stat-num { font-size: 2rem; font-weight: bold; color: var(--accent-red); }
  .review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
  .review-card { background: #FFF8E7; padding: 20px; border-radius: var(--radius); box-shadow: 2px 2px 8px rgba(0,0,0,0.1); position: relative; transform: rotate(-1deg); }
  .review-card:nth-child(even) { transform: rotate(1deg); }
  .review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .review-header img { width: 30px; height: 30px; border-radius: 50%; }
  .stars { color: gold; margin-bottom: 10px; font-size: 12px;}
  .review-text { font-size: 14px; color: var(--text-muted); }
  .book-code-line { border-bottom: 1px dashed var(--wood-light); margin-top: 15px; }

  /* FAQ */
  .faq-acc { border-top: 1px solid var(--wood-light); }
  .faq-item { border-bottom: 1px solid var(--wood-light); }
  .faq-q { padding: 20px; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; min-height: 48px; align-items: center; }
  .faq-a { padding: 0 20px 20px; color: var(--text-muted); display: none; }
  .faq-item.active .faq-a { display: block; }

  /* Download */
  .download-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
  .step-card { text-align: center; padding: 20px; background: #fff; border-radius: var(--radius); }
  .card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .reader-card { background: var(--wood-light); padding: 20px; border-radius: 12px; text-align: center; color: var(--wood-deep); position: relative; overflow: hidden; min-height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .reader-card::before { content: '读者证'; position: absolute; top: 10px; left: 10px; font-weight: bold; }
  .reader-card a { background: var(--wood-dark); color: #fff; padding: 15px 30px; border-radius: 30px; font-size: 1.2rem; margin-top: 20px; min-height: 48px; display: flex; align-items: center; justify-content: center; }

  /* Footer */
  footer { background: var(--wood-deep); color: #ddd; padding: 40px 20px 20px; font-size: 14px; margin-top: 60px; }
  .footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
  .footer-bottom { text-align: center; border-top: 1px solid #555; padding-top: 20px; margin-top: 30px; font-size: 12px; color: #888; }
  .footer-bottom a { color: #aaa; }
  
  /* Mobile Adjustments */
  @media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2rem; }
    .bookshelf-wall { grid-template-columns: repeat(2, 1fr); height: auto; }
    .hero-feature { grid-column: span 2; grid-row: span 1; }
    .exclusive-section { grid-template-columns: 1fr; }
    .download-steps { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .mobile-download-bar { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; padding: 10px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 200; gap: 10px; }
    .mobile-download-bar a { flex: 1; text-align: center; padding: 12px; border-radius: 20px; font-weight: bold; color: #fff; }
    .mobile-download-bar .android { background: var(--accent-red); }
    .mobile-download-bar .ios { background: var(--wood-dark); }
  }