/* ===================================================
   盼之代售 - 主样式表
   配色：主色 #FF6B00 辅色 #333 背景 #f5f5f5
   =================================================== */

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #333; text-decoration: none; transition: color 0.2s; }
a:hover { color: #FF6B00; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== Buttons ===== */
.btn {
    display: inline-block; padding: 10px 24px; border-radius: 4px;
    border: none; cursor: pointer; font-size: 14px; text-align: center;
    transition: all 0.2s; line-height: 1.4;
}
.btn-primary { background: #FF6B00; color: #fff; }
.btn-primary:hover { background: #e55d00; color: #fff; }
.btn-outline { background: transparent; color: #FF6B00; border: 1px solid #FF6B00; }
.btn-outline:hover { background: #FF6B00; color: #fff; }
.btn-danger { background: #f44336; color: #fff; }
.btn-danger:hover { background: #d32f2f; }
.btn-success { background: #4CAF50; color: #fff; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

/* ===== Site Header ===== */
.site-header {
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.logo-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: #FF6B00; color: #fff;
    border-radius: 8px; font-weight: bold; font-size: 14px;
}
.logo-text { font-size: 18px; font-weight: bold; color: #333; }
.main-nav { display: flex; gap: 2px; flex-wrap: nowrap; }
.nav-link {
    padding: 6px 10px; border-radius: 4px; font-size: 13px;
    transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.nav-link:hover, .nav-link.active { color: #FF6B00; background: #fff3eb; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-info { font-size: 13px; color: #666; max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #333; transition: all 0.3s; }

/* ===== Main Content ===== */
.site-main { flex: 1; }

/* ===== Banner ===== */
.banner-section { position: relative; overflow: hidden; background: #1a1a2e; }
.banner-slider { position: relative; height: 380px; }
.banner-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.6s; pointer-events: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #FF6B00 100%);
}
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide-content { text-align: center; color: #fff; }
.banner-slide-content h2 { font-size: 36px; margin-bottom: 10px; }
.banner-slide-content p { font-size: 18px; opacity: 0.9; }
.banner-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.banner-dot {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.3s;
}
.banner-dot.active { background: #fff; transform: scale(1.3); }

/* ===== Search Section ===== */
.search-section { padding: 30px 0; background: #fff; border-bottom: 1px solid #eee; }
.search-form { display: flex; max-width: 600px; margin: 0 auto; }
.search-form input {
    flex: 1; padding: 14px 20px; border: 2px solid #FF6B00; border-right: none;
    border-radius: 4px 0 0 4px; font-size: 16px; outline: none;
}
.search-form input:focus { border-color: #e55d00; }
.search-form button {
    padding: 14px 30px; background: #FF6B00; color: #fff; border: none;
    border-radius: 0 4px 4px 0; cursor: pointer; font-size: 16px;
}
.search-form button:hover { background: #e55d00; }

/* ===== Section Title ===== */
.section-title {
    text-align: center; margin-bottom: 30px;
}
.section-title h2 { font-size: 28px; color: #333; margin-bottom: 8px; }
.section-title p { color: #999; font-size: 14px; }

/* ===== Game Categories ===== */
.game-section { padding: 50px 0; }
.game-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px;
}
.game-card {
    background: #fff; border-radius: 8px; padding: 20px 10px; text-align: center;
    transition: all 0.3s; cursor: pointer; border: 2px solid transparent;
}
.game-card:hover { border-color: #FF6B00; transform: translateY(-4px); box-shadow: 0 8px 25px rgba(255,107,0,0.15); }
.game-card .game-icon {
    width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; font-weight: bold;
}
.game-card .game-name { font-size: 14px; color: #333; font-weight: 500; }
/* Game icon colors */
.icon-wzry  { background: linear-gradient(135deg, #f093fb, #f5576c); }
.icon-ys    { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.icon-lol   { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.icon-yjjw  { background: linear-gradient(135deg, #fa709a, #fee140); }
.icon-hpjy  { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.icon-mhxy  { background: linear-gradient(135deg, #f6d365, #fda085); }
.icon-nsh   { background: linear-gradient(135deg, #667eea, #764ba2); }
.icon-dnf   { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.icon-jw3   { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.icon-cf    { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.icon-pubg  { background: linear-gradient(135deg, #d4fc79, #96e6a1); }
.icon-bhsr  { background: linear-gradient(135deg, #cc2b5e, #753a88); }
.icon-default { background: linear-gradient(135deg, #ddd, #bbb); }

/* ===== Latest Accounts ===== */
.accounts-section { padding: 50px 0; }
.account-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.account-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    transition: all 0.3s; border: 2px solid transparent;
}
.account-card:hover { border-color: #FF6B00; transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.account-card-image {
    height: 180px; background: #f0f0f0; display: flex; align-items: center;
    justify-content: center; color: #ccc; font-size: 48px; overflow: hidden;
}
.account-card-image img { width: 100%; height: 100%; object-fit: cover; }
.account-card-body { padding: 15px; }
.account-card-body .game-tag {
    display: inline-block; font-size: 12px; color: #FF6B00;
    background: #fff3eb; padding: 2px 8px; border-radius: 3px; margin-bottom: 8px;
}
.account-card-body h3 { font-size: 15px; margin-bottom: 8px; line-height: 1.4; height: 42px; overflow: hidden; }
.account-card-body .account-price { font-size: 20px; color: #FF6B00; font-weight: bold; }
.account-card-body .account-meta { font-size: 12px; color: #999; margin-top: 6px; display: flex; justify-content: space-between; }

/* ===== Transaction History ===== */
.transactions-section { padding: 50px 0; background: #fff; }
.transaction-scroll {
    overflow: hidden; padding: 10px 0;
}
.transaction-list {
    display: flex; gap: 0; animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}
.transaction-item {
    display: inline-flex; align-items: center; gap: 15px;
    padding: 10px 25px; background: #fafafa; margin-right: 15px;
    border-radius: 4px; flex-shrink: 0; font-size: 14px;
}
.transaction-item .game-name { color: #FF6B00; font-weight: 500; }
.transaction-item .price { color: #f44336; font-weight: bold; }
.transaction-item .phone { color: #999; }
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Auth Pages ===== */
.auth-section { padding: 60px 0; }
.auth-box {
    max-width: 420px; margin: 0 auto; background: #fff;
    padding: 40px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-box h2 { text-align: center; margin-bottom: 30px; font-size: 24px; color: #333; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #666; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; outline: none; transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #FF6B00; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #999; }
.auth-footer a { color: #FF6B00; }

/* ===== List Page ===== */
.list-section { padding: 30px 0; }
.list-layout { display: flex; gap: 25px; }
.list-sidebar { width: 240px; flex-shrink: 0; }
.list-main { flex: 1; }
.filter-box {
    background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 15px;
}
.filter-box h4 { font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.filter-group input,
.filter-group select { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { flex: 1; }
.price-range span { color: #999; font-size: 13px; }
.sort-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; padding: 12px 20px; border-radius: 8px; margin-bottom: 20px;
}
.sort-options { display: flex; gap: 15px; }
.sort-options a { font-size: 14px; color: #666; padding: 4px 0; border-bottom: 2px solid transparent; }
.sort-options a.active { color: #FF6B00; border-bottom-color: #FF6B00; }
.result-count { font-size: 13px; color: #999; }

/* ===== Detail Page ===== */
.detail-section { padding: 30px 0; }
.detail-box { background: #fff; border-radius: 8px; overflow: hidden; }
.detail-main { display: flex; gap: 30px; padding: 30px; }
.detail-gallery { width: 480px; flex-shrink: 0; }
.detail-gallery .main-image {
    width: 100%; height: 360px; border-radius: 8px; overflow: hidden;
    background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 64px;
}
.detail-gallery .main-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumb-list { display: flex; gap: 10px; margin-top: 10px; }
.detail-gallery .thumb {
    width: 80px; height: 60px; border-radius: 4px; overflow: hidden;
    cursor: pointer; background: #f0f0f0; border: 2px solid transparent; transition: border-color 0.2s;
}
.detail-gallery .thumb:hover, .detail-gallery .thumb.active { border-color: #FF6B00; }
.detail-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h2 { font-size: 22px; margin-bottom: 15px; line-height: 1.4; }
.detail-price { margin-bottom: 20px; }
.detail-price .current { font-size: 32px; color: #FF6B00; font-weight: bold; }
.detail-price .original { font-size: 16px; color: #999; text-decoration: line-through; margin-left: 10px; }
.detail-meta { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-meta-item { font-size: 14px; color: #666; }
.detail-meta-item strong { color: #333; }
.detail-actions { display: flex; gap: 12px; margin-bottom: 25px; }
.detail-desc { padding: 0 30px 30px; }
.detail-desc h3 { font-size: 18px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.detail-desc .desc-content { line-height: 2; color: #555; white-space: pre-wrap; }

/* ===== User Center ===== */
.user-section { padding: 30px 0; }
.user-layout { display: flex; gap: 25px; }
.user-sidebar { width: 200px; flex-shrink: 0; }
.user-main { flex: 1; }
.user-nav { background: #fff; border-radius: 8px; overflow: hidden; }
.user-nav a {
    display: block; padding: 14px 20px; font-size: 14px; border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}
.user-nav a:hover, .user-nav a.active { background: #fff3eb; color: #FF6B00; border-left: 3px solid #FF6B00; }
.user-panel { background: #fff; border-radius: 8px; padding: 30px; }
.user-panel h3 { font-size: 20px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.user-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px; }
.user-stat {
    background: #fafafa; padding: 20px; border-radius: 8px; text-align: center;
}
.user-stat .stat-num { font-size: 28px; font-weight: bold; color: #FF6B00; }
.user-stat .stat-label { font-size: 13px; color: #999; margin-top: 5px; }

/* ===== Table ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.data-table th { background: #fafafa; font-weight: 500; color: #666; }
.data-table tr:hover td { background: #fff9f5; }
.data-table .status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 3px; font-size: 12px;
}
.status-pending { background: #fff3e0; color: #e65100; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-sold { background: #e3f2fd; color: #1565c0; }
.status-off { background: #fafafa; color: #999; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }

/* ===== Admin ===== */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
    width: 220px; background: #2c2c2c; color: #ccc; flex-shrink: 0; padding-top: 10px;
}
.admin-sidebar a {
    display: block; padding: 14px 24px; color: #bbb; font-size: 14px; transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: #FF6B00; color: #fff;
}
.admin-main { flex: 1; padding: 30px; background: #f5f5f5; }
.admin-main h3 { font-size: 22px; margin-bottom: 20px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.admin-stat {
    background: #fff; padding: 25px; border-radius: 8px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.admin-stat .stat-num { font-size: 32px; font-weight: bold; color: #FF6B00; }
.admin-stat .stat-label { font-size: 14px; color: #999; margin-top: 8px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 30px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px; border-radius: 4px;
    font-size: 14px; border: 1px solid #ddd; background: #fff; color: #666;
    transition: all 0.2s;
}
.pagination a:hover { border-color: #FF6B00; color: #FF6B00; }
.pagination .page-current { background: #FF6B00; border-color: #FF6B00; color: #fff; }
.pagination .page-dots { border: none; background: none; }

/* ===== Flash Messages ===== */
.flash { padding: 15px 20px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; }
.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.flash-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.flash-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* ===== Footer ===== */
.site-footer { background: #2c2c2c; color: #bbb; padding: 40px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 15px; }
.footer-col p, .footer-col ul li { font-size: 13px; line-height: 2; }
.footer-bottom {
    margin-top: 30px; padding-top: 20px; border-top: 1px solid #444;
    text-align: center; font-size: 12px; color: #777; line-height: 2;
}

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 15px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb span { margin: 0 6px; }

/* ===== No Data ===== */
.no-data { text-align: center; padding: 60px 0; color: #999; }
.no-data .icon { font-size: 64px; margin-bottom: 15px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .game-grid { grid-template-columns: repeat(4, 1fr); }
    .account-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-main { flex-direction: column; }
    .detail-gallery { width: 100%; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .user-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .game-grid { grid-template-columns: repeat(3, 1fr); }
    .account-grid { grid-template-columns: repeat(2, 1fr); }
    .menu-toggle { display: flex; }
    .main-nav {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 10px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .main-nav.open { display: flex; }
    .header-actions { margin-left: auto; }
    .list-layout { flex-direction: column; }
    .list-sidebar { width: 100%; }
    .user-layout { flex-direction: column; }
    .user-sidebar { width: 100%; }
    .user-nav { display: flex; overflow-x: auto; }
    .user-nav a { flex-shrink: 0; white-space: nowrap; border-bottom: none; border-right: 1px solid #f0f0f0; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; overflow-x: auto; }
    .admin-sidebar a { flex-shrink: 0; white-space: nowrap; }
    .footer-grid { grid-template-columns: 1fr; }
    .banner-slider { height: 240px; }
    .banner-slide-content h2 { font-size: 24px; }
}

@media (max-width: 480px) {
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .account-grid { grid-template-columns: 1fr; }
    .auth-box { padding: 25px 20px; }
    .user-stats { grid-template-columns: 1fr 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}
