/* =====================================================
   二次元 Anime 主题公共样式
   ===================================================== */

html {
    color-scheme: light;
}

:root {
    --anime-pink: #ff8fab;
    --anime-pink-deep: #f471b5;
    --anime-pink-light: #ffd6e0;
    --anime-purple: #9b5de5;
    --anime-violet: #a78bfa;
    --anime-blue: #7dd3fc;
    --anime-sky: #bae6fd;
    --anime-mint: #63e6be;
    --anime-cream: #fff9fb;
    --anime-white: #ffffff;
    --anime-text: #4a3b5c;
    --anime-text-light: #8b7aa8;
    --anime-border: #ffe3ec;
    --anime-grad-main: linear-gradient(135deg, #ff9a9e 0%, #fecfef 45%, #a18cd1 100%);
    --anime-grad-btn: linear-gradient(135deg, #ff8fab 0%, #c084fc 100%);
    --anime-grad-btn2: linear-gradient(135deg, #7dd3fc 0%, #a78bfa 100%);
    --anime-grad-btn3: linear-gradient(135deg, #63e6be 0%, #7dd3fc 100%);
    --anime-shadow: 0 12px 36px rgba(210, 120, 180, 0.22);
    --anime-shadow-soft: 0 6px 20px rgba(210, 120, 180, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Varela Round', 'ZCOOL KuaiLe', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ---------- 背景与漂浮装饰 ---------- */
body {
    background: linear-gradient(160deg, #ffe0ec 0%, #e9d5ff 40%, #dbeafe 100%);
    min-height: 100vh;
    color: var(--anime-text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 170, 200, 0.35) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(160, 140, 255, 0.3) 0%, transparent 42%),
        radial-gradient(circle at 75% 85%, rgba(125, 211, 252, 0.32) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 190, 220, 0.35) 0%, transparent 45%);
}

.petal-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -40px;
    border-radius: 80% 0 80% 0;
    opacity: 0.75;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(110vh) translateX(60px) rotate(540deg);
        opacity: 0;
    }
}

.spark {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    animation: sparkle ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.35;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---------- 导航栏 ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid var(--anime-border);
    border-radius: 999px;
    padding: 12px 26px;
    margin: 18px auto 30px;
    box-shadow: var(--anime-shadow-soft);
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--anime-pink-deep);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 10px rgba(255, 143, 171, 0.35);
}

.logo i {
    background: var(--anime-grad-btn);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
}

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

.nav-links a {
    color: var(--anime-text);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: linear-gradient(135deg, rgba(255, 143, 171, 0.2), rgba(167, 139, 250, 0.2));
    color: var(--anime-pink-deep);
    transform: translateY(-2px);
}

/* ---------- 头部 ---------- */
.header {
    text-align: center;
    margin-bottom: 34px;
    padding: 20px 10px;
}

.header h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(120deg, #f471b5 0%, #a78bfa 50%, #5ec9f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.header h1 i {
    background: linear-gradient(120deg, #ff8fab, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header p {
    font-size: 1.1rem;
    color: var(--anime-text-light);
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- 卡片 ---------- */
.card,
.app-selector,
.buy-options {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 2px solid var(--anime-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--anime-shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover,
.app-selector:hover,
.buy-options:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(210, 120, 180, 0.28);
}

.card-header {
    background: linear-gradient(135deg, #ffb3c6 0%, #c8b6ff 100%);
    color: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.6);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 2px 6px rgba(244, 113, 181, 0.35);
}

.card-header h2 i {
    background: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-body {
    padding: 26px;
}

.buy-options-header {
    background: linear-gradient(135deg, #b8f3ff 0%, #b9a7ff 100%);
    color: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.6);
}

/* ---------- 表单 ---------- */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--anime-text);
}

.form-group label i {
    color: var(--anime-pink-deep);
    margin-right: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--anime-border);
    border-radius: 16px;
    font-size: 1rem;
    color: var(--anime-text);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--anime-pink);
    box-shadow: 0 0 0 4px rgba(255, 143, 171, 0.18);
}

.form-control::placeholder {
    color: #c4b6d8;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f471b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    cursor: pointer;
}

/* ---------- 单选与支付方式 ---------- */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 226, 236, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-item:hover {
    background: rgba(255, 226, 236, 1);
    transform: scale(1.03);
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--anime-pink-deep);
}

.payment-methods {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.payment-method {
    flex: 1;
    text-align: center;
    padding: 16px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--anime-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    transform: translateY(-3px);
    box-shadow: var(--anime-shadow-soft);
}

.payment-method.active {
    border-color: var(--anime-pink);
    background: linear-gradient(135deg, rgba(255, 143, 171, 0.15), rgba(167, 139, 250, 0.15));
    box-shadow: 0 0 0 4px rgba(255, 143, 171, 0.15);
}

.payment-method i {
    font-size: 2.4rem;
    margin-bottom: 8px;
    display: block;
}

.payment-method.zfb i { color: #00a0e9; }
.payment-method.wx i { color: #09bb07; }
.payment-method.qq i { color: #12b7f5; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    flex: 1;
}

.btn-primary {
    background: var(--anime-grad-btn);
    color: #fff;
    box-shadow: 0 8px 24px rgba(244, 113, 181, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(244, 113, 181, 0.5);
    filter: brightness(1.05);
}

.btn-secondary {
    background: linear-gradient(135deg, #f3e8ff, #ffe4ec);
    color: var(--anime-text);
    box-shadow: 0 4px 14px rgba(210, 120, 180, 0.15);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(210, 120, 180, 0.25);
}

.btn-info {
    background: var(--anime-grad-btn2);
    color: #fff;
    box-shadow: 0 8px 24px rgba(125, 211, 252, 0.4);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(125, 211, 252, 0.5);
    filter: brightness(1.05);
}

.btn-success {
    background: var(--anime-grad-btn3);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 230, 190, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

/* ---------- 应用卡片 ---------- */
.app-card {
    background: linear-gradient(145deg, #ffffff 0%, #fff7fa 100%);
    border: 2px solid var(--anime-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--anime-shadow-soft);
    transition: all 0.35s ease;
    margin-bottom: 20px;
}

.app-card:hover {
    transform: translateY(-5px) rotate(-0.4deg);
    box-shadow: var(--anime-shadow);
    border-color: var(--anime-pink-light);
}

.app-card-header {
    background: linear-gradient(135deg, #ffb3c6 0%, #c8b6ff 100%);
    color: #fff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.6);
}

.app-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(200, 150, 255, 0.3);
}

.app-price {
    font-size: 1.4rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.92);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.app-card-body {
    padding: 20px;
}

.app-features {
    list-style: none;
    margin-bottom: 18px;
}

.app-features li {
    padding: 9px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed #ffe3ec;
    color: var(--anime-text);
}

.app-features li:last-child {
    border-bottom: none;
}

.app-features li i {
    color: var(--anime-pink-deep);
}

.app-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* ---------- 占位提示 ---------- */
.options-placeholder {
    text-align: center;
    color: var(--anime-text-light);
    padding: 34px 10px;
}

.options-placeholder i {
    font-size: 3rem;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ff8fab, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.options-placeholder h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--anime-text);
}

/* ---------- 购买指南 ---------- */
.options-container {
    padding: 24px;
}

.guide-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: rgba(255, 230, 240, 0.55);
    transition: all 0.3s ease;
}

.guide-item:hover {
    background: rgba(255, 230, 240, 0.95);
    transform: translateX(4px);
}

.guide-item h3 {
    font-size: 1.02rem;
    color: var(--anime-pink-deep);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.guide-item p {
    color: var(--anime-text-light);
    font-size: 0.92rem;
}

.support-info {
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 179, 198, 0.25), rgba(200, 182, 255, 0.25));
    border: 2px dashed var(--anime-pink-light);
}

.support-info h3 {
    color: var(--anime-pink-deep);
    margin-bottom: 8px;
}

.support-info p {
    color: var(--anime-text);
    font-size: 0.94rem;
    margin-bottom: 4px;
}

.support-info a {
    color: var(--anime-purple);
    font-weight: 600;
    text-decoration: none;
}

.support-info a:hover {
    text-decoration: underline;
}

/* ---------- 应用信息 ---------- */
.app-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 179, 198, 0.2), rgba(200, 182, 255, 0.2));
    border: 2px dashed var(--anime-pink-light);
}

.app-icon {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--anime-shadow-soft);
    border: 3px solid #fff;
}

.app-details h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: var(--anime-pink-deep);
}

