/* 三列网格布局容器 */
.grid-container {
    display: grid;
    grid-template-columns: 450px 400px 400px; /* 左侧容器稍宽，中间和右侧容器保持原宽度 */
    gap: 30px;
    padding: 30px;
    justify-content: center; /* 居中对齐 */
}

/* 左侧结果区域 */
.result-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    height: fit-content; /* 根据内容调整高度 */
}

/* 中间表单区域 */
.form-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    height: fit-content; /* 根据内容调整高度 */
}

/* 右侧详细信息区域 */
.detail-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    height: fit-content; /* 根据内容调整高度 */
}

/* MOTD显示容器 */
.motd-container {
    width: 100%;
    height: 120px;
    margin: 25px 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

/* 背景图片 */
.motd-background {
    width: 100%;
    height: 100%;
    background-image: url('../bejing.png');
    background-size: cover;
    background-position: center;
}

/* 半透明覆盖层 */
.motd-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* 左侧服务器图标 */
.motd-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ffffff;
}

.motd-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* 服务器信息区域 */
.motd-info {
    position: absolute;
    top: 18px;
    left: 120px;
    right: 170px;
    bottom: 18px;
}

/* 服务器地址 */
.motd-server-info {
    color: #00a1d6;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MOTD文本 */
.motd-text {
    color: white;
    font-size: 16px;
    line-height: 1.5;
    max-height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 右侧状态信息 */
.motd-status-panel {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 150px;
}

.motd-status {
    color: #00cc66;
    font-size: 16px;
    font-weight: 500;
    text-align: right;
    margin-bottom: 10px;
}

.motd-players {
    color: white;
    font-size: 16px;
    text-align: right;
    margin-bottom: 10px;
}

.motd-version {
    color: #cccccc;
    font-size: 14px;
    text-align: right;
}

/* 离线状态颜色 */
.status-offline {
    color: #ff3333 !important;
}

/* 错误状态颜色 */
.status-error {
    color: #ff9900 !important;
}

/* 嵌入代码容器 */
.embed-container {
    margin: 25px 0;
    padding: 20px;
    background: #f4f5f7;
    border-radius: 8px;
    display: none;
}

.embed-container h3 {
    margin-bottom: 20px;
    color: #212121;
    font-size: 1.3em;
}

.embed-code {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 18px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin-bottom: 20px;
    font-size: 16px;
}

.copy-btn {
    background: #00a1d6;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #00b5e5;
}

/* 页面标题区域 */
.page-header {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, #00a1d6, #00b5e5);
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 500;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 50px;
    display: none;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid #00a1d6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.loading p {
    color: #666;
    font-size: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误信息 */
.error-message {
    background: #fff2f2;
    color: #ff3333;
    padding: 20px;
    border-radius: 4px;
    margin: 25px 0;
    display: none;
    border: 1px solid #ffcccc;
    grid-column: 1 / -1;
    font-size: 16px;
}

footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 25px;
    color: #999;
    font-size: 1em;
    border-top: 1px solid #e5e9ef;
    background: #f4f5f7;
    border-radius: 8px;
    margin-top: 30px;
}

/* 玩家列表样式 */
.player-list-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e9ef;
}

.player-list-container h3 {
    margin-bottom: 20px;
    color: #212121;
    font-size: 1.3em;
    font-weight: 500;
}

.player-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.player-item {
    padding: 12px 15px;
    background: #f4f5f7;
    border: 1px solid #e5e9ef;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    font-size: 16px;
}

.player-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.player-name {
    font-weight: 500;
    color: #212121;
}

.player-id {
    color: #999;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* 服务器信息详情 */
.server-info {
    background: #f4f5f7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e9ef;
}

.info-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    width: 120px;
    color: #666;
    font-size: 16px;
}

.info-value {
    flex: 1;
    color: #212121;
    font-size: 16px;
}

.status-online {
    color: #00a1d6;
    font-weight: 600;
}

.status-offline {
    color: #ff6666;
    font-weight: 600;
}

.status-error {
    color: #ff9900;
    font-weight: 600;
}

.players-bar {
    height: 10px;
    background: #e5e9ef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 6px;
}

.players-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a1d6, #00b5e5);
    border-radius: 5px;
}

/* 尺寸自定义区域 */
.size-customization {
    background: #e5e9ef;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.size-customization h4 {
    margin-bottom: 15px;
    color: #212121;
    font-size: 1.1em;
}

.size-inputs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.size-inputs label {
    margin-bottom: 0;
    font-weight: normal;
    color: #666;
    font-size: 14px;
}

.size-inputs input {
    width: 80px;
    padding: 8px 10px;
    font-size: 14px;
}

.btn-small {
    background: #00a1d6;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-small:hover {
    background: #00b5e5;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .motd-container {
        height: 100px;
    }
    
    .motd-icon {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
        font-size: 40px;
    }
    
    .motd-info {
        left: 100px;
        top: 15px;
    }
    
    .motd-server-info {
        font-size: 16px;
    }
    
    .motd-text {
        font-size: 14px;
    }
    
    .motd-status-panel {
        width: 130px;
        top: 15px;
    }
    
    .motd-status, .motd-players {
        font-size: 14px;
    }
    
    .motd-version {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .grid-container {
        padding: 15px;
        gap: 15px;
    }
    
    .result-section, .form-section, .detail-section {
        padding: 15px;
    }
    
    .motd-container {
        height: 80px;
    }
    
    .motd-icon {
        width: 60px;
        height: 60px;
        top: 10px;
        left: 10px;
        font-size: 30px;
    }
    
    .motd-info {
        left: 75px;
        top: 12px;
    }
    
    .motd-server-info {
        font-size: 14px;
    }
    
    .motd-text {
        font-size: 12px;
    }
    
    .motd-status-panel {
        width: 100px;
        top: 12px;
    }
    
    .motd-status, .motd-players {
        font-size: 12px;
    }
    
    .motd-version {
        font-size: 10px;
    }
    
    .page-header {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .player-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-id {
        margin-top: 8px;
        font-size: 0.8em;
    }
    
    .server-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
}