/* 星际台球竞技场 - 管理后台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #0a0e27;
    color: #fff;
    min-height: 100vh;
}

/* 登录页 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f4b 100%);
}

.login-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    width: 400px;
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffd700;
    font-size: 24px;
}

.login-box input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.login-box input:focus {
    outline: none;
    border-color: #ffd700;
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 8px;
    color: #0a0e27;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,215,0,0.3);
}

/* 主布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    color: #ffd700;
    font-size: 18px;
}

.sidebar-header p {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    margin-top: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    background: rgba(255,215,0,0.1);
    border-left-color: #ffd700;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.nav-item span {
    font-size: 14px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.page-header p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,215,0,0.3);
}

.stat-card .label {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-bottom: 12px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #ffd700;
}

.stat-card .change {
    font-size: 12px;
    margin-top: 8px;
    color: rgba(255,255,255,0.4);
}

/* 操作区 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    width: 250px;
}

/* ✅ 修改：下拉框背景改为深色 */
.search-box select {
    padding: 10px 16px;
    background: #1a1f4b;           /* 深色背景 */
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
}

/* ✅ 新增：下拉选项样式 */
.search-box select option {
    background: #1a1f4b;           /* 选项背景深色 */
    color: #fff;                    /* 选项文字白色 */
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #0a0e27;
    font-weight: bold;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff3344 100%);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #2ed573 0%, #26d063 100%);
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, #1e90ff 0%, #0077ff 100%);
    color: #fff;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: rgba(255,255,255,0.08);
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}

.data-table tr:hover {
    background: rgba(255,255,255,0.03);
}

/* 钱包地址可复制样式 */
.wallet-copy {
    cursor: pointer;
    border-bottom: 1px dashed rgba(255,255,255,0.35);
    transition: color 0.2s;
}
.wallet-copy:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

/* 已操作行（复制过钱包地址） */
.data-table tr.row-copied {
    background: rgba(46, 213, 115, 0.12) !important;
    border-left: 3px solid #2ed573;
}
.data-table tr.row-copied:hover {
    background: rgba(46, 213, 115, 0.18) !important;
}

/* 连胜徽章可点击 */
.streak-link {
    text-decoration: none;
    display: inline-block;
}
.streak-link:hover span {
    background: rgba(255,118,117,0.4) !important;
    border-color: #ff4757 !important;
    box-shadow: 0 0 12px rgba(255,71,87,0.4);
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background: rgba(46,213,115,0.15);
    color: #2ed573;
}

.status-pending {
    background: rgba(255,170,0,0.15);
    color: #ffaa00;
}

.status-expired {
    background: rgba(255,71,87,0.15);
    color: #ff4757;
}

.status-confirming {
    background: rgba(30,144,255,0.15);
    color: #1e90ff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: rgba(255,215,0,0.2);
    border-color: #ffd700;
}

.pagination button.active {
    background: #ffd700;
    color: #0a0e27;
    font-weight: bold;
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #1a1f4b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 {
    margin-bottom: 24px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* 隐藏 */
.hidden {
    display: none !important;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-header h2,
    .nav-item span {
        display: none;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ==================== 导航徽章 ==================== */
.nav-badge {
    background: #ff4757;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.nav-badge.hidden {
    display: none;
}

/* ==================== 客服中心样式 ==================== */
.chat-layout {
    display: flex;
    height: calc(100vh - 200px);
    gap: 20px;
}

.chat-sidebar {
    width: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chat-sidebar-header h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.chat-sidebar-header span {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.chat-session-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-session-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 4px;
    position: relative;
}

.chat-session-item:hover {
    background: rgba(255,255,255,0.05);
}

.chat-session-item.active {
    background: rgba(255,215,0,0.1);
    border-left: 3px solid #ffd700;
}

.chat-session-item.unread {
    background: rgba(30,144,255,0.1);
}

.session-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.session-name {
    font-weight: 500;
    font-size: 14px;
}

.session-time {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.session-preview {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.chat-main {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-placeholder {
    text-align: center;
    color: rgba(255,255,255,0.3);
    margin-top: 40px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-message.player {
    align-self: flex-start;
}

.chat-message.admin {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.player .message-bubble {
    background: rgba(255,255,255,0.1);
    border-bottom-left-radius: 4px;
}

.chat-message.admin .message-bubble {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #0a0e27;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    gap: 12px;
}

.chat-input-area textarea {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    resize: none;
    font-family: inherit;
    font-size: 14px;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #ffd700;
}

.chat-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 40px;
}

/* 平台盈利页 - 深蓝色主题（与后台整体一致，不刺眼） */
#page-platform-profit {
    background: linear-gradient(180deg, #0d1526 0%, #122038 55%, #152a45 100%);
    margin: -30px;
    padding: 30px;
    min-height: calc(100vh - 60px);
    color: rgba(255, 255, 255, 0.88);
    border-radius: 0;
}

#page-platform-profit .page-header h1 {
    color: #90caf9;
}

#page-platform-profit .page-header p {
    color: rgba(144, 202, 249, 0.65);
}

#page-platform-profit .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(66, 133, 244, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#page-platform-profit .stat-card:hover {
    border-color: rgba(100, 181, 246, 0.45);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.12);
}

#page-platform-profit .stat-card .label {
    color: rgba(144, 202, 249, 0.75);
}

#page-platform-profit .stat-card .value {
    color: #64b5f6;
}

#page-platform-profit .stat-card .change {
    color: rgba(255, 255, 255, 0.45);
}

#page-platform-profit .action-bar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(66, 133, 244, 0.2);
}

#page-platform-profit .action-bar label,
#page-platform-profit .action-bar span {
    color: rgba(255, 255, 255, 0.75) !important;
}

#page-platform-profit .action-bar select,
#page-platform-profit .action-bar input[type="date"] {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 4px;
    color: #fff;
}

#page-platform-profit .data-table {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(66, 133, 244, 0.2);
}

#page-platform-profit .data-table th {
    background: rgba(33, 87, 150, 0.55);
    color: #bbdefb;
}

#page-platform-profit .data-table td {
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#page-platform-profit .data-table tr:hover {
    background: rgba(33, 150, 243, 0.08);
}

#page-platform-profit .data-table tfoot tr {
    background: rgba(33, 87, 150, 0.35) !important;
}

#page-platform-profit .data-table tfoot td {
    color: #90caf9;
    font-weight: bold;
    border-bottom: none;
}

#page-platform-profit .profit-stats-grid {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1400px) {
    #page-platform-profit .profit-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #page-platform-profit .profit-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
