/* 春风AI 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #141414;
    min-height: 100vh;
    position: relative;
}

/* 顶部导航栏 */
.top-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: 60px; display: flex; justify-content: flex-end; align-items: center;
    padding: 0 20px; z-index: 100; background: #fff;
}
/* 顶部导航栏左侧灰色背景（与历史记录面板统一） */
.top-header .logo {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 280px; padding: 0 20px;
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 600; color: #141414;
    text-decoration: none; background: #f9fafb;
    border-right: 1px solid #e5e5e5;
    z-index: 1;
}
.login-btn, .user-avatar-wrapper { position: relative; z-index: 2; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.login-btn {
    background: #00c375; color: #fff; border: none;
    padding: 6px 20px; border-radius: 999px; font-size: 14px;
    font-weight: 500; cursor: pointer; transition: all .2s;
}
.login-btn:hover { background: #00a863; }

/* 用户头像区域 */
.user-avatar-wrapper { position: relative; display: none; }
.user-avatar-wrapper.show { display: block; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    border: 2px solid #e5e5e5; transition: border-color .2s; object-fit: cover;
}
.user-avatar:hover { border-color: #00c375; }
.user-dropdown {
    position: absolute; top: 48px; right: 0; background: #fff;
    border: 1px solid #e5e5e5; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 160px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all .2s; overflow: hidden; z-index: 200;
}
.user-avatar-wrapper.show-dropdown .user-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer; transition: background .2s;
    font-size: 14px; color: #333;
}
.user-dropdown-item:hover { background: #f5f5f5; }
.user-dropdown-item svg { width: 18px; height: 18px; color: #666; stroke-width: 1.5; }
.user-dropdown-item.logout { color: #f44336; border-top: 1px solid #f0f0f0; }
.user-dropdown-item.logout svg { color: #f44336; }
.user-dropdown-item.logout:hover { background: #fbe9e7; }

/* 左侧导航栏 */
.sidebar {
    position: fixed; left: 20px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 16px; z-index: 100;
}
.create-btn {
    width: 56px; height: 56px; background: #fff; border: 1px solid #e5e5e5;
    border-radius: 28px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(0,0,0,.08);
    text-decoration: none;
}
.create-btn:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.create-btn-inner {
    width: 41px; height: 41px; background: #00c375; border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
}
.create-btn svg { width: 20px; height: 20px; color: #fff; }
.nav-container {
    background: #fff; border: 1px solid #e5e5e5; border-radius: 28px;
    padding: 8px 6px; display: flex; flex-direction: column; gap: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nav-item {
    width: 40px; height: 40px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; cursor: pointer;
    transition: all .2s; text-decoration: none;
}
.nav-item:hover { background: #f5f5f5; }
.nav-item.active { background: #f0f0f0; }
.nav-item svg { width: 18px; height: 18px; color: #999; stroke-width: 1.5; }
.nav-item.active svg { color: #141414; }

/* 弹窗 */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay.active { display: flex; }
.login-modal {
    width: 670px; max-width: 95%; height: 540px; background: #fff;
    border-radius: 16px; overflow: hidden; display: flex;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-left {
    width: 285px; min-width: 285px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.modal-left-image { width: 100%; height: 100%; object-fit: cover; }
.modal-right {
    flex: 1; padding: 32px; display: flex; flex-direction: column;
    position: relative; overflow-y: auto;
}
.modal-close {
    position: absolute; top: 20px; right: 20px; width: 32px; height: 32px;
    border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; transition: all .2s;
}
.modal-close:hover { background: #f5f5f5; }
.modal-close svg { width: 20px; height: 20px; color: #666; }

/* 认证标签 */
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid #f0f0f0; }
.auth-tab {
    flex: 1; padding: 12px 0; border: none; background: transparent;
    font-size: 16px; font-weight: 500; color: #999; cursor: pointer;
    transition: all .2s; position: relative;
}
.auth-tab.active { color: #141414; }
.auth-tab.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: #00c375; border-radius: 1px;
}
.auth-tab:hover:not(.active) { color: #666; }
.auth-form { flex: 1; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 10px 14px; border: 1px solid #e5e5e5;
    border-radius: 8px; font-size: 14px; color: #141414; transition: all .2s;
}
.form-input:focus { outline: none; border-color: #00c375; }
.form-input.error { border-color: #f44336; }
.error-message { font-size: 12px; color: #f44336; margin-top: 4px; display: none; }
.error-message.show { display: block; }
.submit-btn {
    width: 100%; padding: 12px; background: #00c375; color: #fff;
    border: none; border-radius: 8px; font-size: 16px; font-weight: 500;
    cursor: pointer; transition: all .2s; margin-top: 8px;
}
.submit-btn:hover { background: #00a863; }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }
.auth-switch-tip { text-align: center; font-size: 13px; color: #999; margin-top: 16px; }
.auth-switch-tip a { color: #00c375; text-decoration: none; font-weight: 500; }
.auth-switch-tip a:hover { text-decoration: underline; }

/* 个人中心 */
.profile-modal .login-modal { width: 480px; height: auto; min-height: 400px; }
.profile-modal .modal-left { display: none; }
.profile-content { padding: 0; }
.profile-header { text-align: center; padding: 32px 32px 20px; border-bottom: 1px solid #f0f0f0; }
.profile-avatar-large {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
    display: block; border: 3px solid #f0f0f0; object-fit: cover;
}
.profile-nickname { font-size: 18px; font-weight: 600; color: #141414; margin-bottom: 4px; }
.profile-phone { font-size: 13px; color: #999; }
.profile-info { padding: 20px 32px 8px; }
.profile-info-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f5f5f5;
}
.profile-info-item:last-child { border-bottom: none; }
.profile-info-label { font-size: 14px; color: #999; display: flex; align-items: center; gap: 8px; }
.profile-info-label svg { width: 18px; height: 18px; color: #bbb; stroke-width: 1.5; }
.profile-info-value { font-size: 14px; color: #333; font-weight: 500; }

/* 头像上传 */
.profile-avatar-upload { position: relative; cursor: pointer; display: inline-block; }
.profile-avatar-upload .profile-avatar-large { transition: opacity .2s; }
.profile-avatar-upload:hover .profile-avatar-large { opacity: .7; }
.profile-avatar-upload:hover .avatar-upload-overlay { opacity: 1; }
.avatar-upload-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s; pointer-events: none;
}
.avatar-upload-overlay svg { width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }

/* 个人中心激活区域 */
.profile-activation { padding: 0 32px 24px; }
.activation-row { display: flex; gap: 8px; }
.activation-input { flex: 1; font-size: 13px; letter-spacing: 1px; }
.activation-submit-btn { width: auto; padding: 10px 20px; margin-top: 0; white-space: nowrap; font-size: 14px; }
.activation-msg { font-size: 12px; margin-top: 8px; text-align: center; min-height: 18px; }

/* Toast */
.auth-toast {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 500;
    z-index: 2000; opacity: 0; transition: all .3s; pointer-events: none;
}
.auth-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.auth-toast.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.auth-toast.error { background: #fbe9e7; color: #c62828; border: 1px solid #ef9a9a; }

/* 手机端汉堡菜单按钮 - 默认隐藏 */
.mobile-menu-btn {
    display: none; width: 40px; height: 40px; border: none; background: transparent;
    cursor: pointer; align-items: center; justify-content: center; z-index: 2;
    position: relative; margin-right: 8px;
}
.mobile-menu-btn svg { width: 22px; height: 22px; color: #666; }

/* 手机端遮罩层 */
.mobile-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 90;
}
.mobile-overlay.show { display: block; }

/* 响应式 */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; margin-right: 4px; }
    .sidebar { left: 10px; }
    .create-btn { width: 52px; height: 52px; }
    .create-btn-inner { width: 44px; height: 44px; }
    .nav-container { padding: 6px 4px; }
    .nav-item { width: 36px; height: 36px; }
    .modal-left { display: none; }
    /* 手机端logo去掉底色和边框 */
    .top-header .logo { background: none; border-right: none; }
    /* 首页手机端：隐藏logo和网站名 */
    .home-page .top-header .logo { display: none; }
    /* chat页面手机端：保留logo在左侧，自动撑开 */
    .chat-page .top-header .logo {
        position: static; width: auto;
        margin-right: auto; font-size: 16px; gap: 6px; padding: 0;
    }
    .chat-page .top-header .logo img { width: 28px; height: 28px; }
}