.app-details p {
    color: var(--anime-text-light);
    margin-bottom: 3px;
    font-size: 0.95rem;
}

/* ---------- 页脚 ---------- */
.footer {
    text-align: center;
    margin-top: 40px;
    color: var(--anime-text-light);
    padding: 20px;
    font-size: 0.9rem;
}

.footer a {
    color: var(--anime-purple);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-selector,
.buy-options,
.card {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes floaty {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.hidden {
    display: none;
}

/* ---------- 卡密开通页特有样式 ---------- */
body.flat-blue {
    background: linear-gradient(160deg, #ffe0ec 0%, #e9d5ff 50%, #dbeafe 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

#submit_div {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 26px;
    width: 100%;
    max-width: 520px;
    margin: 20px;
    border-radius: 24px;
    border: 2px solid var(--anime-border);
    box-shadow: var(--anime-shadow);
    box-sizing: border-box;
    animation: fadeInUp 0.6s ease forwards;
}

.kami-info {
    background: linear-gradient(135deg, rgba(255, 179, 198, 0.25), rgba(200, 182, 255, 0.25));
    border: 2px dashed var(--anime-pink-light);
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    word-break: break-all;
}

.kami-info p {
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--anime-text);
}

.kami-info strong {
    color: var(--anime-pink-deep);
}

.submit-button {
    background: var(--anime-grad-btn);
    color: #fff;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(244, 113, 181, 0.4);
    margin-top: 6px;
    box-sizing: border-box;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(244, 113, 181, 0.5);
    filter: brightness(1.05);
}

.form-icon {
    position: absolute;
    right: 12px;
    top: 35px;
    color: var(--anime-pink-deep);
    font-size: 1rem;
}

.mdl-textfield__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--anime-text);
    font-size: 0.95rem;
}

/* ---------- Q版看板娘 ---------- */
.kanban {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: floaty 3.2s ease-in-out infinite;
    user-select: none;
}

/* 音乐徽章 */
.kanban-music-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8fab, #c084fc);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(244, 113, 181, 0.5);
    border: 3px solid #fff;
    font-size: 0.95rem;
    z-index: 2;
}

