/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    /* 参考 stellar 主题的紫色渐变背景 */
    background: -moz-linear-gradient(135deg, #663399 0%, #9966cc 50%, #cc99ff 100%);
    background: -webkit-linear-gradient(135deg, #663399 0%, #9966cc 50%, #cc99ff 100%);
    background: linear-gradient(135deg, #663399 0%, #9966cc 50%, #cc99ff 100%);
    background-attachment: fixed;
    background-size: cover;
}

/* 整体布局 */
#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* 头部样式 */
#header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#header .logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

#header .logo span {
    font-weight: normal;
    opacity: 0.9;
}

#header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#header nav a:hover {
    opacity: 0.8;
}

/* 菜单容器 */
#menu-container {
    position: relative;
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 移动端菜单容器优化 */
@media (max-width: 768px) {
    #menu-container {
        padding: 1rem;
    }
}

/* 菜单按钮 */
.menu-button {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-button span {
    width: 2rem;
    height: 0.25rem;
    background: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* 菜单样式 */
#menu {
    display: block;
}

#menu .links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

#menu .links li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#menu .links li a:hover {
    color: #667eea;
}

/* 主要内容区域 */
#main {
    flex: 1;
    padding: 1rem;
}

#one {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

#one .inner {
    text-align: center;
}

#one h1 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

/* 错误页面链接样式 - 网格布局 */
.error-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.error-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
}

.error-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.error-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 页脚样式 */
#footer {
    background: #333;
    color: white;
    padding: 2rem;
    margin-top: auto;
}

#footer .inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.copyright {
    border-top: 1px solid #444;
    padding-top: 1rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    /* 菜单按钮显示 */
    .menu-button {
        display: flex;
    }
    
    /* 菜单默认隐藏 */
    #menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* 菜单显示状态 */
    #menu.active {
        display: block;
    }
    
    #menu .links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    #one {
        padding: 1rem;
    }
    
    #one h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    #one p a {
        min-width: 100%;
    }
    
    /* 优化网格布局在移动端的显示 */
    .error-pages-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .error-card {
        padding: 1rem 0.75rem;
    }
    
    .error-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* 减少页脚内边距 */
    #footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-section {
        min-width: 100%;
    }
}