* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    height: -webkit-fill-available;
}

body {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: #1a1a1a;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* ===== 主容器 ===== */
.game-container {
    width: 1072px;
    height: 449px;
    /* background: linear-gradient(135deg, #8b0000 0%, #dc143c 50%, #8b0000 100%); */
    background: url('psd/bg.png');
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
    position: relative;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></svg>');
    pointer-events: none;
}

/* ===== 左侧：服务器面板 ===== */
.server-panel {
    width: 282px;
    /* background: rgba(0, 0, 0, 0.4); */
    background: url('psd/server-panel.png');
    padding: 20px;
    overflow-y: auto;
    border-right: 2px solid rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.tree-node {
    margin-left: 0;
}

#server-tree {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin: 3px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #fff;
    font-size: 14px;
}

.tree-node-content:hover {
    background: rgba(255, 215, 0, 0.2);
}

.tree-node-content.selected {
    background: rgba(255, 215, 0, 0.3);
    border-left: 3px solid #ffd700;
}

.tree-icon {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.2s;
}

.tree-node.expanded > .tree-node-content .tree-icon {
    transform: rotate(90deg);
}

.tree-children {
    margin-left: 20px;
    display: none;
}

.tree-node.expanded > .tree-children {
    display: block;
}

.server-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.server-status.online {
    background: #00ff00;
    box-shadow: 0 0 6px #00ff00;
}

.server-status.busy {
    background: #ffaa00;
    box-shadow: 0 0 6px #ffaa00;
}

.server-status.offline {
    background: #666;
}

/* ===== 右侧主区域 ===== */
.main-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 顶部行：广告 + 公告 并排，高度与广告齐平 */
.top-row {
    display: flex;
    flex-shrink: 0;
    height: 287px;
}

.ad-box {
    width: 372px;
    height: 287px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ad-slide.active {
    opacity: 1;
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.ad-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.ad-dot.active {
    background: rgba(255, 255, 255, 0.95);
}

/* 登录区域（占满剩余宽度和高度） */
.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 0;
}

.login-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-label {
    height: 28px;
    width: 52px;
    flex-shrink: 0;
    object-fit: contain;
}

#confirm-password-row {
    justify-content: flex-end;
}

#confirm-password-row .field-label {
    width: auto;
}

.field-input-wrap {
    width: 208px;
    height: 26px;
    flex-shrink: 0;
    position: relative;
    background: url('psd/slk.png') no-repeat center center;
    background-size: 100% 100%;
}

.field-input-wrap input {
    width: 100%;
    height: 100%;
    padding: 0 10px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.field-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
}

/* 注册按钮 */
.register-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    transition: all 0.2s;
}

.register-btn img {
    height: 28px;
    width: auto;
    display: block;
}

.register-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.register-btn:active {
    transform: scale(0.98);
}

/* 开始按钮列 */
.start-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.start-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.start-btn img {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 4px;
}

.start-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.start-btn:active {
    transform: scale(0.98);
}

/* 协议 */
.login-section .agreement-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.login-section .agreement-row input[type="checkbox"] {
    accent-color: #ffd700;
    width: 13px;
    height: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

.login-section .agreement-row a {
    color: #ffd700;
    text-decoration: none;
    font-size: 11px;
}

.login-section .agreement-row a:hover {
    text-decoration: underline;
}

/* ===== 公告面板 ===== */
.notice-panel {
    flex: 1;
    min-width: 0;
    border-left: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 40px;
    background: url('psd/gonggao.png') no-repeat center top;
    background-size: 100% auto;
}

.notice-header {
    flex-shrink: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 0;
    background: linear-gradient(90deg, rgba(139,0,0,0.8) 0%, rgba(180,20,20,0.9) 50%, rgba(139,0,0,0.8) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.4);
    letter-spacing: 3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.notice-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.25);
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 215, 0, 0.08);
    transition: all 0.2s;
    border-radius: 4px;
    margin-bottom: 2px;
}

.notice-item::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notice-item:nth-child(1)::before { background: #ff0000; }
.notice-item:nth-child(2)::before { background: #ffcc00; }
.notice-item:nth-child(3)::before { background: #00ff00; }
.notice-item::before { background: #ffffff; }

.notice-item { color: #ffffff; }
.notice-item:nth-child(1) { color: #ff0000; }
.notice-item:nth-child(2) { color: #ffcc00; }
.notice-item:nth-child(3) { color: #00ff00; }


.notice-item:nth-child(odd) {
    background: rgba(255, 255, 255, 0.04);
}

.notice-item:nth-child(even) {
    background: rgba(0, 0, 0, 0.15);
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12) !important;
    transform: translateX(3px);
}

.notice-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-list::-webkit-scrollbar {
    width: 4px;
}

.notice-list::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 2px;
}

/* ===== 底部服务器信息 ===== */
.server-info-bar {
    margin-top: auto;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    flex-shrink: 0;
}

.server-info-bar span {
    color: #ffd700;
    font-weight: bold;
}

/* ===== 滚动条 ===== */
.server-panel::-webkit-scrollbar {
    width: 6px;
}

.server-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.server-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.server-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* ===== 实名认证弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: linear-gradient(135deg, #2a1a1a 0%, #1a0a0a 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    padding: 30px 35px;
    width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.modal-title {
    color: #ffd700;
    font-size: 20px;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

.modal-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.modal-box .form-group {
    margin-bottom: 14px;
    position: relative;
}

.modal-box .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
    font-size: 13px;
}

.modal-box .form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-box .form-input-wrap:focus-within {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

.modal-box .input-icon {
    width: 32px;
    text-align: center;
    color: rgba(255, 215, 0, 0.5);
    font-size: 14px;
    flex-shrink: 0;
}

.modal-box .form-group input {
    flex: 1;
    padding: 10px 10px 10px 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.modal-box .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.modal-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #ffd700 0%, #f0c000 100%);
    color: #8b0000;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
}

.modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}
