/* --- 全局基础 --- */
:root {
    --primary: #007aff;
    --sidebar-bg: #001529;
}
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body, html { margin: 0; padding: 0; font-family: "PingFang SC", sans-serif; height: 100%; overflow: hidden; }

/* --- 大框架逻辑 --- */
.app-container { display: flex; width: 100vw; height: 100vh; background: #fff; }

/* --- 侧边栏 (电脑端显示) --- */
.sidebar {
    width: 260px; background: var(--sidebar-bg); color: #fff;
    display: flex; flex-direction: column; z-index: 1001; transition: 0.3s;
}
.logo { padding: 30px 20px; font-size: 22px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-menu { flex: 1; padding: 15px; }
.nav-item { display: flex; align-items: center; padding: 12px 15px; color: #a6adb4; text-decoration: none; border-radius: 10px; margin-bottom: 5px; }
.nav-item.active { background: #1890ff; color: #fff; }
.user-bottom { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; }
.btn-out { color: #ff4d4f; text-decoration: none; font-size: 14px; }

/* --- 内容区居中逻辑 --- */
.main-content { flex: 1; display: flex; flex-direction: column; background: #fcfcfc; }
.chat-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }

.welcome-section { text-align: center; margin-bottom: 30px; }
.main-logo { width: 100px; height: auto; margin-bottom: 20px; }
.hero-title { font-size: 28px; font-weight: 900; margin: 15px 0; color: #1a1a1a; }
.hero-desc { color: #666; font-size: 14px; margin: 5px 0; line-height: 1.6; }

/* --- 输入框 (电脑端居中) --- */
.center-input-container { width: 100%; max-width: 800px; }
.mega-input-card { 
    background: #fff; border: 1px solid #e5e5e5; border-radius: 20px; 
    padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}
.main-textarea { width: 100%; min-height: 60px; border: none; outline: none; font-size: 16px; resize: none; background: transparent; }
.input-toolbar { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f5f5f5; }
.tool-btn { background: #f5f5f7; border: none; width: 34px; height: 34px; border-radius: 8px; margin-right: 5px; cursor: pointer; }
.primary-send-btn { background: #1a1a1a; border: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* --- 📱 手机端适配 (这是重点) --- */
.mobile-top-bar, .sidebar-overlay { display: none; }

@media (max-width: 768px) {
    .mobile-top-bar { 
        display: flex; align-items: center; height: 55px; background: #fff; 
        border-bottom: 1px solid #eee; position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
        padding: 0 15px;
    }
    /* 核心修复：绝对定位确保标题在正中央，不受按钮宽度影响 */
    .mobile-logo-text { 
        position: absolute; left: 50%; transform: translateX(-50%);
        font-weight: 900; font-size: 17px; color: #000; 
    }
    .menu-btn { background: none; border: none; font-size: 22px; color: #007aff; cursor: pointer; }

    .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.1); }
    .sidebar.open { left: 0; }
    .sidebar-overlay.active { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1000; }

    .main-content { padding-top: 55px; }
    .chat-wrapper { justify-content: center; padding-bottom: 120px; }
    .main-logo { width: 70px; }
    .hero-title { font-size: 22px; }
    .hero-desc { font-size: 13px; padding: 0 10px; }

    .center-input-container { position: fixed; bottom: 20px; left: 15px; right: 15px; width: calc(100% - 30px); }
    .mega-input-card { border-radius: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
}
