/* ========================================================================= */
/* 1. 基础重置 - 最简版本 */
/* ========================================================================= */
 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #000;
    min-height: 100vh;
    font-size: 11px;
    line-height: 1.4;
    font-weight: normal;
}

#page-wrapper {
    max-width: 1024px;
    margin: 20px auto;
    background-color: white;
    padding: 0;
    min-height: calc(100vh - 40px);
}

/* ========================================================================= */
/* 2. 导航栏 */
/* ========================================================================= */

.navbar {
    background-color: #e9ecef;       /* 统一背景色，浅灰清爽 */
    padding: 12px 30px;              /* 高度适中，视觉舒适 */
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* 轻微阴影，更有层次感 */
}

.nav-content {
    display: flex;
    justify-content: space-between;   /* 左logo 右菜单 */
    align-items: center;
    max-width: 1024px;
    margin: 0 auto;
}

.logo {
    display: flex; /* 让图标和文字并排显示 */
    align-items: center; /* 垂直居中对齐 */
    text-decoration: none; /* 移除下划线 */
    color: #333; /* 文字颜色 */
    font-size: 14px; /* 文字大小 */
    font-weight: bold;
}

/*
.footer-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 10px;
} */

/* 导航链接 */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 15px;               /* 间距更舒适 */
}

.nav-links a {
    text-decoration: none;
    padding: 8px 12px;               /* 链接块更大，易点击 */
    border-radius: 6px;              /* 圆角更柔和 */
    font-size: 13px;
    color: #333;
    transition: all 0.3s;
}

/* 悬停效果 */
.nav-links a:hover {
    background-color: #007bff;       /* 高亮蓝色 */
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* 悬停时浮起效果 */
}

/* 响应式优化：屏幕小于768px时导航垂直排列 */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-links li {
        margin-left: 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
    }
}
/* ========================================================================= */
/* 3. 三栏布局 */
/* ========================================================================= */
.main-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    min-height: 600px;
    height: calc(100vh - 150px);
}

