:root {
    --red: #E8472A;
    --red-light: #FFF1EE;
    --red-mid: #FDDDD7;
    --red-dark: #B83520;
    --ink: #1A1614;
    --ink-2: #3D3530;
    --ink-3: #6B5F5A;
    --ink-4: #9C928E;
    --paper: #FDFAF8;
    --paper-2: #F5F0EC;
    --paper-3: #EDE6E1;
    --white: #FFFFFF;
    --border: rgba(26,22,20,0.10);
    --border-md: rgba(26,22,20,0.15);
    --shadow-sm: 0 1px 3px rgba(26,22,20,0.08), 0 1px 2px rgba(26,22,20,0.04);
    --shadow-md: 0 4px 12px rgba(26,22,20,0.10), 0 2px 4px rgba(26,22,20,0.06);
    --shadow-lg: 0 16px 40px rgba(26,22,20,0.12), 0 4px 8px rgba(26,22,20,0.06);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
  }

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

  body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  a { text-decoration: none; color: inherit; }

  /* ===== HEADER ===== */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253,250,248,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .portal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .portal-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-md);
    background: var(--white);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
  }

  .portal-nav-link:hover {
    border-color: var(--red);
    color: var(--red);
  }

  .pdf-lang-select {
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-md);
    background: var(--white);
    font-size: 12px;
    font-family: inherit;
    color: var(--ink-2);
    cursor: pointer;
  }

  .feed-updated-badge {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 8px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--red);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  .logo-icon::before {
    content: '';
    position: absolute;
    top: 6px; left: 8px;
    width: 14px; height: 18px;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
  }
  .logo-icon::after {
    content: '';
    position: absolute;
    top: 6px; left: 16px;
    width: 6px; height: 6px;
    background: var(--red);
    border-radius: 0 2px 0 0;
  }

  .logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--ink);
    letter-spacing: -0.5px;
  }

  .logo-text span { color: var(--red); }

  .header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }

  .nav-item {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.18s ease;
    border: none;
    background: none;
    font-family: inherit;
  }

  .nav-item:hover, .nav-item.active {
    background: var(--paper-2);
    color: var(--ink);
  }

  .nav-item.active {
    font-weight: 500;
    color: var(--red);
    background: var(--red-light);
  }

  .header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    height: 38px;
    min-width: 220px;
    transition: border-color 0.18s;
  }

  .header-search:focus-within {
    border-color: var(--red);
    background: var(--white);
  }

  .header-search svg { color: var(--ink-4); flex-shrink: 0; }

  .header-search input {
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--ink);
    font-family: inherit;
    width: 100%;
    outline: none;
  }

  .header-search input::placeholder { color: var(--ink-4); }

  /* ===== HERO ===== */
  .hero {
    background: linear-gradient(135deg, #1A1614 0%, #2D1F1A 50%, #3A2218 100%);
    padding: 72px 24px 64px;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(232,71,42,0.25) 0%, transparent 70%);
    pointer-events: none;
  }

  .hero::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(232,71,42,0.12) 0%, transparent 70%);
    pointer-events: none;
  }

  .hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
  }

  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(232,71,42,0.15);
    border: 1px solid rgba(232,71,42,0.3);
    color: #F0907C;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
  }

  .hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    color: #FDFAF8;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
  }

  .hero-title em {
    font-style: normal;
    color: var(--red);
  }

  .hero-sub {
    font-size: 17px;
    color: rgba(253,250,248,0.55);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.7;
  }

  .hero-search {
    display: flex;
    max-width: 580px;
    gap: 0;
    position: relative;
  }

  .hero-search-input {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-right: none;
    color: #FDFAF8;
    transition: background 0.2s;
  }

  .hero-search-input::placeholder { color: rgba(253,250,248,0.35); }
  .hero-search-input:focus { background: rgba(255,255,255,0.12); }

  .hero-search-btn {
    height: 52px;
    padding: 0 24px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
  }

  .hero-search-btn:hover { background: var(--red-dark); }

  .hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
  }

  .hero-stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #FDFAF8;
  }

  .hero-stat-label {
    font-size: 13px;
    color: rgba(253,250,248,0.45);
    margin-top: 2px;
  }

  /* ===== MAIN LAYOUT ===== */
  .main-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
  }

  /* ===== SIDEBAR ===== */
  .sidebar {
    position: sticky;
    top: 80px;
  }

  .sidebar-section {
    margin-bottom: 28px;
  }

  .sidebar-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 10px;
    padding: 0 4px;
  }

  .sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.16s ease;
    font-size: 14px;
    color: var(--ink-2);
    position: relative;
  }

  .sidebar-item:hover {
    background: var(--paper-2);
    color: var(--ink);
  }

  .sidebar-item.active {
    background: var(--red-light);
    color: var(--red-dark);
    font-weight: 500;
  }

  .sidebar-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
  }

  .sidebar-badge {
    margin-left: auto;
    font-size: 11px;
    background: var(--paper-3);
    color: var(--ink-3);
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 500;
  }

  .sidebar-item.active .sidebar-badge {
    background: var(--red-mid);
    color: var(--red-dark);
  }

  .filter-group { display: flex; flex-direction: column; gap: 4px; }

  .filter-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.16s;
    color: var(--ink-3);
  }

  .filter-tag:hover { background: var(--paper-2); color: var(--ink); }

  .filter-tag input[type="checkbox"] {
    accent-color: var(--red);
    width: 14px; height: 14px;
    cursor: pointer;
  }

  /* ===== CONTENT ===== */
  .content { min-width: 0; }

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

  .section-title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.3px;
  }

  .section-title span {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-4);
    margin-left: 8px;
    letter-spacing: 0;
  }

  .view-all {
    font-size: 13px;
    color: var(--red);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.18s;
  }

  .view-all:hover { gap: 8px; }

  /* ===== FEATURED BANNER ===== */
  .featured-banner {
    background: var(--ink);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

  .featured-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 50%;
    background: radial-gradient(ellipse at right center, rgba(232,71,42,0.2) 0%, transparent 70%);
  }

  .featured-tag {
    display: inline-block;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  .featured-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #FDFAF8;
    margin-bottom: 6px;
  }

  .featured-desc {
    font-size: 13px;
    color: rgba(253,250,248,0.5);
    max-width: 440px;
    line-height: 1.6;
  }

  .featured-cta {
    background: var(--red);
    color: white;
    border: none;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.18s, transform 0.18s;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .featured-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

  /* ===== TOOL CARDS GRID ===== */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
  }

  .tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.22s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, var(--red));
    opacity: 0;
    transition: opacity 0.22s;
  }

  .tool-card:hover {
    border-color: var(--border-md);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

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

  .card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
  }

  .card-logo {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: white;
  }

  .card-meta { flex: 1; min-width: 0; }

  .card-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-cat {
    font-size: 12px;
    color: var(--ink-4);
  }

  .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
  }

  .card-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
  }

  .tag-free { background: #E6F7EE; color: #1A7A45; }
  .tag-online { background: #E8F0FE; color: #1849A9; }
  .tag-cn { background: #FFF3E0; color: #A04B00; }
  .tag-no-watermark { background: #F3E8FF; color: #6C30B5; }
  .tag-ai { background: #FFE8EC; color: #B51C3A; }
  .tag-desktop { background: var(--paper-2); color: var(--ink-3); }
  .tag-nosignup { background: #E8F4FD; color: #1565C0; }

  .card-desc {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ink-3);
  }

  .star { color: #F5A623; font-size: 12px; }

  .card-platform {
    display: flex;
    gap: 5px;
    align-items: center;
  }

  .platform-icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    background: var(--paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--ink-3);
    font-weight: 600;
  }

  .card-hot::after {
    content: '🔥';
    position: absolute;
    top: 12px; right: 14px;
    font-size: 14px;
  }

  /* ===== CATEGORY SECTIONS ===== */
  .category-section { margin-bottom: 52px; }

  .cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }

  .cat-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .cat-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
  }

  .cat-count {
    font-size: 13px;
    color: var(--ink-4);
    background: var(--paper-2);
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 4px;
  }

  /* ===== SCENE BANNERS ===== */
  .scene-section { margin-bottom: 48px; }

  .scene-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }

  .scene-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
  }

  .scene-card:hover {
    border-color: var(--red);
    background: var(--red-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }

  .scene-emoji { font-size: 26px; margin-bottom: 8px; }
  .scene-name { font-size: 14px; font-weight: 500; color: var(--ink-2); }
  .scene-sub { font-size: 12px; color: var(--ink-4); margin-top: 2px; }

  /* ===== FOOTER ===== */
  .site-footer {
    background: var(--ink);
    color: rgba(253,250,248,0.5);
    padding: 48px 24px 32px;
    margin-top: 48px;
  }

  .footer-inner {
    max-width: 1280px;
    margin: 0 auto;
  }

  .footer-top {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(253,250,248,0.08);
    margin-bottom: 28px;
  }

  .footer-brand .logo-text { color: #FDFAF8; }
  .footer-brand .logo-text span { color: var(--red); }

  .footer-brand p {
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.65;
    max-width: 220px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .footer-col-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(253,250,248,0.7);
    margin-bottom: 12px;
  }

  .footer-link {
    display: block;
    font-size: 13px;
    color: rgba(253,250,248,0.4);
    margin-bottom: 7px;
    transition: color 0.18s;
    cursor: pointer;
  }

  .footer-link:hover { color: rgba(253,250,248,0.8); }

  .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
  }

  /* ===== TABS ===== */
  .tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--paper-2);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
  }

  .tab-btn {
    padding: 7px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--ink-3);
    font-family: inherit;
    transition: all 0.18s;
  }

  .tab-btn.active {
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

  /* ===== SCROLLBAR ===== */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--paper-3); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

  /* ===== ANIMATIONS ===== */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .fade-up {
    animation: fadeUp 0.5s ease both;
  }

  .fade-up-1 { animation-delay: 0.05s; }
  .fade-up-2 { animation-delay: 0.1s; }
  .fade-up-3 { animation-delay: 0.15s; }
  .fade-up-4 { animation-delay: 0.2s; }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 960px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 24px; }
  }

  @media (max-width: 640px) {
    .header-inner { gap: 16px; }
    .header-search { min-width: 160px; }
    .hero { padding: 48px 16px 40px; }
    .main-layout { padding: 24px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
  }

  /* ===== PAGINATION ===== */
  .pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }
  .pagination-bar[hidden] { display: none !important; }
  .pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-3);
  }
  .pagination-size select {
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-md);
    background: var(--white);
    font-size: 13px;
    color: var(--ink);
    font-family: inherit;
    cursor: pointer;
  }
  .pagination-size select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px var(--red-mid);
  }
  .pagination-info {
    font-size: 13px;
    color: var(--ink-3);
    text-align: center;
    flex: 1;
    min-width: 140px;
  }
  .pagination-nav {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .pagination-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-md);
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
  }
  .pagination-btn:hover:not(:disabled) {
    border-color: var(--red);
    color: var(--red);
  }
  .pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .pagination-page-label {
    font-size: 13px;
    color: var(--ink-3);
    min-width: 88px;
    text-align: center;
  }
