/* 游戏直充网站样式 v3 - 新版设计 */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 顶部栏 */
.top-bar {
    background: #333;
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

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

.top-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
}

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

/* 头部 */
.main-header {
    background: #fff;
    padding: 15px 0;
    box-shadow: var(--shadow);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 25px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1f2937;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #374151;
}

/* 导航栏 */
.main-nav {
    background: #fff;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.main-nav .container {
    display: flex;
}

.main-nav a {
    color: #1f2937;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 15px;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    background: #f3f4f6;
}

/* Banner */
.banner-section {
    padding: 40px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-slider {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.banner-slider img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

/* 游戏区域 */
.games-section {
    padding: 30px 0;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-header h2 i {
    color: var(--danger-color);
}

.section-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 游戏网格 - 新版 */
.games-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.game-card-v2 {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-primary);
}

.game-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.game-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card-v2:hover .game-image img {
    transform: scale(1.05);
}

.game-name {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 8px;
}

/* 商品详情页 */
.product-detail {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.product-left {
    flex-shrink: 0;
}

.product-image {
    width: 300px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.product-right {
    flex: 1;
}

.product-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* 购买流程 */
.process-flow {
    margin-bottom: 25px;
}

.process-flow h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.flow-steps {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step i {
    width: 50px;
    height: 50px;
    background: #f0f7ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.step span {
    font-size: 12px;
    color: var(--text-secondary);
}

.step-arrow {
    color: #ccc;
}

/* 商品选项 */
.product-options h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-item {
    position: relative;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.option-item input {
    position: absolute;
    opacity: 0;
}

.option-item:hover {
    border-color: var(--primary-color);
}

.option-item.active {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.option-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.option-price {
    font-size: 12px;
    color: var(--danger-color);
}

/* 下单区域 */
.order-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

.section-title {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 25px;
}

.selected-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.selected-product img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.product-text .name {
    font-weight: 500;
    margin-bottom: 4px;
}

.product-text .spec {
    font-size: 13px;
    color: var(--text-secondary);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.quantity-control input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.total-price {
    font-size: 14px;
    color: var(--text-secondary);
}

.total-price .price-symbol {
    font-size: 18px;
    color: var(--danger-color);
}

.total-price .price-num {
    font-size: 28px;
    color: var(--danger-color);
    font-weight: bold;
}

/* 表单 */
.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.required {
    color: var(--danger-color);
}

/* 支付方式 */
.payment-options {
    display: flex;
    gap: 15px;
}

.payment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-item input {
    display: none;
}

.payment-item i {
    font-size: 20px;
}

.payment-item.active {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

/* 提交按钮 */
.form-actions {
    text-align: right;
}

.btn-submit-order {
    padding: 15px 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit-order:hover {
    background: var(--primary-hover);
}

/* 支付弹窗 */
.pay-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pay-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pay-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.pay-modal-header h3 {
    font-size: 15px;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

.pay-modal-body {
    padding: 20px;
    text-align: center;
}

.pay-amount {
    font-size: 28px;
    font-weight: bold;
    color: var(--danger-color);
    margin-bottom: 15px;
}

.qrcode-box {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
}

.qrcode-box img {
    width: 180px;
    height: 180px;
    display: block;
}

.qrcode-tip {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
}

.pay-info {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: left;
}

.pay-info p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pay-status {
    padding: 10px;
}

.status-text {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 14px;
}

.status-text.success {
    color: var(--secondary-color);
}

/* 底部 */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* 响应式 */
@media (max-width: 768px) {
    .search-box {
        width: 250px;
    }
    
    .product-detail {
        flex-direction: column;
    }
    
    .product-image {
        width: 100%;
        height: auto;
    }
    
    .games-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .order-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