.left-column {
    flex: 0 0 180px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

/* 右侧栏: 固定宽度180px */
.sidebar-right {
    flex: 0 0 180px;
    width: 180px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    font-size: 11px;
}

/* ========================================================================= */
/* 4. 用户面板 */
/* ========================================================================= */
.user-panel, .login-register-box {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.user-panel h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
    font-weight: normal;
}

.user-panel ul {
    list-style: none;
    padding: 0;
}

.user-panel li {
    margin-bottom: 6px;
    font-size: 11px;
}

.user-panel a {
    text-decoration: none;
    color: #0077cc;
    font-weight: normal;
}

/* ========================================================================= */
/* 5. 顶部区域 */
/* ========================================================================= */
.detailtop-box {
    display: flex;
    gap: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
}

.media {
    flex: 1;
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.media .image img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.media .text p {
    margin: 0;
    font-size: 12px;
    font-weight: normal;
}

.media2 {
    flex: 0 0 250px;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px;
}

/* ========================================================================= */
/* 6. 选项卡 */
/* ========================================================================= */
.profile-tabs {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tab-menu {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.tab-menu p {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: normal;
}

.tab-menu p.active {
    background: #007bff;
    color: #fff;
}

.tab-content {
    display: none;
    padding: 15px;
}

.tab-content[style*="display:block"] {
    display: block;
}

/* ========================================================================= */
/* 7. 关于我页面 - 关键修复部分 */
/* ========================================================================= */
.about-section {
    display: flex;
    gap: 15px;
}

.about-left {
    flex: 1;
}

.about-right {
    flex: 0 0 200px;
}

/* 确保所有详情框显示 criteria-box*/
.detail-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.detail-box h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
    font-weight: normal;
}

/* criteria-box */
.criteria-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.criteria-box h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
    font-weight: normal;
}








/* 确保7个问题区域显示 */
#my_monologue-container,
#happiest_moments-container,
#best_at-container,
#three_words_from_friends-container,
#five_essentials-container,
#favorite_media-container,
#craziest_thing-container {
    min-height: 20px;
    margin-bottom: 8px;
}

.field-content {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    min-height: 20px;
    font-size: 11px;
    font-weight: normal;
}

/* 右侧表格 */
.detail-box ul, .criteria-box ul {
    list-style: none;
    padding: 0;
}

.detail-box li, .criteria-box li {
    margin-bottom: 6px;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    font-weight: normal;
}

.detail-box span, .criteria-box span {
    color: #666;
    text-align: right;
    flex: 1;
    margin-left: 8px;
    font-weight: normal;
}











/* ========================================================================= */
/* 8. 可编辑字段 */
/* ========================================================================= */
.editable-field {
    position: relative;
    min-height: 30px; /* 卡片最小高度 */
    margin-bottom: 8px;
}

/* 字段内容显示区域 */
.field-content {
    background: #f8f9fa;
    padding: 6px 8px; /* 减少内边距 */
    border-radius: 4px;
    min-height: 25px;  /*减少最小高度 */
    font-size: 11px;
    font-weight: normal;
    line-height: 1; /* 紧凑的行高 */
    word-wrap: break-word;
    white-space: pre-wrap;
    max-height: 30px;  /*限制最大高度 */
    overflow: hidden; /* 超出部分隐藏 */
}

/* 当字段为空时的提示样式 */
.field-content:empty::before {
    content: "点击编辑...";
    color: #999;
    font-style: italic;
}

/* 编辑模式表单 */
.edit-mode-form {
    display: none;
    margin-top: 6px;
}

.edit-mode-form textarea {
    width: 100%;
    height: 25px; /* 适中的高度 */
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    resize: vertical;
    margin-bottom: 6px;
    font-weight: normal;
    line-height: 1.3;
    min-height: 25px; /* 最小高度 */
    max-height: 30px; /* 最大高度 */
}

/* 编辑按钮容器 */
.edit-mode-form .button-group {
    display: flex;
    justify-content: flex-end;
    gap: 5px; /* 按钮间距 */
}

.edit-mode-form button {
    padding: 3px 8px; /* 更小的按钮 */
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px; /* 更小的字体 */
    transition: all 0.3s;
    font-weight: normal;
}

.edit-mode-form button[id$="-save"] {
    background: #28a745;
    color: white;
}

.edit-mode-form button[id$="-save"]:hover {
    background: #218838;
}

.edit-mode-form button[id$="-cancel"] {
    background: #6c757d;
    color: white;
}

.edit-mode-form button[id$="-cancel"]:hover {
    background: #545b62;
}

.editable-field.editing .field-content {
    display: none;
}

.editable-field.editing .edit-mode-form {
    display: block;
}

/* ====================
 * 10. 模态框 (Modal) 和编辑表格样式
 * ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 400px; 
    max-width: 90%;
    border-radius: 8px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 18px;
    font-weight: bold;
}
.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    text-align: center;
    margin-top: 0;
}

/* 【重要修改】模态框内表格样式 */

.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-info li {
  padding: 4px 0;
}



.profile-edit-table {
    width: 100%; /* 确保表格宽度自适应模态框 */
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
}

.profile-edit-table th,
.profile-edit-table td {
    background-color: #fff;
    font-size: 12px;
    padding: 6px 8px;
    border: 1px dashed #ddd; /* 表格边框改为虚线 */
    text-align: left;
    font-weight: normal; /* 确保表格内容非粗体 */
}

.profile-edit-table th {
    background-color: #f7f7f7;
    font-weight: bold; /* 表格头可保持粗体 */
}

/* 模态框内的 input/select 继承了通用的虚线设置，这里只进行微调 */
.profile-edit-table input,
.profile-edit-table select {
	/* 【新加】设定一个较小的最大宽度，让输入框更紧凑 */
    max-width: 80px; 
    /* 宽度 auto 和 display: inline-block 会让它根据内容/max-width收缩 */    
    width: auto;
    display: inline-block;
	box-sizing: border-box;
    text-align: left;
}

.profile-edit-table .small-input {
    width: 50px;
    min-width: 30px;
    text-align: center;
}

/* 按钮样式容器 */
.form-actions {
    text-align: center;
    padding: 10px 0 0 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .about-section {
        flex-direction: column;
    }
    
    .about-right {
        flex: none;
        width: 100%;
    }
}