/* 全局重置与基础适配 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: #fafafa; 
    color: #333; 
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased;
}

/* 导航栏适配 (加入磨砂玻璃效果，防止滚动时挡住内容) */
nav { 
    width: 100%; 
    position: fixed; 
    top: 0; 
    padding: 15px 5%; /* 使用百分比边距适配移动端 */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: rgba(250, 250, 250, 0.85); 
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
    z-index: 100;
}
nav .brand { font-weight: 500; letter-spacing: 0.5px; }
nav .brand span { color: #888; font-weight: normal; }
nav a { color: #888; text-decoration: none; font-size: 14px; transition: color 0.3s; }
nav a:hover { color: #000; }

/* 主页网格容器适配 */
.grid-container {
    padding: 100px 5% 40px; /* 顶部留出 nav 的空间 */
    display: flex;
    justify-content: center;
}
.grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    width: 100%; 
    max-width: 800px; 
}
.card { 
    padding: 40px; 
    border: 1px solid #eee; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    background: #fff; 
    border-radius: 8px; /* 极其微小的圆角，提升现代感 */
}
.card:hover { border-color: #000; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.card i { display: block; font-size: 24px; margin-bottom: 12px; font-style: normal; }
.card span { font-size: 15px; letter-spacing: 1px; }

/* Auth 表单容器适配 (兼容 auth.php) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.container { 
    width: 100%; 
    max-width: 380px; 
    padding: 40px; 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 8px; 
}
h2 { font-weight: 300; margin-bottom: 30px; letter-spacing: 1px; text-align: center; }
input { width: 100%; padding: 12px 0; margin-bottom: 20px; border: none; border-bottom: 1px solid #ddd; outline: none; transition: border-color 0.3s; font-size: 14px; background: transparent; }
input:focus { border-bottom-color: #000; }
.btn { width: 100%; padding: 14px; background: #000; color: #fff; border: none; cursor: pointer; font-size: 14px; letter-spacing: 1px; margin-top: 10px; border-radius: 4px; transition: opacity 0.3s; }
.btn:hover { opacity: 0.8; }
.switch { font-size: 12px; text-align: center; margin-top: 24px; color: #999; cursor: pointer; transition: color 0.3s; }
.switch:hover { color: #000; }
.hidden { display: none !important; }

/* ==========================================
   移动端响应式断点 (Media Queries 核心魔法)
   ========================================== */
@media screen and (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr; /* 手机端变成单列，上下堆叠 */
        gap: 16px;
    }
    .card {
        padding: 30px 20px; /* 缩小卡片内边距 */
    }
    .container {
        padding: 30px 20px;
        border: none; /* 手机端去掉表单外边框，让视野更开阔 */
        background: transparent;
    }
}