.kanban.music-playing .kanban-music-badge {
    animation: badgeSpin 1.6s ease-in-out infinite;
}

@keyframes badgeSpin {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.18) rotate(20deg);
    }
}

/* 播放时看板娘轻轻摇摆 */
.kanban.music-playing .kanban-img {
    animation: kanbanDance 0.9s ease-in-out infinite;
}

@keyframes kanbanDance {
    0%, 100% {
        transform: rotate(-3deg) translateY(0);
    }
    50% {
        transform: rotate(3deg) translateY(-4px);
    }
}

/* 播放时漂浮音符 */
.kanban-note {
    position: absolute;
    top: -8px;
    left: 10px;
    font-size: 1.4rem;
    color: var(--anime-pink-deep);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(255, 143, 171, 0.6);
}

.kanban.music-playing .kanban-note {
    animation: noteFloat 1.8s ease-in-out infinite;
}

@keyframes noteFloat {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.7) rotate(-8deg);
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-28px) scale(1.2) rotate(10deg);
    }
}

.kanban-bubble {
    background: #fff;
    border: 2px solid var(--anime-pink-light);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--anime-text);
    margin-bottom: 12px;
    box-shadow: var(--anime-shadow-soft);
    position: relative;
    max-width: 220px;
    text-align: center;
    line-height: 1.5;
    animation: bubbleIn 0.5s ease;
}

.kanban-bubble::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 11px solid var(--anime-pink-light);
}

.kanban-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #fff;
}

.kanban-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: var(--anime-shadow);
    background: linear-gradient(135deg, #ffd6e0, #e9d5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.kanban-img:hover {
    transform: scale(1.06);
}

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

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .kanban-img {
        width: 108px;
        height: 108px;
    }

    .kanban {
        right: 12px;
        bottom: 12px;
    }

    .kanban-bubble {
        max-width: 180px;
        font-size: 0.8rem;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .app-actions {
        flex-direction: column;
    }

    .payment-methods {
        flex-direction: column;
    }

    .header h1 {
        font-size: 1.7rem;
    }

    .navbar {
        border-radius: 20px;
    }
}
