/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 游戏头部样式 */
.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.game-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.game-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-icon-img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
}

.game-details h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* 主要内容区域 */
.main-content {
    max-width: 480px;
    margin: 0 auto;
    background: #f5f7fa;
}

/* 通用区域样式 */
section {
    background: white;
    margin: 0 0 10px 0;
    padding: 25px 20px;
}

section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* 商品选择区域 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 显示更多按钮容器 */
.show-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 15px;
}

.show-more-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.show-more-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.show-more-button:active {
    transform: translateY(0);
}

.product-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.product-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 16px;
    color: white;
    overflow: hidden;
}

.product-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    border-radius: 50%;
}

.product-icon-emoji {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
}

.product-card.selected .product-icon {
    background: rgba(255, 255, 255, 0.2);
}

.product-card.selected .product-icon-img {
    filter: brightness(1.2);
}

.product-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.product-card.selected .product-price {
    color: white;
}

.product-desc {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 3px;
}

.product-type {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
}

.product-card.selected .product-type {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 支付方式选择区域 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.payment-method.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.payment-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    border-radius: 6px;
}

.payment-method.selected .payment-icon {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.payment-method.selected .payment-icon-img {
    filter: brightness(1.1);
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

/* 支付方式显示更多按钮 */
.payment-methods .show-more-container {
    margin-top: 15px;
    text-align: center;
}

.payment-methods .show-more-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.payment-methods .show-more-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.payment-methods .show-more-button:active {
    transform: translateY(0);
}

/* 支付按钮区域 */
.payment-button-section {
    background: white;
    text-align: center;
    padding: 25px 20px;
    margin-bottom: 10px;
}

.pay-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pay-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pay-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 应用下载区域 */
.download-section {
    background: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 10px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-button {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 160px;
    flex: 0 1 auto;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-button.app-store {
    background: #000;
    color: white;
}

.download-button.app-store:hover {
    background: #333;
}

.download-button.google-play {
    background: #fff;
    color: #333;
}

.download-button.google-play:hover {
    background: #f8f9fa;
}

.download-icon {
    font-size: 24px;
    margin-right: 12px;
}

.download-text {
    text-align: left;
}

.download-label {
    font-size: 10px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.download-name {
    font-size: 14px;
    font-weight: 600;
}

/* 页脚 */
.footer {
    background: white;
    padding: 25px 20px;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.footer-section {
    flex: 1;
}

.company-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #667eea;
}

.footer-link i {
    font-size: 12px;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.footer-bottom p {
    font-size: 12px;
    color: #999;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-button:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.confirm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.confirm-item:last-child {
    border-bottom: none;
}

.confirm-item .label {
    font-weight: 500;
    color: #666;
}

.confirm-item .value {
    font-weight: 600;
    color: #333;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.cancel-button, .confirm-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button {
    background: #f8f9fa;
    color: #666;
}

.cancel-button:hover {
    background: #e9ecef;
}

.confirm-button {
    background: #667eea;
    color: white;
}

.confirm-button:hover {
    background: #5a6fd8;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .main-content {
        max-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .product-card {
        padding: 12px 8px;
    }
    
    .product-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .product-name {
        font-size: 11px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .product-desc {
        font-size: 9px;
    }
    
    .payment-icon {
        width: 35px;
        height: 35px;
    }
    
    .payment-icon-img {
        padding: 3px;
    }
    
    .game-info {
        gap: 15px;
    }
    
    .game-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .game-details h1 {
        font-size: 20px;
    }
    
    .download-buttons {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .download-button {
        min-width: 140px;
        flex: 0 1 auto;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .cancel-button,
    .confirm-button {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .product-card {
        padding: 10px 6px;
    }
    
    .product-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .product-name {
        font-size: 10px;
    }
    
    .product-price {
        font-size: 12px;
    }
    
    .product-desc {
        font-size: 8px;
    }
    
    .payment-icon {
        width: 30px;
        height: 30px;
    }
    
    .payment-icon-img {
        padding: 2px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .game-details h1 {
        font-size: 18px;
    }
    
    .download-buttons {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .download-button {
        min-width: 120px;
        padding: 10px 15px;
        flex: 0 1 auto;
    }
    
    .download-icon {
        font-size: 20px;
        margin-right: 8px;
    }
    
    .download-label {
        font-size: 8px;
    }
    
    .download-name {
        font-size: 12px;
    }
    
    .user-section {
        padding: 20px 15px;
    }
    
    .user-section h2 {
        font-size: 18px;
    }
    
    .user-input {
        max-width: 100%;
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .user-label {
        font-size: 15px;
    }
    
    .user-tip {
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .payment-method {
    animation: fadeIn 0.3s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 成功状态 */
.success {
    color: #28a745;
}

/* 错误状态 */
.error {
    color: #dc3545;
} 

/* 用户ID输入区域 */
.user-section {
    background: white;
    margin: 0 0 10px 0;
    padding: 25px 20px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
}

.user-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.user-input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.user-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-input::placeholder {
    color: #adb5bd;
}

.user-tip {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-tip::before {
    content: "💡";
    font-size: 14px;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.user-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    padding: 8px 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.user-error i {
    font-size: 14px;
}

.user-input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.user-input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.user-input.readonly {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.user-input.readonly:focus {
    border-color: #dee2e6;
    box-shadow: none;
    background: #f8f9fa;
}

.user-input.readonly::placeholder {
    color: #adb5bd;
}

/* Payment Partners Section */
.payment-partners {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.payment-partners p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stripe-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.stripe-logo:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stripe-logo svg {
    width: 60px;
    height: 25px;
}

.stripe-logo svg path {
    fill: #0A2540;
    transition: fill 0.3s ease;
}

.stripe-logo:hover svg path {
    fill: #1e40af;
}

/* Footer bottom content */
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Mobile responsive for payment partners */
@media (max-width: 480px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .payment-partners {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .stripe-logo {
        padding: 0.5rem 1rem;
    }

    .stripe-logo svg {
        width: 50px;
        height: 21px;
    }
} 