* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

#app {
    min-height: 100vh;
    padding-bottom: 80px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.school-select {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.module-tabs {
    display: flex;
    overflow-x: auto;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 15px 0;
    padding-left: 10px;
    gap: 8px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.module-tabs::-webkit-scrollbar {
    display: none;
}

/* 添加可滑动的提示渐变效果 */
.module-tabs::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, #ffffff);
    pointer-events: none;
    z-index: 1;
}

.module-tab {
    flex-shrink: 0;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    color: #555;
    background: white;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.module-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.module-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.sort-bar {
    display: flex;
    background: white;
    padding: 10px 15px;
    gap: 20px;
}

.sort-item {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.sort-item.active {
    color: #667eea;
    font-weight: bold;
}

.post-list {
    padding: 10px;
}

.post-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

.post-info {
    flex: 1;
}

.post-nickname {
    font-weight: bold;
    font-size: 14px;
}

.post-time {
    font-size: 12px;
    color: #999;
}

.post-module {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.post-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666;
    border-radius: 15px;
    font-size: 12px;
}

.post-completed-badge {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(81, 207, 102, 0.25);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.post-completed-banner {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.post-completed-banner::before {
    content: '✅';
    font-size: 16px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 24px;
}

.nav-text {
    font-size: 12px;
}

#app {
    padding-bottom: 80px;
}

.fab {
    bottom: 90px;
}

.mine-page {
    padding: 15px;
}

.mine-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mine-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.mine-info {
    flex: 1;
}

.mine-nickname {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.mine-id {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.mine-edit-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.mine-stats {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 20px 0;
    margin-bottom: 15px;
}

.mine-stat-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.mine-stat-num {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.mine-stat-label {
    font-size: 12px;
    color: #999;
}

.mine-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 15px;
    gap: 5px;
}

.mine-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.mine-tab.active {
    background: #667eea;
    color: white;
}

.mine-content {
    min-height: 200px;
}

.mine-post-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.message-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.message-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.message-content {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.post-actions-bar {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-action-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.post-action-btn:hover {
    opacity: 0.9;
}

.post-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.post-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.post-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.post-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.post-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    flex: 1;
}

.post-action.liked {
    color: #ff6b6b;
}

.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-content.full {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}

.modal-header .close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-header .submit {
    color: #667eea;
    cursor: pointer;
}

.school-list {
    max-height: 60vh;
    overflow-y: auto;
}

.school-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.school-item:hover {
    background: #f5f5f5;
}

.publish-form {
    padding: 15px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-item input,
.form-item textarea,
.form-item select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-item textarea {
    min-height: 120px;
    resize: vertical;
}

.image-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-btn {
    width: 80px;
    height: 80px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
}

.uploaded-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.publish-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.publish-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.publish-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.post-detail {
    padding: 15px;
    overflow-y: auto;
    height: calc(100vh - 60px);
    width: 100%;
    box-sizing: border-box;
}

.comment-section {
    margin-top: 20px;
}

.comment-input-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-input-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.comment-input-box button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.detail-comments {
    margin-top: 20px;
    width: 100%;
}

.comment-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.comment-input-wrapper .comment-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.comment-input-wrapper .comment-submit {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    width: 100%;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-user {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
}

.comment-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.comment-reply-btn {
    font-size: 12px;
    color: #667eea;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-reply-btn:hover {
    color: #5a67d8;
}

.comment-reply-box {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.comment-reply-box.active {
    display: block;
}

.comment-reply-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    margin-bottom: 8px;
    resize: none;
    min-height: 40px;
}

.comment-reply-input:focus {
    border-color: #667eea;
}

.comment-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.comment-reply-cancel {
    padding: 6px 15px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
}

.comment-reply-submit {
    padding: 6px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
}

.comment-reply-submit:hover {
    background: #5a67d8;
}

.comment-reply-to {
    color: #667eea;
    font-weight: 500;
}

.comment-reply-to::before {
    content: '回复 ';
    color: #999;
    font-weight: normal;
}

.comment-nested {
    margin-left: 48px;
    padding-left: 0;
    border-left: 2px solid #f0f0f0;
    padding-left: 12px;
    margin-top: 10px;
}

.comment-section {
    margin-top: 20px;
    width: 100%;
}

.comment-input-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.comment-input-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.comment-input-box button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.comment-nickname {
    font-weight: bold;
    font-size: 13px;
}

.mine-mode #searchSection,
.mine-mode #sortBar,
.mine-mode #moduleTabs,
.mine-mode #postList,
.mine-mode #noticeBar,
.mine-mode #bannerContainer,
.mine-mode .fab {
    display: none !important;
}

.fab {
    bottom: 90px !important;
    z-index: 99;
}

.bind-school-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.bind-school-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.bind-school-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.bind-school-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.bind-school-btn.pending {
    background: #ffa94d;
}

.school-status {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.avatar-library {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}
