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

/* 主容器调整 */
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 6px;
    }

    /* 手机端只显示：游戏名称(1)、开区时间(2)、详细介绍(7)，隐藏其余列 */
    .top-table th:nth-child(3),
    .top-table th:nth-child(4),
    .top-table th:nth-child(5),
    .top-table th:nth-child(6),
    .top-table td:nth-child(3),
    .top-table td:nth-child(4),
    .top-table td:nth-child(5),
    .top-table td:nth-child(6),
    .normal-table th:nth-child(3),
    .normal-table th:nth-child(4),
    .normal-table th:nth-child(5),
    .normal-table th:nth-child(6),
    .normal-table td:nth-child(3),
    .normal-table td:nth-child(4),
    .normal-table td:nth-child(5),
    .normal-table td:nth-child(6) {
        display: none;
    }

    /* 手机端重新分配列宽：游戏名称50%、开区时间30%、详细介绍20% */
    .top-table th:nth-child(1),
    .normal-table th:nth-child(1),
    .top-table td:nth-child(1),
    .normal-table td:nth-child(1) {
        width: 50% !important;
    }
    .top-table th:nth-child(2),
    .normal-table th:nth-child(2),
    .top-table td:nth-child(2),
    .normal-table td:nth-child(2) {
        width: 30% !important;
    }
    .top-table th:nth-child(7),
    .normal-table th:nth-child(7),
    .top-table td:nth-child(7),
    .normal-table td:nth-child(7) {
        width: 20% !important;
    }

    .top-table th,
    .normal-table th,
    .top-table td,
    .normal-table td {
        padding: 9px 4px;
        font-size: 13px;
    }

    /* 手机端显示状态标签（小尺寸） */
    .tag {
        display: inline-block;
        padding: 1px 5px;
        font-size: 11px;
        margin-right: 3px;
    }

    td.game-name {
        padding-left: 6px;
    }

    /* 游戏名称链接换行显示，避免截断 */
    .game-name a {
        word-break: break-all;
        white-space: normal;
    }

    /* 详细介绍按钮手机端也要清晰可点 */
    a.detail {
        display: inline-block;
        padding: 3px 6px;
        background: #1a1a1a;
        color: #49F18C !important;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
    }
    .top-table a.detail {
        background: rgba(0,0,0);
        color: #fff !important;
    }
}

/* ========== write.php 发布页面样式（从内联提取）========== */

/* 提示框样式 */
.custom-tip {
    display: none;
    position: absolute;
    top: 32px;
    left: 0;
    background: #4b5563;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 280px;
    max-width: 340px;
}
.custom-tip.show { display: block; }
.tip-row { padding: 4px 0; }
.tip-row + .tip-row {
    border-top: 1px solid #6b7280;
    margin-top: 4px;
    padding-top: 6px;
}

/* 发布限制提示卡片 */
.ad-limit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    flex-wrap: wrap;
}
.ad-limit-card.normal {
    background: rgba(156, 163, 175, 0.08);
    border: 1px solid rgba(156, 163, 175, 0.2);
    color: #c0c0c0;
}
.ad-limit-card.vip1 { background: rgba(213, 221, 223, 0.08); border: 1px solid rgba(213, 221, 223, 0.4); color: #c0c0c0; }
.ad-limit-card.vip2 { background: rgba(223, 209, 41, 0.08); border: 1px solid rgba(223, 209, 41, 0.6); color: #c0c0c0; }
.ad-limit-card.vip3 { background: rgba(0, 241, 219, 0.08); border: 1px solid rgba(0, 241, 219, 0.6); color: #c0c0c0; }
.ad-limit-card .vip-badge {
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}
.ad-limit-card .vip-badge.normal { background: #374151; color: #9ca3af; }
.ad-limit-card .vip-badge.vip1 { background: #d5dddf; color: #000000; }
.ad-limit-card .vip-badge.vip2 { background: #dfd129; color: #ff0000; }
.ad-limit-card .vip-badge.vip3 { background: #00f1db; color: #000000; }
.ad-limit-card .upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.25s;
    color: #ffffff;
}
.ad-limit-card .upgrade-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    opacity: 1;
}
.ad-limit-card .upgrade-link.normal { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #ffffff; }
.ad-limit-card .upgrade-link.vip1 { background: linear-gradient(135deg, #94a3b8, #475569); color: #ffffff; }
.ad-limit-card .upgrade-link.vip2 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ad-limit-card .upgrade-link.vip3 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ad-limit-card .limit-reached { color: #ffffff; font-weight: 700; }
.ad-limit-card.limit-exceeded { background: #ef4444 !important; border-color: #dc2626 !important; color: #ffffff !important; }
.ad-limit-card.limit-exceeded strong,
.ad-limit-card.limit-exceeded .vip-badge,
.ad-limit-card.limit-exceeded .upgrade-link { color: #ffffff !important; background: rgba(255,255,255,0.2) !important; }
.ad-limit-card .limit-ok { color: #22c55e; font-weight: 700; }
.ad-limit-card .limit-warn { color: #f59e0b; font-weight: 700; }

/* 游戏信息表单样式 */
.game-info-section {
    background: transparent;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #eef2f6;
}
.section-label {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    display: block;
    padding-bottom: 8px;
    border-bottom: 2px solid #2563eb;
}
.game-info-grid { display: flex; gap: 16px; margin-bottom: 16px; }
.game-info-grid .half { flex: 1; }
.datetime-group { display: flex; gap: 10px; }
.datetime-group input,
.datetime-group select { flex: 1; }
@media (max-width: 768px) {
    .game-info-grid { flex-direction: column; gap: 12px; }
    .datetime-group { flex-direction: column; }
}

/* 发布按钮样式 */
.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-publish-normal { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; }
.btn-publish-normal:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.btn-publish-top { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }
.btn-publish-top:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); }
.publish-hint { font-size: 12px; color: #64748b; margin: 6px 0 12px; text-align: center; }

/* 置顶设置区域 */
.top-settings {
    background: #000000;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 费用计算区域 */
.price-calc { background: #000; border-radius: 6px; padding: 12px; margin: 10px 0; }
.price-info, .price-total, .price-current { display: flex; justify-content: space-between; margin: 6px 0; }
.price-total { border-top: 1px dashed #e2e8f0; padding-top: 8px; margin-top: 8px; }
.total-value { color: #dc2626; font-size: 18px; font-weight: 700; }
.price-current {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 8px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -12px;
}
.current-label { color: #475569; font-weight: 500; }
.current-value { color: #16a34a; font-size: 16px; font-weight: 700; }

/* 注意：gt-article-item-simple 的完整样式已移至 archive.css，避免两处 !important 冲突 */
