/* 基本重置和全局样式 */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.app-container {
    width: 375px;
    height: 812px;
    background-color: #fff;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
}

/* 屏幕切换 */
.screen {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}
.screen.active {
    display: flex;
}
.screen .content {
    overflow-y: auto;
    flex-grow: 1;
    padding: 20px;
    padding-bottom: 70px;
}

/* 头部 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #dbdbdb;
    flex-shrink: 0;
}
.app-header h1 {
    margin: 0;
    font-size: 1.2em;
    user-select: text;
    cursor: pointer;
}
.icon-button {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
}

/* 侧边栏 */
#sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 100;
    border-right: 1px solid #ddd;
}
#sidebar.open {
    transform: translateX(0);
}
#sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
}
#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#sidebar ul li {
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.1em;
    border-bottom: 1px solid #f0f0f0;
}
#sidebar ul li:hover {
    background-color: #f7f7f7;
}
#sidebar i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* 设置列表 */
.settings-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.settings-list li {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 1.1em;
}
.settings-list li:hover {
    background-color: #f9f9f9;
}
.settings-list .logout {
    color: #e74c3c;
    text-align: center;
}

/* 帖子卡片样式 */
.post-card {
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}
.post-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}
.post-user-info {
    display: flex;
    flex-direction: column;
}
.post-username {
    font-weight: 600;
}
.post-timestamp {
    font-size: 0.8em;
    color: #8e8e8e;
}
.post-caption {
    padding: 0 15px 10px;
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
}
.post-image {
    width: 100%;
    height: auto;
}
.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    font-size: 0.9em;
    color: #555;
    border-top: 1px solid #efefef;
}
.post-actions span {
    cursor: pointer;
}
.post-actions i {
    margin-right: 5px;
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    background-color: #fff;
    border-top: 1px solid #dbdbdb;
    flex-shrink: 0;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8e8e8e;
    font-size: 0.7em;
}
.nav-item i {
    font-size: 1.6em;
    margin-bottom: 2px;
}
.nav-item:nth-child(2) i {
    font-size: 2.4em;
    color: #333;
}
.nav-item.active {
    color: #262626;
}

/* “我”的页面样式 */
.profile-page {
    padding: 20px;
}
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 30px;
}
.profile-stats {
    display: flex;
    justify-content: space-around;
    flex-grow: 1;
    text-align: center;
}
.profile-stats span {
    display: block;
    font-size: 0.9em;
    color: #8e8e8e;
}
.profile-info h3 {
    margin: 0 0 5px 0;
}
.profile-info p {
    margin: 0;
    color: #555;
}
.profile-actions {
    margin-top: 20px;
    display: flex;
}
.profile-actions button {
    flex-grow: 1;
    padding: 8px;
    background-color: #efefef;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
}

/* 开发者页面内容区域的 <pre> 标签样式 (与主风格一致) */
#dev-info {
    background-color: #f5f5f5; /* 浅灰色背景，突出代码块 */
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    color: #333; /* 标准深色文字 */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre-wrap;      /* 自动换行 */
    word-wrap: break-word;      /* 长单词换行 */
}