/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #0d1117;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 100%;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

/* Logo和导航区域 */
.logo-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #3498db;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background-color: transparent;
}

.nav-link:hover {
    color: #51b03c;
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.nav-link i {
    margin-right: 6px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.logo:hover {
    color: #2980b9;
}

/* 用户头像和下拉菜单 */
.user-avatar {
    position: relative;
    cursor: pointer;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background-color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 18px;
    border: 2px solid #3498db;
    overflow: hidden;
}

.avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: #1d232a;
    border-radius: 5px;
    width: 160px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    border: 1px solid #30363d;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 15px;
    display: block;
    color: #e0e0e0;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #30363d;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #3498db;
}

.dropdown-divider {
    height: 1px;
    background-color: #30363d;
    margin: 5px 0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.btn-secondary:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.btn i {
    margin-right: 8px;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 0; /* 移除上下padding，避免产生黑边 */
}

/* Minecraft背景图片展示区域 */
.minecraft-showcase {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 0; /* 确保没有外边距 */
    padding: 0; /* 确保没有内边距 */
}

.minecraft-bg-image {
    width: 100%;
    height: 284px;
    background-image: url('../img/Minecraft_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: block; /* 确保块级显示 */
    margin: 0; /* 移除所有外边距 */
    padding: 0; /* 移除所有内边距 */
}

/* 页脚 */
footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    color: #6e7681;
    font-size: 12px;
    background-color: #161b22;
    border-top: 1px solid #30363d;
    margin-top: auto;
}

footer .version {
    margin-top: 5px;
}

/* 系统状态 */
.system-stats {
    position: fixed;
    bottom: 0;
    right: 0;
    display: flex;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 12px;
    color: #6e7681;
    z-index: 100;
}

.system-stats .stat {
    margin-left: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .toolbar {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .logo-nav {
        gap: 10px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 4px 8px;
        border: 1px solid #3498db;
    }
    
    .system-stats {
        display: none;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 10px 20px;
    }
    
    /* 移动端Minecraft背景图片高度调整 */
    .minecraft-bg-image {
        height: 192px;
    }
}

@media (max-width: 768px) {
    .logo-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 移动端按钮布局 - 一行两个 */
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .btn {
        flex: 1;
        min-width: calc(50% - 5px); /* 一行两个按钮，减去间距 */
        max-width: calc(50% - 5px);
        margin-bottom: 10px;
        padding: 10px 15px;
        font-size: 14px; /* 稍微减小字体以适应较小宽度 */
    }
    
    /* 如果只有奇数个按钮，最后一个按钮占满整行 */
    .btn:last-child:nth-child(odd) {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* 移动端Minecraft背景图片高度调整 - 放大显示中心偏右区域 */
    .minecraft-bg-image {
        height: 192px;
        background-position: 65% center; /* 重点展示中心偏右的角色和建筑区域 */
        background-size: 150%; /* 放大图片以突出重点区域 */
    }
}

@media (max-width: 480px) {
    .logo-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 小屏幕移动端按钮布局 - 一行两个 */
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .btn {
        flex: 1;
        min-width: calc(50% - 4px); /* 一行两个按钮，减去间距 */
        max-width: calc(50% - 4px);
        margin-bottom: 8px;
        padding: 8px 12px;
        font-size: 13px; /* 小屏幕进一步减小字体 */
    }
    
    /* 如果只有奇数个按钮，最后一个按钮占满整行 */
    .btn:last-child:nth-child(odd) {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* 小屏幕移动端Minecraft背景图片高度调整 - 进一步放大重点区域 */
    .minecraft-bg-image {
        height: 192px;
        background-position: 70% center; /* 更聚焦于角色和重要建筑 */
        background-size: 180%; /* 进一步放大以适应小屏幕 */
    }
}