:root {
    --primary-color: #1090ff;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --text-color: #333;
    --spacing: 1rem;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo-link {
    color: white;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-link i {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.45rem 0.65rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--accent-color);
}

.nav-mall {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(145deg, #4dabf7 0%, #1971c2 55%, #0d5a9c 100%);
    color: #fff !important;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.nav-mall:hover {
    color: #fff !important;
    background: linear-gradient(145deg, #74c0fc 0%, #2284c8 55%, #0f6ab8 100%);
}

main {
    flex: 1;
    padding: 2rem 0 3rem;
}

.page-title {
    font-size: 1.85rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-lead {
    color: #555;
    margin-bottom: 1.75rem;
    max-width: 720px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h2 i {
    color: var(--accent-color);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.tool-card h3 i {
    color: var(--accent-color);
}

.tool-card p {
    font-size: 0.95rem;
    color: #666;
}

.pricing-box {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.pricing-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.pricing-box ul {
    margin: 0.5rem 0 0 1.25rem;
    color: #444;
}

.pay-qrcode-block {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
    margin-top: 1.25rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.pay-qrcode-block h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pay-qrcode-block h3 i {
    color: var(--accent-color);
}

.pay-qrcode-intro {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    max-width: 640px;
}

.pay-qrcode-inner {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
}

.pay-qrcode-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(12px) scale(0.96);
    filter: blur(4px);
    transition:
        max-height 0.55s cubic-bezier(0.34, 1.2, 0.64, 1),
        opacity 0.45s ease,
        transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1),
        filter 0.4s ease;
    pointer-events: none;
}

.pay-qrcode-panel.is-open {
    max-height: 1200px;
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
    margin-top: 1rem;
}

.pay-qrcode-inner-reveal {
    padding-bottom: 0.5rem;
    perspective: 800px;
}

.pay-qrcode-panel.is-open .pay-qrcode-img {
    animation: payQrPop 0.55s cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

@keyframes payQrPop {
    0% {
        opacity: 0;
        transform: rotateX(8deg) scale(0.92);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    100% {
        opacity: 1;
        transform: rotateX(0) scale(1);
        box-shadow: 0 12px 32px rgba(16, 144, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

.pay-reveal-ico {
    display: inline-block;
}

.pay-reveal-btn--loading .pay-reveal-ico {
    animation: paySpin 0.7s linear infinite;
}

.pay-reveal-btn--loading .pay-reveal-text::after {
    content: "…";
}

@keyframes paySpin {
    to {
        transform: rotate(360deg);
    }
}

.pay-qrcode-img {
    max-width: min(400px, 92vw);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.pricing-box .cta-row {
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: opacity 0.2s, transform 0.15s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.file-input-wrap {
    margin: 1rem 0;
}

.file-input-wrap input[type="file"] {
    max-width: 100%;
}

.control-row {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.control-row label {
    font-weight: 500;
    min-width: 5rem;
}

.preview-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-box {
    text-align: center;
}

.preview-box span {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.35rem;
}

.preview-box canvas,
.preview-box img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: repeating-conic-gradient(#e8e8e8 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.note {
    font-size: 0.88rem;
    color: #666;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff9e6;
    border-radius: 6px;
    border-left: 4px solid #f0ad4e;
}

footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1.25rem 0;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
}

footer a {
    color: inherit;
    text-decoration: none;
}

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

/* 下载前收款码弹层 */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pay-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.pay-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 35, 55, 0.5);
    backdrop-filter: blur(3px);
}

.pay-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 1.35rem 1.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(16px) scale(0.96);
    transition: transform 0.32s cubic-bezier(0.34, 1.15, 0.64, 1);
}

.pay-modal.is-open .pay-modal-box {
    transform: translateY(0) scale(1);
}

.pay-modal-x {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-size: 1.55rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.15s, color 0.15s;
}

.pay-modal-x:hover {
    background: #f0f3f6;
    color: #333;
}

.pay-modal-title {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    padding-right: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pay-modal-title i {
    color: var(--accent-color);
}

.pay-modal-hint {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.85rem;
    line-height: 1.55;
}

.pay-modal-img-wrap {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 0.65rem;
}

.pay-modal-img {
    max-width: min(300px, 88vw);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.pay-modal-more {
    font-size: 0.82rem;
    color: #888;
    text-align: center;
    margin-bottom: 1rem;
}

.pay-modal-more a {
    color: var(--primary-color);
    font-weight: 600;
}

.pay-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
}
