:root {
    --bg: #0a0014;
    --panel: #18002e;
    --panel-soft: rgba(39, 0, 73, .6);
    --primary: #b26cff; /* 主紫 */
    --primary-strong: #9b4dff;
    --accent: #ff33ff; /* 品红霓虹 */
    --text: #eadeff;
    --muted: #bca9e6;
    --shadow: 0 0 24px rgba(178, 108, 255, .35);
    --shadow-strong: 0 0 44px rgba(255, 51, 255, .45);
    --radius: 16px;
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(255, 51, 255, .15), transparent 60%),
    radial-gradient(1200px 600px at 120% 10%, rgba(155, 77, 255, .18), transparent 60%),
    var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

/* 背景粒子层 */
canvas#bg-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* 顶部栏 */
header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, rgba(10, 0, 20, .9), rgba(10, 0, 20, .65));
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: .5px;
}

.brand .logo {
    width: 38px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: radial-gradient(circle at 30% 30%, var(--accent), transparent 55%),
    radial-gradient(circle at 70% 70%, var(--primary-strong), transparent 55%),
    #3a0066;
    box-shadow: var(--shadow);
}

.brand .title {
    font-size: 18px;
    color: var(--text);
    text-shadow: 0 0 10px rgba(178, 108, 255, .5)
}

.nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: .25s ease;
    font-weight: 600;
    font-size: 14px;
}

.nav-links a:hover {
    color: #fff;
    border-color: rgba(255, 51, 255, .5);
    box-shadow: 0 0 14px rgba(255, 51, 255, .35)
}

/* 轮播 */
.carousel {
    max-width: 1200px;
    margin: 18px auto 8px;
    padding: 0 20px;
}

.carousel-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slides {
    display: flex;
    transition: transform .6s ease;
}

.slide {
    min-width: 100%;
    height: 42vw;
    max-height: 420px;
    background: #120022;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    display: block;
}

.car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(10, 0, 20, .55);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.car-btn:hover {
    background: rgba(155, 77, 255, .65)
}

.car-prev {
    left: 12px;
}

.car-next {
    right: 12px;
}

.dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    border: 1px solid rgba(255, 255, 255, .45);
    cursor: pointer;
}

.dot.active {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent)
}

/* 区块标题 */
.section {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 20px;
}

.section h2 {
    font-size: 18px;
    margin: 8px 0 14px;
    color: #fff;
    text-shadow: 0 0 10px rgba(155, 77, 255, .5)
}

/* 卡片栅格（按钮区） */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: linear-gradient(180deg, rgba(26, 0, 50, .85), rgba(18, 0, 34, .85));
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 51, 255, .5);
    box-shadow: var(--shadow-strong);
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    box-shadow: 0 0 14px rgba(178, 108, 255, .35);
    flex: none;
    background: #240044;
    object-fit: cover
}

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

.title {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.desc {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    height: 36px;
    overflow: hidden
}

.rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px
}

.stars {
    display: inline-flex;
    gap: 2px
}

.stars svg {
    width: 14px;
    height: 14px;
    fill: #6a2bff;
    filter: drop-shadow(0 0 6px rgba(178, 108, 255, .55));
}

.score {
    font-size: 12px;
    color: #d9c7ff
}

.card .go {
    flex: none;
    margin-left: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #0a0014;
    font-weight: 800;
    font-size: 12px;
    background: linear-gradient(90deg, var(--primary-strong), var(--accent));
    box-shadow: 0 0 12px rgba(255, 51, 255, .45);
    border: 1px solid rgba(255, 255, 255, .15);
}

/* 新增卡片按钮（浮动） */
.fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 15;
}

.fab button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    background: radial-gradient(circle at 30% 30%, var(--accent), transparent 50%), #3a0066;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-strong);
}

/* 弹窗 */
.dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 0, 20, .55);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 25;
}

.dialog {
    width: min(580px, 92vw);
    background: linear-gradient(180deg, rgba(26, 0, 50, .96), rgba(18, 0, 34, .96));
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow-strong)
}

.dialog h3 {
    margin: 0 0 10px;
    text-shadow: 0 0 10px rgba(178, 108, 255, .5)
}

.form {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px
}

.form .full {
    grid-column: 1/-1
}

label {
    font-size: 12px;
    color: var(--muted)
}

input[type="text"], textarea, input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(12, 0, 24, .6);
    color: #fff;
    outline: none;
}

textarea {
    min-height: 84px;
    resize: vertical
}

.uploader {
    display: flex;
    gap: 10px;
    align-items: center
}

.uploader input {
    display: block
}

.preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .25);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.dlg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px
}

.btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    cursor: pointer;
    font-weight: 700
}

.btn.secondary {
    background: rgba(12, 0, 24, .6);
    color: #eadeff
}

.btn.primary {
    background: linear-gradient(90deg, var(--primary-strong), var(--accent));
    color: #0a0014;
    box-shadow: 0 0 12px rgba(255, 51, 255, .45)
}

/* 轻水印（基础防抄袭，可关闭） */
.wm {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .08;
    background-image: repeating-linear-gradient(45deg, transparent 0 40px, rgba(178, 108, 255, .35) 40px 41px), repeating-linear-gradient(-45deg, transparent 0 40px, rgba(255, 51, 255, .35) 40px 41px);
}

/* 限制选择复制（表单除外） */
.no-select {
    user-select: none
}

.no-select input, .no-select textarea {
    user-select: text
}

/* 顶部主按钮（导航 / 关于合并版） */
.nav-main-btn {
    color: #0a0014 !important;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--primary-strong), var(--accent));
    box-shadow: 0 0 14px rgba(255, 51, 255, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    position: relative;
    overflow: hidden;
}

/* hover 发光 */
.nav-main-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(255, 51, 255, .75);
}

/* 轻微流光效果 */
.nav-main-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            120deg,
            transparent 30%,
            rgba(255, 255, 255, .35),
            transparent 70%
    );
    transform: translateX(-120%);
    transition: .6s ease;
}

.nav-main-btn:hover::after {
    transform: translateX(120%);
}

.brand-logo {
    height: 40px;
    background: transparent;
}

.marquee-wrap {
    width: 100%;
    overflow: hidden;
    background: rgba(10, 10, 20, 0.9);
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}

.marquee {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: marqueeMove 12s linear infinite;
}

.coin-icon {
    display: inline-flex;
    align-items: center;
    margin: 0 12px;
    filter: drop-shadow(0 0 6px #ffd700);
}

.marquee-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;

    /* 霓虹灯发光效果 */
    text-shadow: 0 0 5px #ff00ff,
    0 0 10px #ff00ff,
    0 0 20px #00ffff,
    0 0 40px #00ffff;
}

@keyframes marqueeMove {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}
