:root {
    --primary: #2563eb;
    --success: #10b981;
    --bg: #f8fafc;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding-top: 80px;
}

/* 导航栏 & 桥接修复 */
nav {
    background: white;
    height: 64px;
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    height: 100%; /* 保证触发高度 */
}

/* 悬停菜单核心逻辑 */
.user-nav {
    position: relative;
    cursor: pointer;
    padding-left: 15px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    margin-left: 10px;
}

.dropdown {
    position: absolute;
    top: 64px; /* 紧贴导航栏底部 */
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 160px;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* 解决悬停消失的“隐形桥梁” */
.dropdown-bridge {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.user-nav:hover .dropdown {
    display: block;
}

.dropdown button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.95rem;
}

.dropdown button:hover {
    background: #f1f5f9;
}

/* 通用组件 */
.container { max-width: 650px; margin: 0 auto; padding: 0 20px 50px; }
.card { background: white; border-radius: 12px; padding: 24px; margin-bottom: 20px; border: 1px solid var(--border); }
.hidden { display: none !important; }

input, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

/* 添加到 style.css 末尾 */
.upload-area {
    border: 2px dashed var(--border);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    background: white;
    margin-top: 8px;
}

.hint-text {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 8px;
}

.edit-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* 优化细节：给 summary 增加一点间距 */
.edit-details summary {
    padding: 10px 0;
    font-weight: bold;
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-outline { background: white; border: 1px solid var(--border); color: var(--text-sub); }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* 句子列表样式 */
.sentence-item { padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
.user-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-sub); }
.mini-avatar { width: 20px; height: 20px; border-radius: 50%; }
.text-content { font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }
.text-notes { font-size: 0.9rem; color: var(--text-sub); font-style: italic; }

/* 个人中心特有 */
.profile-header { text-align: center; }
.large-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--primary); margin-bottom: 12px; }
.edit-details summary { font-size: 0.9rem; color: var(--primary); cursor: pointer; margin-top: 15px; }
.edit-form { margin-top: 15px; text-align: left; background: #f8fafc; padding: 15px; border-radius: 8px; }