/* GAME 新世界 - 样式表 */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e1b4b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    padding-bottom: 80px;
}

/* 状态栏 */
.status-bar {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #4ade80;
}

.status-dot.deal {
    background: #fbbf24;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 头部 */
.header {
    background: var(--gradient-primary);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text h1 {
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.logo-text p {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: none;
    background: rgba(255,255,255,0.15);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.25);
}

.btn-login {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: white;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 搜索栏 */
.search-section {
    background: var(--gradient-primary);
    padding: 0 16px 20px;
}

.search-box {
    background: white;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    padding: 4px;
    box-shadow: var(--shadow-lg);
}

.search-icon {
    padding: 0 12px;
    font-size: 18px;
    color: var(--gray-400);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 8px;
    font-size: 15px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.btn-search {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* 快捷入口 */
.quick-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s;
}

.action-card.primary {
    background: var(--gradient-primary);
    color: white;
}

.action-card.secondary {
    background: var(--gradient-secondary);
    color: white;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.action-text {
    flex: 1;
}

.action-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.action-text p {
    font-size: 13px;
    opacity: 0.9;
}

.action-arrow {
    font-size: 20px;
    opacity: 0.8;
}

/* 实时成交 */
.live-deals {
    background: white;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.live-badge {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.deals-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.deals-scroll::-webkit-scrollbar {
    display: none;
}

.deal-card {
    min-width: 200px;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 12px;
    border-left: 3px solid var(--success);
}

.deal-game {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.deal-info {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.deal-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--danger);
}

.deal-time {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* 热门拍卖 */
.hot-auctions {
    background: white;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.view-all {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.auction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auction-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.auction-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.auction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.auction-game {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.game-name {
    font-weight: 600;
    font-size: 15px;
}

.game-requirement {
    font-size: 12px;
    color: var(--gray-500);
}

.countdown {
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.auction-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bid-info {
    display: flex;
    gap: 16px;
}

.bid-item {
    text-align: center;
}

.bid-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.bid-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

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

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

.bidder-count {
    font-size: 12px;
    color: var(--gray-500);
}

.bidder-count strong {
    color: var(--primary);
}

.btn-bid {
    padding: 8px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bid:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* 游戏分类 */
.game-categories {
    background: white;
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.category-item:hover {
    background: var(--gray-50);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 8px;
}

.category-name {
    font-size: 12px;
    color: var(--gray-700);
    text-align: center;
}

/* 担保服务 */
.guarantee-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    margin: 0 16px 16px;
    border-radius: var(--radius-lg);
    padding: 20px;
    color: white;
}

.guarantee-section h2 {
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.guarantee-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.guarantee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guarantee-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.guarantee-item span {
    font-size: 12px;
    opacity: 0.9;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 12px;
    text-decoration: none;
    color: var(--gray-400);
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.nav-text {
    font-size: 11px;
}

.nav-publish {
    background: var(--gradient-primary);
    color: white !important;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-top: -20px;
    box-shadow: var(--shadow-lg);
}

.nav-publish .nav-icon {
    font-size: 28px;
    margin-bottom: 0;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-range input {
    flex: 1;
}

.price-range span {
    color: var(--gray-400);
}

.tag-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag:hover {
    background: var(--gray-200);
}

.tag.active {
    background: var(--primary);
    color: white;
}

.deposit-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 16px;
    border-radius: var(--radius);
}

.deposit-icon {
    font-size: 32px;
}

.deposit-text p {
    font-size: 14px;
    color: var(--gray-800);
}

.deposit-sub {
    font-size: 12px !important;
    color: var(--gray-500) !important;
    margin-top: 2px;
}

/* 按钮 */
.btn-primary {
    flex: 1;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    padding: 14px 24px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* 响应式 */
@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: var(--shadow-xl);
    }
    
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

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

.auction-card,
.deal-card,
.category-item {
    animation: fadeIn 0.5s ease forwards;
}