/* qschool.css - 糗事墙学校页样式 */
.school-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 1.5rem 1rem;
    border-radius: 0 0 20px 20px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}
.school-header img, .school-header .avatar-placeholder {
    width: 56px; height: 56px;
    border-radius: 14px;
    margin-right: 12px;
    flex-shrink: 0;
    object-fit: cover;
}
.avatar-placeholder {
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}
.school-header-info h2 { margin: 0; font-size: 1.2rem; }
.school-header-info p { margin: 4px 0 0; opacity: 0.85; font-size: 0.8rem; }

/* 密钥验证 */
.key-form {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 1rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.key-form h3 { margin: 0 0 0.5rem; color: #333; }
.key-form p { color: #999; font-size: 0.85rem; margin: 0 0 1.5rem; }
.key-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 2px;
}
.key-input:focus { border-color: #ee5a24; outline: none; }
.key-error { color: #e74c3c; font-size: 0.85rem; margin-top: 0.5rem; }
.key-submit {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    margin-top: 1rem;
    cursor: pointer;
}
.key-submit:hover { opacity: 0.9; }

/* 发帖区 */
.post-form-box {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin: 0 1rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.post-form-box textarea {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    font-family: inherit;
}
.post-form-box textarea:focus { border-color: #ee5a24; outline: none; }
.post-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
}
.anon-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 0.85rem;
}
.anon-input:focus { border-color: #ee5a24; outline: none; }
.post-submit {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.post-submit:hover { opacity: 0.9; }

/* 上传按钮美化 */
.post-image-upload {
    margin-top: 0.8rem;
}
.upload-btn-wrapper {
    position: relative;
    display: inline-block;
}
.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #f8f4ed;
    color: #5d4037;
    border: 2px dashed #d7ccc8;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-btn:hover {
    border-color: #ee5a24;
    background: #fff3e0;
    color: #ee5a24;
}
.upload-btn img {
    width: 18px; height: 18px;
}
.upload-btn-wrapper input[type="file"] {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-file-name {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #999;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* 帖子卡片 */
.post-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin: 0 1rem 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.post-card .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.post-card .anon-name {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}
.post-card .post-time {
    font-size: 0.75rem;
    color: #bbb;
}
.post-card .post-body {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    word-break: break-all;
}
.post-card .post-img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* 帖子操作栏 */
.post-card .post-actions {
    display: flex;
    gap: 1.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f5f5f5;
    color: #999;
    font-size: 0.85rem;
}
.like-btn {
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
    transition: color 0.2s;
}
.like-btn:hover { color: #e74c3c; }
.like-btn.liked { color: #e74c3c; }
.comment-btn {
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
    transition: color 0.2s;
}
.comment-btn:hover { color: #5d4037; }

/* 评论区 */
.comments-section {
    margin-top: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}
.comments-section .comment-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f9f9f9;
}
.comments-section .comment-item:last-child { border-bottom: none; }
.comment-nick {
    font-weight: 600;
    color: #555;
    margin-right: 0.3rem;
}
.comment-text { color: #333; word-break: break-all; }
.comment-time { font-size: 0.7rem; color: #ccc; margin-left: 0.5rem; flex-shrink: 0; }

/* 评论输入框 */
.comment-input-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.comment-input-row input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 0.8rem;
}
.comment-input-row input:focus { border-color: #ee5a24; outline: none; }
.comment-input-row button {
    padding: 0.4rem 0.8rem;
    background: #ee5a24;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}
.comment-input-row button:hover { opacity: 0.9; }

.empty-tip { text-align: center; padding: 2rem; color: #bbb; }
.back-link { display: inline-block; padding: 0.8rem 1rem; color: #ee5a24; text-decoration: none; }

/* 评论错误提示 */
.comment-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    padding: 0.3rem 0;
}
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
            padding: 1.5rem 1rem;
            border-radius: 0 0 20px 20px;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
        }
        .school-header img, .school-header .avatar-placeholder {
            width: 56px; height: 56px;
            border-radius: 14px;
            margin-right: 12px;
            flex-shrink: 0;
            object-fit: cover;
        }
        .avatar-placeholder {
            background: rgba(255,255,255,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
        }
        .school-header-info h2 { margin: 0; font-size: 1.2rem; }
        .school-header-info p { margin: 4px 0 0; opacity: 0.85; font-size: 0.8rem; }

        .key-form {
            background: white;
            border-radius: 16px;
            padding: 2rem 1.5rem;
            margin: 1rem;
            text-align: center;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        }
        .key-form h3 { margin: 0 0 0.5rem; color: #333; }
        .key-form p { color: #999; font-size: 0.85rem; margin: 0 0 1.5rem; }
        .key-input {
            width: 100%;
            padding: 0.8rem 1rem;
            border: 2px solid #eee;
            border-radius: 10px;
            font-size: 1rem;
            box-sizing: border-box;
            text-align: center;
            letter-spacing: 2px;
        }
        .key-input:focus { border-color: #ee5a24; outline: none; }
        .key-error { color: #e74c3c; font-size: 0.85rem; margin-top: 0.5rem; }
        .key-submit {
            width: 100%;
            padding: 0.8rem;
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            margin-top: 1rem;
            cursor: pointer;
        }

        .post-form-box {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            margin: 0 1rem 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .post-form-box textarea {
            width: 100%;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 0.8rem;
            font-size: 0.9rem;
            resize: vertical;
            min-height: 80px;
            box-sizing: border-box;
        }
        .post-form-box textarea:focus { border-color: #ee5a24; outline: none; }
        .post-form-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 0.8rem;
        }
        .anon-input {
            flex: 1;
            padding: 0.5rem 0.8rem;
            border: 1px solid #eee;
            border-radius: 8px;
            font-size: 0.85rem;
        }
        .anon-input:focus { border-color: #ee5a24; outline: none; }
        .post-submit {
            padding: 0.5rem 1.5rem;
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
        }
        .post-image-upload {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .post-image-upload input[type="file"] { font-size: 0.8rem; }

        .post-card {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            margin: 0 1rem 0.8rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .post-card .post-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }
        .post-card .anon-name {
            font-weight: 600;
            color: #555;
            font-size: 0.9rem;
        }
        .post-card .post-time {
            font-size: 0.75rem;
            color: #bbb;
        }
        .post-card .post-body {
            font-size: 0.95rem;
            color: #333;
            line-height: 1.6;
            margin-bottom: 0.5rem;
        }
        .post-card .post-img {
            max-width: 100%;
            max-height: 400px;
            width: auto;
            height: auto;
            object-fit: contain;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            display: block;
        }
        .post-card .post-actions {
            display: flex;
            gap: 1rem;
            color: #999;
            font-size: 0.8rem;
        }
        .post-card .post-actions span { cursor: pointer; }
        .like-btn { color: #999; background: none; border: none; cursor: pointer; font-size: 0.85rem; }
        .like-btn.liked { color: #e74c3c; }
        .empty-tip { text-align: center; padding: 2rem; color: #bbb; }

/* 封禁状态样式 */
.key-form.banned { background: #fff5f5; }
.banned-title { color: #e74c3c; }
.banned-info { color: #c62828; }
.banned-hint { color: #999; font-size: 0.85rem; }

/* 自定义上传按钮 */
.upload-btn-wrapper {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.upload-btn-wrapper input[type="file"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}
.upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    background: #fff5f0;
    color: #ee5a24;
    border: 1.5px solid #ffd0b5;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.upload-label:hover {
    background: #ffe8db;
    border-color: #ee5a24;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(238,90,36,0.15);
}
.upload-label:active {
    transform: translateY(0);
    box-shadow: none;
}
.upload-file-name {
    font-size: 0.8rem;
    color: #999;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 评论区 */
.comment-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f0f0f0;
}
.comment-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.comment-input-row input {
    flex: 1;
    padding: 0.4rem 0.8rem;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 0.8rem;
}
.comment-input-row input:focus { border-color: #ee5a24; outline: none; }
.comment-submit-btn {
    padding: 0.4rem 1rem;
    background: #ee5a24;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}
.comment-submit-btn:hover { background: #d94f15; }
.comment-error { color: #e74c3c; font-size: 0.75rem; margin-bottom: 0.3rem; }
.comment-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.8rem;
}
.comment-nick { font-weight: 600; color: #555; margin-right: 0.3rem; }
.comment-text { color: #333; }
.comment-time { font-size: 0.7rem; color: #bbb; white-space: nowrap; margin-left: 0.5rem; }
.comment-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.85rem;
}
