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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, sans-serif;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(circle at 20% 30%, #1b0e2e, #0b0719);
}

/* 背景动态粒子 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 15% 20%, rgba(255, 220, 240, 0.7), transparent),
        radial-gradient(3px 3px at 75% 45%, rgba(180, 230, 255, 0.8), transparent),
        radial-gradient(4px 4px at 40% 80%, rgba(255, 200, 150, 0.6), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(200, 180, 255, 0.7), transparent),
        radial-gradient(3px 3px at 10% 70%, rgba(255, 215, 215, 0.5), transparent),
        radial-gradient(5px 5px at 60% 30%, rgba(150, 200, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: twinkle 18s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.5; background-position: 0% 0%; }
    100% { opacity: 1; background-position: 100% 100%; }
}

/* 主卡片 */
.portal-card {
    position: relative;
    z-index: 10;
    max-width: 880px;
    width: 100%;
    background: rgba(22, 12, 45, 0.45);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: 64px 24px 64px 24px;
    padding: 2.8rem 2.8rem 3.2rem;
    box-shadow: 0 25px 50px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 200, 255, 0.2) inset, 0 0 30px rgba(200, 150, 255, 0.3);
    border: 1px solid rgba(255, 210, 255, 0.25);
    transition: all 0.3s ease;
    animation: floatGlow 6s infinite alternate ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translateY(0px) scale(1); box-shadow: 0 25px 50px -8px rgba(0, 0, 0, 0.8), 0 0 30px rgba(200, 150, 255, 0.3); }
    100% { transform: translateY(-10px) scale(1.01); box-shadow: 0 35px 60px -6px rgba(0, 0, 0, 0.9), 0 0 50px rgba(220, 180, 255, 0.6); }
}

/* 标题区 */
.title-section {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
    margin-bottom: 2rem;
    border-bottom: 2px dashed rgba(255, 180, 230, 0.4);
    padding-bottom: 1rem;
}

.title-main {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffb3e6, #ffd0b0, #b8d9ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(255, 180, 255, 0.4);
    line-height: 1.1;
    display: inline-block;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    position: relative;
}

.title-main::after {
    content: '✦';
    font-size: 2.8rem;
    background: none;
    color: #fbc2eb;
    margin-left: 8px;
    display: inline-block;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0% { opacity: 0.3; transform: rotate(0deg) scale(0.8); }
    50% { opacity: 1; transform: rotate(30deg) scale(1.2); }
    100% { opacity: 0.3; transform: rotate(0deg) scale(0.8); }
}

.title-sub {
    font-size: 1.1rem;
    font-weight: 400;
    color: #d9c9ff;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 1rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 200, 240, 0.2);
    backdrop-filter: blur(4px);
    margin-left: auto;
}

/* 分发网格 */
.distro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.8rem;
    margin: 2.2rem 0 2rem;
}

.distro-item {
    background: rgba(30, 18, 60, 0.5);
    backdrop-filter: blur(6px);
    border-radius: 40px 12px 40px 12px;
    padding: 1.6rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 210, 250, 0.15);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.distro-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.distro-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 180, 255, 0.6);
    box-shadow: 0 16px 32px -8px rgba(180, 80, 255, 0.4), 0 0 0 1px rgba(255, 200, 255, 0.3) inset;
    background: rgba(40, 24, 75, 0.7);
}

.distro-item:hover::before {
    opacity: 1;
}

.distro-icon {
    font-size: 3.6rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 8px rgba(255, 120, 200, 0.3));
    transition: transform 0.3s ease;
}

.distro-item:hover .distro-icon {
    transform: scale(1.1) rotate(4deg);
}

.distro-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f0e2ff, #ffd5e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 12px rgba(255, 150, 255, 0.2);
}

.distro-desc {
    font-size: 0.8rem;
    color: #b8a5d9;
    letter-spacing: 0.3px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 100, 200, 0.25);
    backdrop-filter: blur(4px);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 200, 240, 0.3);
    color: #ffe3f5;
    letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(255, 100, 200, 0.2);
}

/* 浮动装饰 */
.float-deco {
    position: absolute;
    font-size: 2rem;
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
    animation: floatAround 15s infinite alternate ease-in-out;
}

.deco1 { top: 5%; left: 3%; animation-delay: 0s; font-size: 3rem; opacity: 0.15; }
.deco2 { bottom: 8%; right: 2%; animation-delay: 2s; font-size: 4.5rem; opacity: 0.1; }
.deco3 { top: 15%; right: 8%; animation-delay: 4s; font-size: 2.2rem; opacity: 0.2; }
.deco4 { bottom: 20%; left: 5%; animation-delay: 1s; font-size: 2.8rem; opacity: 0.15; }

