* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f7; color: #111; -webkit-font-smoothing: antialiased;
}
.platform-wrap { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #fff; border-right: 1px solid #e5e5e5;
    display: flex; flex-direction: column; padding: 20px 0;
    flex-shrink: 0; position: fixed; height: 100vh; overflow-y: auto; z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; }
.sidebar:hover::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.brand {
    display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700;
    color: #111; margin-bottom: 28px; padding: 0 16px; cursor: pointer; text-decoration: none;
}
.brand-icon {
    width: 32px; height: 32px; background: linear-gradient(135deg, #2e2e2e, #2e2e2e);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 20px;
}
.nav-section { margin-bottom: 20px; padding: 0 12px; }
.nav-label {
    font-size: 13.5px; font-weight: 600; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; padding-left: 8px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
    cursor: pointer; font-size: 14px; color: #4b5563; transition: all 0.15s;
    margin-bottom: 2px; text-decoration: none;
}
.nav-item:hover { background: #f3f4f6; color: #111; }
.nav-item.active { background: #eef2ff; color: #6366f1; font-weight: 600; }
.nav-badge {
    margin-left: auto; font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 4px; background: #eef2ff; color: #6366f1;
}
.main { flex: 1; display: flex; flex-direction: column; margin-left: 220px; min-height: 100vh; }
.topbar {
    height: 64px; background: #fff; border-bottom: 1px solid #e5e5e5;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; position: sticky; top: 0; z-index: 50;
}
.search-box {
    display: flex; align-items: center; background: #f5f5f7; border-radius: 10px;
    padding: 0 16px; width: 420px; height: 40px; gap: 10px;
    border: 1px solid transparent; transition: border 0.15s;
}
.search-box:focus-within { border-color: #6366f1; }
.search-box input { border: none; background: transparent; outline: none; flex: 1; font-size: 14px; color: #111; font-family: inherit; }
.search-box input::placeholder { color: #9ca3af; }
.search-shortcut { font-size: 12px; color: #9ca3af; background: #fff; padding: 2px 6px; border-radius: 4px; border: 1px solid #e5e5e5; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.btn-ghost { padding: 8px 16px; border-radius: 8px; border: none; background: transparent; font-size: 14px; cursor: pointer; color: #4b5563; font-family: inherit; font-weight: 500; transition: background 0.15s; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-primary { padding: 8px 20px; border-radius: 8px; border: none; background: #111; color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 500; transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.85; }
.content { flex: 1; padding: 24px 28px; }
.hero {
    border-radius: 16px; padding: 64px 48px; color: #fff; position: relative;
    overflow: hidden; margin-bottom: 24px; min-height: 420px;
}
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.12); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; margin-bottom: 20px; backdrop-filter: blur(4px); }
.hero h1 { font-size: 54px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; letter-spacing: -0.02em; }
.hero h1 span { color: #a5b4fc; }
.hero-sub { font-size: 15px; color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.hero-input-row { display: flex; gap: 12px; margin-bottom: 16px; max-width: 400px; position: relative; z-index: 2; }
.hero-gen-btn { height: 48px; padding: 0 28px; background: #fff; color: #1e1b4b; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.15s; white-space: nowrap; text-decoration: none; }
.hero-gen-btn:hover { transform: translateY(-1px); }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-tag { font-size: 12px; color: rgba(255,255,255,0.5); cursor: pointer; transition: color 0.15s; }
.hero-tag:hover { color: rgba(255,255,255,0.9); }
.hero-stats { position: absolute; right: 55px; bottom: 18px; font-size: 12px; color: rgba(255,255,255,0.9); background: rgba(15,15,25,0.55); padding: 8px 18px; border-radius: 24px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,0.12); display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.hero-stats span { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px rgba(34,197,94,0.6); flex-shrink: 0; }

/* ===== 英雄区右侧3卡片 — iPhone 照片质感 ===== */
.hero-images {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 440px;
    height: 360px;
    z-index: 1;
}
.hero-img-card {
    border-radius: 16px;
    overflow: hidden;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    font-size: 14px;
    font-weight: 600;
    background-size: cover;
    background-position: center;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.08),
        0 8px 16px rgba(0,0,0,0.12),
        0 24px 48px rgba(0,0,0,0.25);
}
.hero-img-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.05) 35%,
        transparent 50%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}
.hero-img-card:nth-child(1) {
    width: 210px;
    height: 280px;
    left: -60px;
    top: 48%;
    transform: translateY(-50%) rotate(-12deg);
    z-index: 1;
}
.hero-img-card:nth-child(2) {
    width: 235px;
    height: 316px;
    left: 53%;
    top: 42%;
    transform: translate(-50%, -50%) rotate(4deg);
    z-index: 3;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.1),
        0 12px 24px rgba(0,0,0,0.15),
        0 32px 64px rgba(0,0,0,0.3);
}
.hero-img-card:nth-child(3) {
    width: 180px;
    height: 240px;
    right: -70px;
    top: 56%;
    transform: translateY(-50%) rotate(18deg);
    z-index: 2;
}
/* ===== 卡片调整结束 ===== */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.feat-card { background: #fff; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; border: 1px solid #e5e5e5; cursor: pointer; transition: all 0.2s; text-decoration: none; color: inherit; }
.feat-card:hover { border-color: #d9d9d9; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.feat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.feat-icon svg { width: 24px; height: 24px; }
.feat-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: #111; }
.feat-info p { font-size: 13px; color: #6b7280; }
.feat-arrow { margin-left: auto; color: #9ca3af; font-size: 18px; }
.gallery-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.gallery-label { font-size: 11px; font-weight: 600; color: #6366f1; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.gallery-title { font-size: 22px; font-weight: 700; color: #111; }
.gallery-link { font-size: 14px; color: #6b7280; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: color 0.15s; text-decoration: none; }
.gallery-link:hover { color: #111; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #e7e7ec; transition: all .22s ease; color: #6b7280; background: #fff; font-family: inherit; text-decoration: none; display: inline-block; }
.tab:hover { border-color: #111; color: #111; transform: translateY(-1px); }
.tab.active { background: #111; color: #fff; border-color: #111; }

/* ===== 瀑布流：JS 分列布局，顶部严格对齐 ===== */
.grid {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
}
.grid-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
/* 2026 卡片：白底 + 1px 细边框，悬浮才投影上浮 */
.art-card {
    background: #fff;
    border: 1px solid #ececf1;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    margin-bottom: 0;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1), border-color .35s;
    will-change: transform;
    animation: artIn .55s cubic-bezier(.2,.8,.2,1) backwards;
}
.art-card:hover {
    transform: translateY(-6px);
    border-color: #dcdce4;
    box-shadow: 0 16px 40px rgba(17,17,17,.10), 0 4px 12px rgba(17,17,17,.05);
}
.art-img-wrap {
    position: relative;
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 0;
}
.art-img-wrap img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.art-card:hover .art-img-wrap img {
    transform: scale(1.07);
}
/* 交错入场 */
@keyframes artIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.art-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.art-img-placeholder svg { opacity: 0.3; }
.art-tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #111; font-size: 11px; font-weight: 500; letter-spacing: .02em; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); box-shadow: 0 1px 5px rgba(0,0,0,.14); line-height: 1.4; }
.art-body { padding: 12px; }
.art-title { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6366f1; font-weight: 500; }
.art-meta-dot { width: 6px; height: 6px; border-radius: 50%; background: #6366f1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; padding-bottom: 20px; }
.page-info { font-size: 13px; color: #6b7280; background: #fff; padding: 8px 16px; border-radius: 8px; border: 1px solid #e5e5e5; }
.page-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid #e7e7ec; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #111; transition: all .22s ease; font-family: inherit; font-size: 15px; text-decoration: none; }
.page-btn:hover:not(:disabled) { background: #111; color: #fff; border-color: #111; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.footer { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; margin-top: 8px; border-top: 1px solid #e5e5e5; font-size: 14px; color: #9ca3af; }
.loading-skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: 8px; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 1200px) { .hero-images { display: none; } }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .sidebar { transform: translateX(-100%); transition: transform 0.3s; } .sidebar.open { transform: translateX(0); } .main { margin-left: 0; } .search-box { width: 280px; } }
@media (max-width: 600px) { .content { padding: 16px; } .hero { padding: 32px 20px; min-height: 320px; } .hero h1 { font-size: 28px; } .topbar { padding: 0 16px; } .search-box { display: none; } }

/* ===== 顶部导航：悬停长下划线 / 当前页短下划线 ===== */
.main-nav a { position: relative; }
.main-nav a:hover { background: #f3f4f6; border-radius: 8px; }
.main-nav a:hover span { color: #111; }
.main-nav a:hover::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: #111; border-radius: 1px; }
.main-nav a.nav-active { color: #111 !important; font-weight: 600; }
.main-nav a.nav-active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 20px; bottom: 0; height: 3px; background: #111; border-radius: 2px; }

/* 当前页悬停时仍保持短下划线（覆盖上方悬停长下划线） */
.main-nav a.nav-active:hover::after { left: 50%; right: auto; transform: translateX(-50%); width: 20px; height: 3px; border-radius: 2px; }


/* ===== 页面专属：卡片悬停操作按钮 + 预览弹窗（原 index.php 内联样式，已合并到此处） ===== */
.art-img-wrap{position:relative;overflow:hidden}
.art-img-wrap img,.art-img-wrap video{transition:transform .7s cubic-bezier(.2,.8,.2,1)}
.art-card:hover .art-img-wrap img,.art-card:hover .art-img-wrap video{transform:scale(1.07)}
.art-card-actions{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;gap:20px;opacity:0;transition:opacity .3s ease;z-index:3;pointer-events:none}
.art-card:hover .art-card-actions{opacity:1}
.art-card-action-btn{position:relative;width:44px;height:44px;border-radius:999px;padding:0;border:none;background:rgba(255,255,255,.95);color:#111;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;backdrop-filter:blur(8px);box-shadow:0 4px 16px rgba(0,0,0,.18);transition:all .2s ease;text-decoration:none;pointer-events:auto}
.art-card-action-btn:hover{background:#111;color:#fff;transform:scale(1.08)}
.art-card-action-btn .tooltip{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(-4px);padding:6px 12px;background:#fff;color:#111;font-size:12px;font-weight:500;border-radius:8px;white-space:nowrap;opacity:0;pointer-events:none;transition:all .2s ease;line-height:1.4;box-shadow:0 4px 16px rgba(0,0,0,.12);border:1px solid #e5e5e5}
.art-card-action-btn:hover .tooltip{opacity:1;transform:translateX(-50%) translateY(0)}
.preview-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);backdrop-filter:blur(8px);z-index:9999;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .3s ease}
.preview-overlay.show{opacity:1;pointer-events:auto}
.preview-box{position:relative;max-width:90vw;max-height:90vh;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 24px 64px rgba(0,0,0,.4);transform:scale(.92);transition:transform .3s ease}
.preview-overlay.show .preview-box{transform:scale(1)}
.preview-box img,.preview-box video{max-width:90vw;max-height:85vh;display:block;object-fit:contain}
.preview-close{position:absolute;top:12px;right:12px;width:36px;height:36px;border-radius:50%;border:none;background:rgba(0,0,0,.5);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;transition:background .15s;z-index:10}
.preview-close:hover{background:rgba(0,0,0,.8)}
.preview-info{position:absolute;bottom:0;left:0;right:0;padding:12px 20px;background:linear-gradient(transparent,rgba(0,0,0,.6));color:#fff;font-size:13px;font-weight:500}


/* ===== 修复瀑布流右侧溢出：flex 子项默认 min-width:auto 会被内容撑宽 ===== */
.main { min-width: 0; }
.grid { width: 100%; min-width: 0; }


/* ===== 修复用户中心页右侧溢出：grid 子项默认 min-width:auto 会被内容撑宽 ===== */
.uc-main { min-width: 0; }
.uc-layout > * { min-width: 0; }


/* ===== 移动端加固（防 viewport 缺失 / 媒体查询失效的兜底，与 index.php critical CSS 同步） ===== */
@media (max-width: 900px) {
    .platform-wrap { display: block; }
    .sidebar { transform: translateX(-100%) !important; transition: transform 0.3s ease !important; }
    .sidebar.open { transform: translateX(0) !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 16px !important; }
    .hero { padding: 40px 20px !important; min-height: 0 !important; }
    .hero h1 { font-size: 30px !important; letter-spacing: 0 !important; }
    .hero-sub { font-size: 14px !important; margin-bottom: 20px !important; }
    .hero-input-row { flex-direction: column !important; max-width: 100% !important; }
    .hero-gen-btn { width: 100%; justify-content: center; }
    .hero-stats { position: static !important; margin-top: 16px; display: inline-flex !important; }
    .hero-images { display: none !important; }
    .features { grid-template-columns: 1fr !important; }
    .grid { flex-direction: column !important; }
    .grid-col { width: 100% !important; }
    .footer { flex-direction: column; gap: 8px; text-align: center; }
}