/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f6f6f6;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 顶部状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 4px 16px;
    background-color: #fff;
    font-size: 13px;
    color: #000;
    font-weight: 500;
}

.right-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.signal, .battery {
    display: flex;
    align-items: center;
}

.signal:before {
    content: "\f012";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 4px;
    font-size: 12px;
}

.battery:before {
    content: "\f240";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 4px;
    font-size: 12px;
}

/* 主导航栏 */
.main-nav {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-item {
    text-decoration: none;
    color: #121212;
    font-size: 15px;
    font-weight: 500;
    padding: 0 12px;
}

.nav-item.active {
    color: #056DE8;
    position: relative;
}

.nav-item.active:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: #056DE8;
}

/* 搜索框 */
.search-bar {
    padding: 8px 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.search-bar input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: none;
    border-radius: 20px;
    background: #F6F6F6 url('../images/search-icon.png') no-repeat 16px center;
    background-size: 16px;
    font-size: 14px;
    color: #121212;
}

.search-bar input::placeholder {
    color: #999;
}

/* 问题卡片 */
.question-card {
    margin: 8px 0;
    padding: 16px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.question-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #121212;
    line-height: 1.4;
    margin-bottom: 4px;
}

.author {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.author span {
    font-size: 14px;
    color: #444;
}

.preview {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    margin: 8px 0;
}

.stats {
    display: flex;
    gap: 16px;
    color: #8590A6;
    font-size: 14px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    background-color: #fff;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 100;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #8590A6;
    padding: 4px 12px;
    transition: color 0.2s ease;
}

.bottom-nav .nav-item:active {
    opacity: 0.7;
}

.bottom-nav .nav-item.active {
    color: #056DE8;
}

.bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
}

.bottom-nav .nav-item:active i {
    transform: scale(0.9);
}

/* 中间加号按钮样式优化 */
.add-btn {
    background-color: #056DE8;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(5,109,232,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(5,109,232,0.12);
}

.add-btn i {
    font-size: 20px !important;
    margin: 0 !important;
}

/* 内容区域 */
.content {
    padding: 0 16px;
    margin-bottom: calc(60px + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 分割线 */
.question-card + .question-card {
    border-top: 1px solid rgba(0,0,0,0.08);
}

/* 直答页面样式 */
.answer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.answer-nav .logo {
    height: 30px;
}

.answer-nav .logo img {
    height: 100%;
}

.menu-btn {
    border: none;
    background: none;
    color: #121212;
    font-size: 20px;
    padding: 4px;
}

.answer-content {
    padding: 24px 16px;
}

.main-title {
    font-size: 28px;
    font-weight: 600;
    color: #121212;
    text-align: center;
    margin-bottom: 32px;
}

.answer-search {
    margin-bottom: 32px;
}

.answer-search input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    background: #fff;
    font-size: 16px;
    color: #121212;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.answer-search input::placeholder {
    color: #8590A6;
}

.hot-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #444;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.question-tag:active {
    background-color: #f6f6f6;
}

.question-tag i {
    color: #8590A6;
    font-size: 12px;
}

/* 消息页面样式 */
.message-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.message-nav h1 {
    font-size: 17px;
    font-weight: 600;
    color: #121212;
}

.nav-actions {
    display: flex;
    gap: 16px;
}

.icon-btn {
    border: none;
    background: none;
    padding: 4px;
    color: #121212;
    font-size: 18px;
}

/* 功能分类 */
.message-categories {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #121212;
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-icon.comment {
    background-color: #E5F2FF;
    color: #056DE8;
}

.category-icon.like {
    background-color: #FCE5E5;
    color: #FF3B30;
}

.category-icon.star {
    background-color: #FFF3E5;
    color: #FF9500;
}

.category-icon.follow {
    background-color: #E5F6FF;
    color: #32ADE6;
}

.category-item span {
    font-size: 13px;
    color: #444;
}

/* 消息列表 */
.message-list {
    background-color: #fff;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.message-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-content h3 {
    font-size: 16px;
    font-weight: 500;
    color: #121212;
    margin-bottom: 4px;
}

.message-content p {
    font-size: 14px;
    color: #8590A6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 13px;
    color: #8590A6;
    margin-left: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: #FF3B30;
    color: #fff;
    font-size: 12px;
    border-radius: 8px;
    margin-left: 8px;
}

/* 个人主页样式 */
.profile-header {
    background-color: #fff;
    padding: 16px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar {
    width: 64px;
    height: 64px;
    margin-right: 16px;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #121212;
    margin-bottom: 8px;
}

.verify-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    color: #8590A6;
    font-size: 14px;
}

.verify-btn i {
    font-size: 16px;
}

.user-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item strong {
    font-size: 18px;
    color: #121212;
    font-weight: 500;
}

.stat-item span {
    font-size: 14px;
    color: #8590A6;
    margin-top: 4px;
}

/* 会员卡片 */
.member-card {
    margin: 16px;
    padding: 16px;
    background-color: #FFF9E5;
    border-radius: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #121212;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 14px;
    color: #8590A6;
    margin-bottom: 8px;
}

.card-price {
    font-size: 14px;
    color: #F5A623;
    font-weight: 500;
}

/* 功能网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 16px;
    background-color: #fff;
    margin-bottom: 16px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #121212;
}

.feature-item i {
    font-size: 24px;
    color: #444;
    margin-bottom: 8px;
}

.feature-item span {
    font-size: 12px;
    color: #444;
}

/* 创作灵感 */
.creation-section {
    background-color: #fff;
    padding: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #121212;
}

.more-link {
    font-size: 14px;
    color: #8590A6;
    text-decoration: none;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.question-content h4 {
    font-size: 15px;
    color: #121212;
    margin-bottom: 8px;
    font-weight: 500;
}

.question-stats {
    display: flex;
    gap: 16px;
    color: #8590A6;
    font-size: 13px;
}

.write-btn {
    padding: 6px 12px;
    border: 1px solid #056DE8;
    border-radius: 4px;
    background: none;
    color: #056DE8;
    font-size: 14px;
    white-space: nowrap;
}