* {
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #2C3E50;
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #34495E;
    border-radius: 10px;
    overflow: hidden;
    height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
}

.header {
    background: #3498DB;
    color: white;
    padding: 12px 15px;
    text-align: center;
}

.header h1 {
    font-size: 1.2em;
    font-weight: 600;
}

.back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow: hidden;
}

.messages-section {
    flex: 1;
    background: #2C3E50;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.message-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.message-name {
    font-weight: 600;
    color: #ECF0F1;
    font-size: 13px;
}

.message-time {
    color: #95A5A6;
    font-size: 11px;
}

.message-content {
    color: #BDC3C7;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.message-reply {
    background: rgba(52,152,219,0.2);
    border-left: 3px solid #3498DB;
    padding: 6px 8px;
    margin-top: 6px;
    border-radius: 4px;
    font-size: 11px;
}

.reply-label {
    color: #5DADE2;
    font-weight: 600;
    font-size: 10px;
    margin-bottom: 2px;
}

.reply-content {
    color: #BDC3C7;
}

.form-section {
    background: #2C3E50;
    border-radius: 8px;
    padding: 12px;
    flex-shrink: 0;
}

.form-title {
    font-size: 13px;
    font-weight: 600;
    color: #ECF0F1;
    margin-bottom: 10px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.form-input {
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    color: #ECF0F1;
    height: 34px;
}

.form-input:focus {
    outline: none;
    border-color: #3498DB;
}

.form-input::placeholder {
    color: #95A5A6;
}

.name-input {
    flex: 1;
}

.captcha-display {
    background: #3498DB;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    min-width: 65px;
    text-align: center;
    height: 34px;
}

.captcha-input {
    width: 80px;
    height: 34px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    color: #ECF0F1;
    text-align: center;
}

.captcha-input:focus {
    outline: none;
    border-color: #3498DB;
}

.content-textarea {
    width: 100%;
    height: 50px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    font-size: 12px;
    resize: none;
    background: rgba(255,255,255,0.1);
    color: #ECF0F1;
}

.content-textarea:focus {
    outline: none;
    border-color: #3498DB;
}

.content-textarea::placeholder {
    color: #95A5A6;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background: #3498DB;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.submit-btn:disabled {
    background: #7F8C8D;
    cursor: not-allowed;
}

.notice {
    background: rgba(52,152,219,0.2);
    border-radius: 5px;
    padding: 6px 10px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #BDC3C7;
    text-align: center;
}

.loading, .no-messages {
    text-align: center;
    padding: 20px;
    color: #95A5A6;
    font-size: 13px;
}

/* 分页 */
.pagination-container {
    padding: 8px 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pagination-info {
    text-align: center;
    color: #95A5A6;
    font-size: 11px;
    margin-bottom: 6px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 5px 8px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #ECF0F1;
    min-width: 28px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: rgba(52,152,219,0.3);
}

.pagination-btn.active {
    background: #3498DB;
}

.pagination-btn.disabled {
    color: #7F8C8D;
    cursor: not-allowed;
}

.pagination-dots {
    color: #95A5A6;
    padding: 0 4px;
    font-size: 11px;
}

/* 滚动条 */
.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.messages-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* 手机端 */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        height: calc(100vh - 10px);
        border-radius: 8px;
    }
    
    .header {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.1em;
    }
    
    .content {
        padding: 8px;
        gap: 8px;
    }
    
    .messages-list {
        padding: 6px;
    }
    
    .message-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .form-section {
        padding: 10px;
    }
    
    .form-row {
        gap: 6px;
    }
    
    .captcha-display {
        min-width: 60px;
        font-size: 12px;
    }
    
    .captcha-input {
        width: 70px;
    }
}
