/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Baskerville', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2b2b2b;
    background-color: #f7f3e9;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23d9c7a7" stroke-width="1"/></svg>');
    background-size: 20px 20px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(255, 252, 245, 0.9);
    border: 1px solid #d9c7a7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    margin-bottom: 30px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
    border-bottom: 2px solid #d9c7a7;
    padding-bottom: 20px;
}

header h1 {
    color: #5a4a42;
    margin-bottom: 15px;
    font-weight: normal;
    letter-spacing: 1px;
    font-size: 2.2em;
}

.dot {
    color: #d9c7a7;
    font-size: 0.8em;
    cursor: pointer;
    opacity: 0.6;
}

/* 响应式布局调整 */
@media (max-width: 600px) {
    header {
        padding-top: 30px;
    }
    
    .admin-button {
        width: auto;
        right: 0;
    }
    
    .container {
        padding: 20px;
    }
}

.admin-button:hover {
    background-color: #f0f0f0;
}

/* 句子卡片样式 */
.sentence-card {
    background-color: rgba(255, 252, 245, 0.9);
    border: 1px solid #d9c7a7;
    border-radius: 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
}

.sentence-card::before {
    content: """;
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 3em;
    color: #d9c7a7;
    opacity: 0.5;
    font-family: 'Baskerville', 'Times New Roman', serif;
}

.sentence-content {
    font-size: 1.2em;
    margin-bottom: 15px;
    line-height: 1.7;
    color: #3a3a3a;
    padding-left: 15px;
    font-style: italic;
    letter-spacing: 0.3px;
}

.sentence-author {
    font-style: normal;
    color: #5a4a42;
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

/* 投票区域样式 */
.vote-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d9c7a7;
    padding-top: 15px;
}

.vote-count {
    color: #5a4a42;
    font-family: 'Baskerville', 'Times New Roman', serif;
}

.vote-button {
    background-color: #5a4a42;
    color: #f7f3e9;
    border: 1px solid #5a4a42;
    padding: 6px 18px;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Baskerville', 'Times New Roman', serif;
    letter-spacing: 1px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.vote-button:hover {
    background-color: #f7f3e9;
    color: #5a4a42;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #f7f3e9;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #d9c7a7;
    width: 80%;
    max-width: 500px;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.management-panel {
    max-width: 700px;
}

.close {
    color: #5a4a42;
    float: right;
    font-size: 28px;
    font-weight: normal;
    cursor: pointer;
    opacity: 0.7;
}

.close:hover {
    color: #5a4a42;
    opacity: 1;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #5a4a42;
    font-family: 'Baskerville', 'Times New Roman', serif;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d9c7a7;
    background-color: rgba(255, 252, 245, 0.9);
    border-radius: 0;
    font-family: 'Baskerville', 'Times New Roman', serif;
    color: #3a3a3a;
}

button {
    background-color: #5a4a42;
    color: #f7f3e9;
    border: 1px solid #5a4a42;
    padding: 10px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Baskerville', 'Times New Roman', serif;
    letter-spacing: 1px;
}

button:hover {
    background-color: #f7f3e9;
    color: #5a4a42;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d9c7a7;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 15px;
    color: #5a4a42;
    font-weight: normal;
    letter-spacing: 0.5px;
}

/* 管理面板中的句子项 */
.manage-sentence-item {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    position: relative;
}

.manage-sentence-content {
    margin-bottom: 10px;
}

.manage-sentence-author {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.manage-sentence-votes {
    color: #2c3e50;
    font-weight: bold;
}

.manage-sentence-actions {
    margin-top: 10px;
}

.edit-btn, .delete-btn {
    padding: 5px 10px;
    margin-right: 10px;
    font-size: 14px;
}

.edit-btn {
    background-color: #f39c12;
}

.edit-btn:hover {
    background-color: #e67e22;
}

.delete-btn {
    background-color: #e74c3c;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #777;
}