:root {
    --bg: #0a0a0f;
    --card: rgba(24, 20, 34, 0.6);
    --card-solid: rgba(24, 20, 34, 0.85);
    --border: rgba(168, 120, 232, 0.15);
    --gold: #a878e8;
    --gold2: #6b4a9e;
    --gold-light: #c9a6ff;
    --text: #e0e0e0;
    --dim: #6a6a7a;
    --red: #e05555;
    --blue: #4a90d9;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* 背景光晕 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 15, 0.7) 50%, rgba(10, 10, 15, 0.95) 100%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--gold-light); text-decoration: none; }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px 60px; position: relative; z-index: 5; }

/* 顶部品牌栏 */
.brand-bar {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand-title {
    font-size: 1.2em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
}
.brand-subtitle {
    font-size: 0.72em;
    color: var(--dim);
    letter-spacing: 2px;
    margin-top: 2px;
}
.brand-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gold);
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-family: inherit;
    letter-spacing: 1px;
    transition: all 0.3s;
}
.brand-btn:hover { color: var(--gold-light); border-color: rgba(168, 120, 232, 0.4); }
.brand-btn:active { transform: scale(0.96); }

/* Hero */
.hero { text-align: center; padding: 36px 0 30px; }
.hero h1 {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    margin-bottom: 10px;
}
.hero p { color: var(--dim); font-size: 0.9em; letter-spacing: 1px; }

/* 卡片 */
.card {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 16px;
}

.field-label {
    font-size: 0.95em;
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.field-label .tag { font-size: 0.78em; color: var(--dim); font-weight: 400; letter-spacing: 0; }

input[type=text], input[type=password], input[type=date], textarea {
    width: 100%;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(168, 120, 232, 0.2);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.3s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168, 120, 232, 0.1); }
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
input[type=date] { color-scheme: dark; }

/* 上传区 */
.upload-zone {
    border: 2px dashed rgba(168, 120, 232, 0.3);
    border-radius: 14px;
    padding: 38px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--dim);
    background: rgba(168, 120, 232, 0.03);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--gold); color: var(--gold-light); background: rgba(168, 120, 232, 0.07); }
.upload-zone .icon { font-size: 42px; margin-bottom: 10px; }
.upload-zone .hint { font-size: 0.8em; margin-top: 6px; color: var(--dim); }

/* 图片预览 */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 16px; }
.preview-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: rgba(10,10,15,0.5); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item .rm {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.72); color: #fff; border: none; cursor: pointer; font-size: 14px;
    line-height: 1; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.preview-item .rm:hover { background: var(--red); }