@keyframes floatAround {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(15px, -20px) rotate(8deg) scale(1.1); }
    66% { transform: translate(-10px, 15px) rotate(-5deg) scale(0.9); }
    100% { transform: translate(8px, -8px) rotate(3deg) scale(1.05); }
}

.action-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.2rem;
    padding-top: 1.8rem;
    border-top: 2px dotted rgba(255, 180, 220, 0.3);
    gap: 1.2rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 180, 240, 0.3);
    padding: 0.7rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    color: #f2e3ff;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    letter-spacing: 0.5px;
    border: none;
    font-family: inherit;
}

.action-btn:hover {
    background: rgba(255, 200, 255, 0.15);
    border-color: #ffb0e0;
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(200, 130, 255, 0.4);
    color: white;
}

.action-btn .emoji-big {
    font-size: 1.4rem;
    line-height: 1;
}

.footer-text {
    margin-top: 1.2rem;
    text-align: right;
    font-size: 0.7rem;
    color: #6b5199;
    letter-spacing: 3px;
    opacity: 0.6;
    border-top: 1px dashed rgba(255, 200, 240, 0.1);
    padding-top: 0.8rem;
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: rgba(30, 18, 60, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 48px 16px 48px 16px;
    padding: 2.8rem 3rem 3rem;
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(255, 210, 255, 0.25);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(200, 150, 255, 0.2);
    text-align: center;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.8rem;
    color: #b8a5d9;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}

.modal-close:hover {
    color: #ffb0e0;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f0e2ff, #ffd5e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.modal-sub {
    font-size: 0.85rem;
    color: #b8a5d9;
    margin-bottom: 1.8rem;
    letter-spacing: 1px;
}

.qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.qr-frame {
    position: relative;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    border: 2px solid rgba(255, 200, 240, 0.15);
    padding: 12px;
    box-shadow: 0 0 40px rgba(200, 150, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(21, 1fr);
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    position: relative;
}

.qr-placeholder .qr-cell {
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.qr-placeholder .qr-cell.dark {
    background: #d9c9ff;
    box-shadow: 0 0 6px rgba(200, 150, 255, 0.2);
}

.qr-placeholder .qr-cell.light {
    background: rgba(255, 255, 255, 0.03);
}

.qr-placeholder .qr-cell.corner {
    background: #b388ff;
    box-shadow: 0 0 12px rgba(180, 130, 255, 0.3);
}

.qr-scan-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c084fc, #f0abfc, #c084fc, transparent);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(200, 150, 255, 0.4);
    animation: scanMove 2.8s infinite ease-in-out;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes scanMove {
    0% { top: 12%; opacity: 0.2; }
    50% { top: 78%; opacity: 0.9; }
    100% { top: 12%; opacity: 0.2; }
}

.qr-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(22, 12, 45, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 0.3rem 0.6rem;
    font-size: 1.6rem;
    border: 1px solid rgba(255, 200, 240, 0.2);
    box-shadow: 0 0 30px rgba(200, 150, 255, 0.15);
    pointer-events: none;
    z-index: 2;
}

.modal-btn {
    background: linear-gradient(145deg, rgba(200, 120, 255, 0.25), rgba(255, 150, 200, 0.15));
    border: 1px solid rgba(255, 180, 240, 0.3);
    padding: 0.6rem 2.2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #f2e3ff;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    backdrop-filter: blur(4px);
    margin-top: 0.5rem;
}

.modal-btn:hover {
    background: rgba(255, 200, 255, 0.2);
    border-color: #ffb0e0;
    box-shadow: 0 0 30px rgba(200, 130, 255, 0.3);
    transform: scale(1.03);
}

/* 移动端 */
@media (max-width: 600px) {
    .portal-card {
        padding: 1.8rem 1.2rem 2.2rem;
        border-radius: 40px 12px 40px 12px;
    }
    .title-main {
        font-size: 2.4rem;
    }
    .title-main::after {
        font-size: 2rem;
    }
    .title-sub {
        font-size: 0.8rem;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    .distro-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .action-area {
        flex-direction: column;
        align-items: stretch;
    }
    .action-btn {
        justify-content: center;
        padding: 0.8rem;
    }
    .modal-box {
        padding: 2rem 1.5rem 2.2rem;
        border-radius: 32px 12px 32px 12px;
    }
    .qr-frame {
        width: 180px;
        height: 180px;
        padding: 8px;
    }
    .modal-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 420px) {
    .distro-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .qr-frame {
        width: 160px;
        hei
        padding: 6px;
    }
}

.distro-item:active {
    transform: scale(0.96);
}
