/**
 * GamsGo Theme - Complete Style System
 * 模块化CSS样式文件
 * 用于所有paidaxing模板页面
 */

/* ============ CSS Variables ============ */
:root {
    --gamsgo-red: #ff6b6b;
    --gamsgo-red-dark: #e85555;
    --gamsgo-red-light: #ff8585;
    --gamsgo-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    --gamsgo-bg: #f8f9fa;
    --gamsgo-white: #ffffff;
    --gamsgo-text: #333333;
    --gamsgo-text-light: #666666;
    --gamsgo-text-muted: #999999;
    --gamsgo-border: #e8e8e8;
    --gamsgo-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --gamsgo-radius: 16px;
}

/* ============ Base Reset ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--gamsgo-bg);
    color: var(--gamsgo-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============ Header ============ */
.gamsgo-header {
    background: var(--gamsgo-white);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--gamsgo-red);
    flex-shrink: 0;
}

.logo span {
    color: var(--gamsgo-text);
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 20px 10px 45px;
    border: 2px solid var(--gamsgo-border);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--gamsgo-red);
}

.search-box::before {
    content: "\f002";
    font-family: FontAwesome;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gamsgo-text-muted);
}

.search-box button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gamsgo-gradient);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.header-btn.outline {
    border: 2px solid var(--gamsgo-red);
    background: transparent;
    color: var(--gamsgo-red);
}

.header-btn.primary {
    background: var(--gamsgo-gradient);
    color: white;
    border: none;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ============ Hero Banner ============ */
.hero-banner {
    background: var(--gamsgo-white);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gamsgo-red);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--gamsgo-text-light);
}

/* ============ Category Navigation ============ */
.category-nav {
    background: var(--gamsgo-white);
    padding: 20px;
    margin: 0 20px 20px;
    border-radius: var(--gamsgo-radius);
    box-shadow: var(--gamsgo-shadow);
}

.category-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 10px;
    border-radius: 12px;
    min-width: 80px;
}

.category-item:hover,
.category-item.active {
    background: #fff5f5;
}

.category-item.active {
    border: 2px solid var(--gamsgo-red);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gamsgo-text);
}

.category-item.active .category-name {
    color: var(--gamsgo-red);
}

/* ============ Products Grid ============ */
.products-section {
    padding: 0 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 1fr;
}

/* ============ Product Card ============ */
.product-card {
    background: var(--gamsgo-white);
    border-radius: var(--gamsgo-radius);
    overflow: hidden;
    box-shadow: var(--gamsgo-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Card Header Colors */
.card-header {
    background: var(--gamsgo-gradient);
    padding: 16px;
    color: white;
    position: relative;
}

.card-header.green {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
}

.card-header.blue {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
}

.card-header.purple {
    background: linear-gradient(135deg, #722ed1 0%, #9254de 100%);
}

.card-header.orange {
    background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
}

.card-header.cyan {
    background: linear-gradient(135deg, #13c2c2 0%, #36cfc9 100%);
}

.card-header.pink {
    background: linear-gradient(135deg, #eb2f96 0%, #f759ab 100%);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.product-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card Body */
.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-meta {
    font-size: 12px;
    color: var(--gamsgo-text-muted);
    margin-bottom: 12px;
}

/* 用户购买信息 - GamsGo风格 */
.product-user-info {
    font-size: 12px;
    color: var(--gamsgo-text-muted);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gamsgo-border);
}

/* 价格区域 - 优化版 */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 8px;
}

.product-price .currency {
    font-size: 18px;
    font-weight: 700;
    color: var(--gamsgo-text);
}

.product-price .price-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gamsgo-text);
    line-height: 1;
}

.product-price .unit {
    font-size: 14px;
    color: var(--gamsgo-text-muted);
    font-weight: 400;
    margin-left: 2px;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    margin-top: auto;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gamsgo-text-light);
    margin-bottom: 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-list li::before {
    content: "✓";
    color: var(--gamsgo-red);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 11px;
}

/* Card Footer */
.card-footer {
    padding: 0 16px 16px;
    margin-top: auto;
}

.buy-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--gamsgo-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.buy-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.buy-btn.soldout {
    background: #ccc;
    cursor: not-allowed;
}

.detail-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--gamsgo-text-light);
    transition: color 0.2s;
}

.detail-link:hover {
    color: var(--gamsgo-red);
}

/* ============ Features Section ============ */
.features-section {
    background: var(--gamsgo-white);
    padding: 60px 20px;
    margin-top: 40px;
}

.features-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 50px;
}

.features-title span {
    color: var(--gamsgo-red);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: #fff5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: var(--gamsgo-red);
}

.feature-icon i {
    font-size: 20px;
}

.feature-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gamsgo-text);
}

.feature-content p {
    font-size: 13px;
    color: var(--gamsgo-text-muted);
    line-height: 1.5;
}

/* ============ Stats Section ============ */
.stats-section {
    background: var(--gamsgo-bg);
    padding: 50px 20px;
    text-align: center;
}

.stats-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--gamsgo-text);
}

.stats-number span {
    color: var(--gamsgo-red);
}

.stats-label {
    font-size: 18px;
    color: var(--gamsgo-text-light);
    margin-top: 8px;
}

/* ============ Dark Footer ============ */
.dark-footer {
    background: #1a1a2e;
    color: #a0a0a0;
    padding-top: 40px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 30px 0;
    border-bottom: 1px solid #2a2a4a;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: var(--gamsgo-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
}

.footer-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.footer-columns {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 50px 20px;
}

.footer-column h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #a0a0a0;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--gamsgo-red);
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.footer-badge {
    background: #2a2a4a;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #ccc;
}

.footer-payments {
    background: #0f0f1a;
    padding: 30px;
    text-align: center;
}

.payment-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.payment-icon {
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.footer-copyright {
    color: #666;
    font-size: 12px;
    line-height: 1.8;
}

.footer-copyright a {
    color: #888;
    text-decoration: underline;
}

/* ============ Float Button ============ */
.float-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
}

.float-btn a {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gamsgo-gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s;
}

.float-btn a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
}

/* ============ Notice Modal ============ */
.notice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.notice-modal.show {
    display: flex;
}

.notice-content {
    background: white;
    border-radius: var(--gamsgo-radius);
    width: 90%;
    max-width: 400px;
    max-height: 70vh;
    overflow: hidden;
}

.notice-header {
    background: var(--gamsgo-gradient);
    color: white;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 700;
}

.notice-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 50vh;
}

.notice-close {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    background: var(--gamsgo-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* ============ Loading ============ */
.loading-text {
    text-align: center;
    padding: 40px;
    color: var(--gamsgo-text-muted);
    grid-column: 1 / -1;
}

/* ============ Page-Specific: Buy Page ============ */
.gamsgo-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-card {
    background: var(--gamsgo-white);
    border-radius: var(--gamsgo-radius);
    box-shadow: var(--gamsgo-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.page-card-header {
    background: var(--gamsgo-gradient);
    color: white;
    padding: 20px;
}

.page-card-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gamsgo-text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gamsgo-border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--gamsgo-red);
}

.btn-primary {
    background: var(--gamsgo-gradient);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gamsgo-red);
    color: var(--gamsgo-red);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--gamsgo-red);
    color: white;
}

/* ============ Responsive Design ============ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 22px;
    }

    .category-list {
        gap: 15px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 10px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }
}

/* ============ Hide Old Elements ============ */
.fui-swipe,
.fui-notice,
.fui-searchbar,
.device,
.goods_sort,
.fui-goods-group,
.fui-navbar,
.footer {
    display: none !important;
}