/* 销毁方式 */
.destroy-options { display: flex; gap: 10px; flex-wrap: wrap; }
.destroy-opt {
    flex: 1; min-width: 110px;
    background: rgba(168, 120, 232, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.destroy-opt .t { font-size: 0.95em; font-weight: 600; color: var(--text); }
.destroy-opt .d { font-size: 0.72em; color: var(--dim); margin-top: 4px; }
.destroy-opt.active {
    background: rgba(168, 120, 232, 0.14);
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(168, 120, 232, 0.18);
}
.destroy-opt.active .t { color: var(--gold-light); }
.destroy-opt input { display: none; }
.date-wrap { margin-top: 14px; display: none; }
.date-wrap.show { display: block; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #0a0a0f; font-weight: 700; border: none; border-radius: 12px;
    padding: 14px 30px; font-size: 1em; cursor: pointer; letter-spacing: 2px;
    transition: all 0.3s; width: 100%;
}
.btn:hover { filter: brightness(1.1); box-shadow: 0 6px 22px rgba(168, 120, 232, 0.3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--border); }
.btn.ghost:hover { background: rgba(168, 120, 232, 0.08); box-shadow: none; filter: none; }
.btn.small { padding: 9px 16px; font-size: 0.85em; width: auto; border-radius: 10px; letter-spacing: 1px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid rgba(224, 85, 85, 0.3); }
.btn.danger:hover { background: rgba(224, 85, 85, 0.08); box-shadow: none; filter: none; }

/* 结果 */
.result-box { text-align: center; }
.result-box .ok-icon {
    width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 16px;
    border: 2px solid var(--gold); color: var(--gold-light);
    display: flex; align-items: center; justify-content: center; font-size: 34px;
    background: rgba(168, 120, 232, 0.08);
    box-shadow: 0 0 30px rgba(168, 120, 232, 0.25);
}
.result-box h2 { color: var(--gold-light); letter-spacing: 2px; margin-bottom: 8px; font-size: 1.3em; }
.share-url { display: flex; gap: 10px; margin-top: 16px; }
.share-url input {
    flex: 1; background: rgba(10, 10, 15, 0.6); border: 1px solid rgba(168, 120, 232, 0.2);
    color: var(--gold-light); padding: 12px 14px; border-radius: 10px; font-size: 0.85em;
}
.copy-btn { white-space: nowrap; }

/* 认证 */
.auth-toggle { display: flex; gap: 24px; margin-bottom: 24px; }
.auth-toggle button {
    background: none; border: none; color: var(--dim); font-size: 1em; cursor: pointer;
    padding-bottom: 8px; border-bottom: 2px solid transparent; letter-spacing: 2px;
    font-family: inherit; transition: all 0.3s;
}
.auth-toggle button.active { color: var(--gold-light); border-bottom-color: var(--gold); font-weight: 700; }

/* 后台表格 */
.stats-row { display: flex; gap: 12px; margin-bottom: 16px; }
.stat-box {
    flex: 1; background: var(--card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center;
}
.stat-box .num { font-size: 1.7em; font-weight: 800; color: var(--gold-light); }
.stat-box .lbl { font-size: 0.75em; color: var(--dim); margin-top: 4px; letter-spacing: 1px; }

.board-list { display: flex; flex-direction: column; gap: 12px; }
.board-item {
    background: var(--card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.board-item .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.board-item .title { font-size: 1em; font-weight: 700; color: var(--text); flex: 1; word-break: break-all; }
.board-item .badge { font-size: 0.72em; padding: 3px 10px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
.badge.alive { background: rgba(168, 120, 232, 0.12); color: var(--gold-light); border: 1px solid rgba(168, 120, 232, 0.3); }
.badge.dead { background: rgba(224, 85, 85, 0.1); color: var(--red); border: 1px solid rgba(224, 85, 85, 0.3); }
.board-item .desc { font-size: 0.85em; color: var(--dim); margin-bottom: 10px; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-item .thumbs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.board-item .thumbs img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.board-item .meta { font-size: 0.72em; color: var(--dim); margin-bottom: 12px; line-height: 1.6; }
.board-item .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--dim); padding: 50px 0; font-size: 0.95em; }

/* 展示页 */
.view-wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; position: relative; z-index: 5; }
.view-card {
    background: var(--card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: 18px; padding: 24px 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(168, 120, 232, 0.06);
}
.view-title {
    font-size: 1.35em; font-weight: 800; text-align: center; letter-spacing: 2px; margin-bottom: 6px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.view-time { text-align: center; color: var(--dim); font-size: 0.75em; margin-bottom: 18px; }
.view-desc { font-size: 0.95em; color: var(--text); line-height: 1.8; white-space: pre-wrap; word-break: break-word; margin-bottom: 18px; }
.view-images { display: flex; flex-direction: column; gap: 12px; }
.view-images img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.view-footer { text-align: center; margin-top: 24px; color: var(--dim); font-size: 0.75em; letter-spacing: 1px; }
.view-destroy-badge {
    display: inline-block; margin: 0 auto 16px; font-size: 0.72em; padding: 4px 12px;
    border-radius: 10px; background: rgba(168, 120, 232, 0.1); color: var(--gold-light);
    border: 1px solid rgba(168, 120, 232, 0.25);
}

.expired-wrap { text-align: center; padding: 60px 20px; }
.expired-wrap .icon { font-size: 56px; margin-bottom: 16px; }
.expired-wrap h2 { color: var(--dim); font-size: 1.2em; letter-spacing: 2px; }

/* toast */
#toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: var(--card-solid); border: 1px solid rgba(168, 120, 232, 0.4); color: var(--gold-light);
    padding: 12px 24px; border-radius: 10px; font-size: 0.9em; z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6); opacity: 0; transition: opacity 0.3s;
    pointer-events: none; backdrop-filter: blur(20px); letter-spacing: 1px;
}
#toast.show { opacity: 1; }
#toast.error { border-color: rgba(224, 85, 85, 0.5); color: #ff7b7b; }

/* 图片预览弹窗 */
.img-viewer { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 500; display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.img-viewer.show { display: flex; }
.img-viewer img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }

@media (max-width: 560px) {
    .hero h1 { font-size: 1.6em; letter-spacing: 4px; }
    .card { padding: 18px 16px; }
    .share-url { flex-direction: column; }
}
