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

:root {
    --primary-color: #635bff;
    --secondary-color: #0a2540;
    --success-color: #00d924;
    --danger-color: #df1b41;
    --text-color: #1a1a1a;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    /* 移动端触摸优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(99, 91, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b83ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.language-switcher {
    display: flex;
    gap: 0.4rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.2);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #8b83ff);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.3);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #8b83ff);
    color: var(--white) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-hero {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Pricing Section */
.pricing {
    padding: 5rem 0;
}

.pricing h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.pricing-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(99, 91, 255, 0.15);
}

.currency-selector {
    margin-bottom: 1rem;
    text-align: left;
}

.currency-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.currency-selector select {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
    /* 移动端优化 */
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.currency-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.currency-selector input[type="number"] {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
    /* 移动端优化 */
    -webkit-appearance: none;
    appearance: none;
}

.currency-selector input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.currency-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.currency-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    /* 移动端触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.currency-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.15);
}

.currency-btn:active {
    transform: translateY(0);
}

.currency-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #8b83ff);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
    transform: translateY(0);
}

.currency-btn .currency-symbol {
    font-size: 1.5rem;
    font-weight: 700;
}

.currency-btn .currency-name {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.currency-btn.active .currency-symbol,
.currency-btn.active .currency-name {
    color: var(--white);
}

.price-tag {
    margin: 1rem 0;
}

.currency {
    font-size: 1.5rem;
    vertical-align: top;
    color: var(--text-light);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.period {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: -0.3rem;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-purchase {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.btn-purchase:hover {
    transform: scale(1.05);
}

/* Purchase Section */
.purchase {
    padding: 5rem 0;
    background: var(--bg-light);
}

.purchase h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.purchase-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.order-summary {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.order-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.product-info {
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.product-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.currency-note {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0.75rem 0;
    font-style: italic;
}

.total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Payment Form */
.payment-form {
    padding: 0.5rem 0;
}

.form-group {
    margin-bottom: 1.2rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    /* 移动端优化 */
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

#card-element {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
}

#card-element {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    transition: border-color 0.3s;
}

#card-element:focus,
#card-element.StripeElement--focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

#card-errors {
    color: var(--danger-color);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    /* 移动端触摸优化 */
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.btn-submit:hover:not(:disabled) {
    background: #5048e5;
    transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

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

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

.hidden {
    display: none !important;
}

.payment-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.payment-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid var(--success-color);
}

.payment-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--danger-color);
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.badge {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* 导航栏移动端优化 */
    .navbar {
        padding: 0.6rem 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 0.5rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .language-switcher {
        margin-left: 0.3rem;
        padding-left: 0.3rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .btn-primary {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }

    /* Hero区域移动端优化 */
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    .hero .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .btn-hero {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    /* 特性卡片移动端优化 */
    .features {
        padding: 3rem 0;
    }

    .features h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* 购买区域移动端优化 */
    .purchase {
        padding: 3rem 0;
    }

    .purchase h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .purchase-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
        border-radius: 10px;
    }
    
    .pricing-card {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    /* 货币选择器移动端优化 */
    .currency-buttons {
        gap: 0.6rem;
        margin-bottom: 1rem;
    }

    .currency-btn {
        padding: 0.7rem 0.5rem;
        min-width: 0;
        flex: 1;
    }

    .currency-symbol {
        font-size: 1.1rem;
    }

    .currency-name {
        font-size: 0.7rem;
    }

    /* 版本选择器移动端优化 */
    .version-selector {
        margin-bottom: 1rem;
    }

    .version-selector label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .version-selector select {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    /* 数量选择器移动端优化 */
    .quantity-selector {
        margin-bottom: 1rem;
    }

    .quantity-selector label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .quantity-selector input[type="number"] {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    /* 价格标签移动端优化 */
    .price-tag {
        margin: 1.2rem 0;
    }
    
    .currency {
        font-size: 1.1rem;
    }
    
    .amount {
        font-size: 2.2rem;
    }
    
    .period {
        font-size: 0.75rem;
        margin-top: -0.2rem;
    }

    /* 订单摘要移动端优化 */
    .order-summary {
        padding: 1.2rem;
        border-radius: 8px;
    }
    
    .order-summary h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .summary-item {
        padding: 0.7rem 0;
        font-size: 0.9rem;
    }

    .summary-total {
        padding-top: 0.8rem;
        margin-top: 0.8rem;
        font-size: 1rem;
    }
    
    /* 支付表单移动端优化 */
    .payment-form {
        padding: 1.2rem;
    }

    .payment-form h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    
    .form-group small {
        font-size: 0.8rem;
    }

    /* 卡片输入框移动端优化 - 防止缩放 */
    #card-element {
        padding: 0.7rem;
        font-size: 16px; /* 16px防止iOS自动缩放 */
        border-radius: 6px;
    }

    /* 提交按钮移动端优化 */
    .btn-submit {
        padding: 0.9rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
    }

    /* 错误提示移动端优化 */
    .card-errors {
        font-size: 0.85rem;
        padding: 0.6rem;
        margin-top: 0.6rem;
    }
    
    /* 特性列表移动端优化 */
    .pricing-features li {
        font-size: 0.85rem;
        padding: 0.65rem 0;
    }

    /* 页脚移动端优化 */
    footer {
        padding: 2rem 0;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        font-size: 0.8rem;
    }

    footer .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 超小屏幕优化（iPhone SE等） */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }

    .logo {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.4rem;
        font-size: 0.75rem;
    }

    .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero .subtitle {
        font-size: 0.85rem;
    }

    .btn-hero {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    .purchase-container {
        padding: 0.8rem;
        gap: 1.2rem;
    }

    .currency-btn {
        padding: 0.6rem 0.4rem;
    }

    .currency-symbol {
        font-size: 1rem;
    }

    .currency-name {
        font-size: 0.65rem;
    }

    .amount {
        font-size: 2rem;
    }

    .order-summary,
    .payment-form {
        padding: 1rem;
    }

    .btn-submit {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}
