/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.6;
}

a { color: #4a90d9; text-decoration: none; transition: color 0.2s; }
a:hover { color: #2d7dcd; }

/* ========== 导航栏 ========== */
.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .logo .dot {
    width: 10px;
    height: 10px;
    background: #4ecca3;
    border-radius: 50%;
    display: inline-block;
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar .nav-links a {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* ========== 容器 ========== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========== 首页 Hero ========== */
.hero {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 60px 0;
}

.hero-info h1 {
    font-size: 36px;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.hero-info .subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
}

.hero-info .features {
    list-style: none;
    margin-bottom: 30px;
}

.hero-info .features li {
    padding: 6px 0;
    font-size: 15px;
    color: #555;
}

.hero-info .features li::before {
    content: "\2714";
    color: #4ecca3;
    font-weight: bold;
    margin-right: 8px;
}

.hero-info .btn-group {
    display: flex;
    gap: 15px;
}

.hero-screenshot {
    flex-shrink: 0;
    width: 400px;
    height: 280px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4f8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.hero-screenshot .placeholder {
    text-align: center;
    color: #999;
}

.hero-screenshot .placeholder .icon {
    font-size: 64px;
    margin-bottom: 10px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}
.btn-primary:hover { background: #2d7dcd; color: #fff; }

.btn-success {
    background: #4ecca3;
    color: #fff;
}
.btn-success:hover { background: #3db892; color: #fff; }

.btn-warning {
    background: #f0a050;
    color: #fff;
}
.btn-warning:hover { background: #e08940; color: #fff; }

.btn-outline {
    background: transparent;
    border: 2px solid #4a90d9;
    color: #4a90d9;
}
.btn-outline:hover { background: #4a90d9; color: #fff; }

.btn-large { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== 卡片 ========== */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.card h2 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* ========== 下载区 ========== */
.download-box {
    text-align: center;
    padding: 40px;
}

.download-box .file-icon {
    font-size: 72px;
    margin-bottom: 15px;
}

.download-box .file-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.download-box .file-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
}

.download-box .file-meta span {
    margin: 0 10px;
}

/* ========== 支付页 ========== */
.pay-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.pay-product {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.pay-product .price {
    font-size: 42px;
    color: #e74c3c;
    font-weight: bold;
    margin: 15px 0;
}

.pay-product .price .unit {
    font-size: 20px;
}

.pay-product .duration {
    color: #4ecca3;
    font-size: 18px;
    margin-bottom: 20px;
}

.pay-qr {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.pay-qr .qr-placeholder {
    width: 220px;
    height: 220px;
    margin: 0 auto 15px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 14px;
}

.pay-qr .qr-placeholder canvas {
    border-radius: 4px;
}

.pay-qr .order-info {
    text-align: left;
    max-width: 220px;
    margin: 0 auto;
    font-size: 14px;
}

.pay-qr .order-info .row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pay-qr .order-info .row:last-child { border-bottom: none; }

.pay-qr .countdown {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 10px;
}

.pay-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
}

.pay-status.waiting { background: #fff3e0; color: #e65100; }
.pay-status.success { background: #e8f5e9; color: #2e7d32; }
.pay-status.error { background: #ffebee; color: #c62828; }

/* ========== 输入框 ========== */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74,144,217,0.1);
}

/* ========== README 渲染 ========== */
.readme-content {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    line-height: 1.8;
    font-size: 15px;
}

.readme-content h1 { font-size: 28px; margin: 20px 0 15px; color: #1a1a2e; border-bottom: 2px solid #eee; padding-bottom: 8px; }
.readme-content h2 { font-size: 22px; margin: 25px 0 12px; color: #1a1a2e; }
.readme-content h3 { font-size: 18px; margin: 20px 0 10px; color: #333; }
.readme-content p { margin: 10px 0; }
.readme-content ul, .readme-content ol { margin: 10px 0 10px 30px; }
.readme-content li { margin: 5px 0; }
.readme-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    color: #c7254e;
}
.readme-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}
.readme-content pre code {
    background: none;
    color: #d4d4d4;
    padding: 0;
}
.readme-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.readme-content th, .readme-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}
.readme-content th { background: #f5f7fa; font-weight: bold; }
.readme-content blockquote {
    border-left: 4px solid #4a90d9;
    margin: 12px 0;
    padding: 8px 16px;
    background: #f5f7fa;
    color: #666;
}

/* ========== 底部 ========== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 25px 20px;
    font-size: 14px;
    margin-top: 40px;
}

.footer a { color: #4ecca3; }
.footer a:hover { color: #3db892; }

.footer .links {
    margin-bottom: 10px;
}

.footer .links a {
    margin: 0 15px;
}

/* ========== 提示框 ========== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-info { background: #e3f2fd; color: #1565c0; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-warning { background: #fff3e0; color: #e65100; }
.alert-error { background: #ffebee; color: #c62828; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .navbar { padding: 0 15px; }
    .navbar .nav-links { gap: 10px; }
    .navbar .nav-links a { font-size: 13px; padding: 6px 8px; }
    .hero { flex-direction: column; padding: 30px 0; }
    .hero-screenshot { width: 100%; height: 200px; }
    .pay-container { flex-direction: column; }
    .container { padding: 20px 15px; }
}
