/* ========== 首页游戏广告表格样式 ========== */

/* 主容器调整 */
main.main > .main-inner > .main-inner-content {
    overflow: visible !important;
    padding: 0 !important;
}

/* ========== 表格基础 ========== */
.game-table-wrapper {
    width: 100%;
}

.top-table,
.normal-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
    border: 1px solid #444;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    table-layout: fixed;
}

.top-table th,
.normal-table th,
.top-table td,
.normal-table td {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表头 */
.top-table th,
.normal-table th {
    background: #272525;
    color: #fff;
    padding: 10px 4px;
    font-weight: bold;
    border: 1px solid #444;
}

.top-table th:nth-child(1),
.normal-table th:nth-child(1) { width: 16%; }
.top-table th:nth-child(2),
.normal-table th:nth-child(2) { width: 10%; }
.top-table th:nth-child(3),
.normal-table th:nth-child(3) { width: 8%;  }
.top-table th:nth-child(4),
.normal-table th:nth-child(4) { width: 42%; }
.top-table th:nth-child(5),
.normal-table th:nth-child(5) { width: 9%; }
.top-table th:nth-child(6),
.normal-table th:nth-child(6) { width: 9%; }
.top-table th:nth-child(7),
.normal-table th:nth-child(7) { width: 6%;  }

.top-table tr.top td {
    background: #49F18C;
    color: #000;
    border: 1px solid #255033;
    padding: 4px 4px;
}
.top-table tr.top:hover td {
    background: #366b48;
}

.normal-table tr.normal td {
    background: #e8e0c8;
    color: #222;
    border: 1px solid #c8c0a0;
    padding: 4px 4px;
}
.normal-table tr.normal:hover td {
    background: #ddd5b8;
}

.gap {
    height: 3px;
}

td.game-name {
    text-align: left !important;
    padding-left: 8px;
}
.game-name a {
    color: #000;
    text-decoration: none;
    font-weight: normal;
}
.normal-table .game-name a:hover {
    color: #49F18C;
}
.top-table .game-name a {
    color: #000000;
}

a.detail {
    color: #222;
    text-decoration: none;
}
.top-table a.detail {
    color: #000;
}
a.detail:hover {
    text-decoration: underline;
}

/* ========== QQ 字体 ========== */
.qq {
    font-family: Arial, sans-serif;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 4px;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes glowing {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.tag-top {
    background: #ff0000;
    position: relative;
    color: transparent !important;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 18px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.4);
}

.tag-top::after {
    content: '超级置顶';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    background-image: linear-gradient(202deg, #FF0000, #FF7F00, #f9f917, #00FF00, #0000FF, #4B0082, #8B00FF);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glowing 1s linear infinite;
    pointer-events: none;
}

.tag-today {
    background: #dc2626;
    color: #fff;
    font-weight: bold;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
}
.tag-tomorrow {
    background: #f97316;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.4);
}
.tag-dayafter {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}
.tag-waiting {
    background: #6b7280;
    color: #fff;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.4);
}
.tag-opened {
    background: #374151;
    color: #fff;
    box-shadow: 0 2px 4px rgba(55, 65, 81, 0.4);
}
.tag-expired {
    display: none;
}

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

.post-ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gt-main-color, #3b82f6);
    font-weight: 500;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.post-ad-btn:hover {
    background: var(--gt-main-color-10, rgba(59, 130, 246, 0.1));
}
.post-ad-btn i {
    font-size: 16px;
}
.post-ad-text {
    font-size: 14px;
}
@media (max-width: 768px) {
    .post-ad-text {
        display: none;
    }
}

.home-ad-item {
    width: 100%;
    margin-bottom: 3px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.home-ad-link {
    display: block;
    width: 100%;
}
.home-ad-image {
    width: 100%;
    height: auto;
    display: block;
}
.home-ad-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.home-ad-placeholder:hover {
    opacity: 0.9;
}
.home-ad-empty {
    color: #fff;
    text-align: center;
    font-size: 16px;
}
.home-ad-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.home-ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-ad-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.home-ad-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.home-ad-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}
.home-ad-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}
.home-ad-modal-close:hover {
    background: #f0f0f0;
    color: #666;
}
.home-ad-modal-body {
    padding: 20px;
}
.ad-form-group {
    margin-bottom: 15px;
}
.ad-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}
.ad-form-group input,
.ad-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.ad-form-group input:focus,
.ad-form-group select:focus {
    outline: none;
    border-color: #49F18C;
}
.ad-form-group small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}
.ad-cost-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}
.ad-price-per-day {
    color: #666;
    font-size: 14px;
}
.ad-total-cost {
    font-size: 16px;
    color: #333;
}
.ad-total-cost strong {
    color: #e74c3c;
    font-size: 20px;
}
.ad-balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 6px;
}
.ad-balance {
    font-size: 16px;
    color: #2e7d32;
    font-weight: 500;
}
.btn-recharge {
    font-size: 12px;
    color: #49F18C;
    text-decoration: none;
}
.btn-recharge:hover {
    text-decoration: underline;
}
.ad-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.ad-form-actions .btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.ad-form-actions .btn:hover {
    opacity: 0.9;
}
.ad-form-actions .btn-secondary {
    background: #f0f0f0;
    color: #666;
}
.ad-form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.ad-login-required {
    text-align: center;
    padding: 30px 20px;
}
.ad-login-required p {
    color: #666;
    margin-bottom: 15px;
}
.ad-login-required .btn {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}
.ad-vip-info {
    margin-top: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}
.ad-vip-info .vip-status-line,
.ad-vip-info .vip-discount-line {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.ad-vip-info .ad-label {
    color: #666;
    font-size: 13px;
    width: 80px;
}
.ad-vip-info .vip-name {
    color: #d97706;
    font-weight: 700;
    font-size: 14px;
}
.ad-vip-info .discount-value {
    color: #dc2626;
    font-weight: 700;
    font-size: 14px;
}
.ad-vip-info .discount-calc-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.page-navigator {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
}
.page-navigator a,
.page-navigator span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}
.page-navigator a:hover {
    background: #49F18C;
    color: #fff;
}
.page-navigator .current {
    background: #1a1a2e;
    color: #fff;
}

@media (max-width: 768px) {
    .game-table-wrapper {
        padding: 0 10px;
    }
    .top-table th,
    .normal-table th,
    .top-table td,
    .normal-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    .tag {
        display: none;
    }
    td.game-name {
        padding-left: 8px;
    }
}
