:root {
    --primary: #5B6CFF;
    --grad: linear-gradient(135deg, #5B6CFF 0%, #8A63FF 100%);
    --bg: #f5f6fa;
    --text: #232946;
    --muted: #9096a8;
    --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
#page { min-height: 100vh; padding-bottom: 72px; }
img { max-width: 100%; display: block; }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); font-size: 12px; }
.flex { display: flex; align-items: center; }
.flex1 { flex: 1; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; }

.btn { display: block; text-align: center; background: var(--grad); color: #fff; border: none; border-radius: 24px; padding: 13px 20px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(91, 108, 255, .28); }
.btn:active { transform: scale(.98); opacity: .92; }
.btn.gray { background: #eef0f6; color: #454b66; box-shadow: none; }
.btn.small { display: inline-block; padding: 6px 14px; font-size: 13px; border-radius: 16px; }

.navbar { position: sticky; top: 0; z-index: 20; background: #fff; height: 48px; display: flex; align-items: center; padding: 0 12px; box-shadow: 0 1px 8px rgba(0, 0, 0, .04); }
.navbar .back { width: 36px; height: 36px; line-height: 34px; font-size: 24px; color: #454b66; border-radius: 50%; }
.navbar .title { flex: 1; text-align: center; font-size: 17px; font-weight: 700; letter-spacing: .5px; }

.hero { background: var(--grad); padding: 28px 20px 50px; color: #fff; border-radius: 0 0 26px 26px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -28px; top: -32px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hero h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.hero p { margin: 8px 0 0; font-size: 13px; opacity: .86; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; display: flex; border-top: 1px solid #f0f0f5; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(0, 0, 0, .05); }
.tabbar .tab { flex: 1; text-align: center; padding: 8px 0 7px; color: #b0b4c4; font-size: 11px; cursor: pointer; }
.tabbar .tab .ico { display: block; font-size: 22px; margin-bottom: 1px; }
.tabbar .tab.active { color: var(--primary); font-weight: 600; }

#toast { position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .78); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 999; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 80%; text-align: center; }
#toast.show { opacity: 1; }

.cat { margin: 16px 14px 0; }
.cat-title { font-size: 17px; font-weight: 700; padding: 6px 2px 12px; display: flex; align-items: center; }
.cat-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--grad); margin-right: 8px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.spec-item { text-align: center; background: #fff; border-radius: 14px; padding: 14px 6px 12px; cursor: pointer; box-shadow: 0 2px 10px rgba(31, 35, 64, .04); transition: transform .12s; }
.spec-item:active { transform: scale(.96); }
.spec-item .icon { width: 46px; height: 46px; line-height: 46px; margin: 0 auto 8px; border-radius: 14px; font-size: 20px; font-weight: 700; color: #fff; }
.spec-item .name { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.spec-item .size { font-size: 11px; color: var(--muted); margin-top: 3px; }
.spec-item:nth-child(4n+1) .icon { background: linear-gradient(135deg, #5B6CFF, #8A63FF); }
.spec-item:nth-child(4n+2) .icon { background: linear-gradient(135deg, #3DB5FF, #4F8CFF); }
.spec-item:nth-child(4n+3) .icon { background: linear-gradient(135deg, #FF7A7A, #FF5EA8); }
.spec-item:nth-child(4n+4) .icon { background: linear-gradient(135deg, #2ED3B7, #1BB3E0); }

.card { background: #fff; border-radius: var(--radius); margin: 14px; padding: 18px 16px; box-shadow: 0 2px 12px rgba(31, 35, 64, .04); }

.preview { text-align: center; padding: 24px 12px 8px; }
.preview .photo-box { width: 230px; max-width: 80%; margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 32px rgba(31, 35, 64, .14); background: #fff; display: flex; align-items: center; justify-content: center; }
.preview .photo-box img { width: 100%; display: block; }

.color-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 18px; }
.color-item { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px #e4e6ee; position: relative; transition: transform .12s; }
.color-item:active { transform: scale(.9); }
.color-item.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); transform: scale(1.05); }

.fix-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #fff; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; box-shadow: 0 -2px 12px rgba(0, 0, 0, .05); }

.upload-box { border: 1.5px dashed #c7cbe0; border-radius: 16px; background: #fff; margin: 14px; padding: 40px 16px; text-align: center; color: #9096a8; cursor: pointer; }
.upload-box:active { background: #fafbfe; }

.photo-list { padding: 14px; }
.photo-item { display: flex; background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(31, 35, 64, .04); }
.photo-item img { width: 76px; height: 100px; border-radius: 8px; object-fit: cover; }
.photo-item .info { flex: 1; margin-left: 14px; }
.photo-item .name { font-size: 15px; font-weight: 700; }
.photo-item .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.photo-item .acts { display: flex; gap: 10px; margin-top: 16px; }

.ad-slot { margin: 14px 0; text-align: center; min-height: 1px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px; }
.feature-item { text-align: center; background: #fff; border-radius: 16px; padding: 26px 12px; cursor: pointer; box-shadow: 0 2px 12px rgba(31, 35, 64, .05); }
.feature-item .icon { font-size: 36px; }
.feature-item .name { font-size: 14px; font-weight: 600; margin-top: 10px; }
