/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* 管理页面样式 */
.admin-body {
    background-color: #ffffff;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.upload-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-form {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
}

.preview-section {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.mobile-camera-btn {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.upload-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background-color: #1976D2;
}

.preview-container {
    position: relative;
    height: 300px;
    background-color: #fff;
    border: 2px dashed #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img,
.preview-container video,
.preview-container iframe {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.uploaded-files {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.file-item {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.file-item:hover {
    transform: translateY(-5px);
}

.file-thumbnail {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    padding: 0.75rem;
}

.file-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-actions {
    display: flex;
    justify-content: space-between;
}

.file-action-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #FFC107;
    color: #333;
}

.delete-btn {
    background-color: #F44336;
    color: white;
}

/* 浏览页面样式 */
.front-body {
    background-color: #eef2f3;
}

.front-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.browse-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.control-panel {
    flex: 1;
    min-width: 250px;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-box input {
    width: calc(100% - 80px);
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    float: left;
    margin-right: 0.5rem;
}

.search-box button {
    padding: 0.5rem 1rem;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    float: left;
    font-size: 1rem;
}

.filter-section {
    margin-top: 1.5rem;
}

.category-filter,
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filter-tag {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.filter-tag.active {
    background-color: #2196F3;
    color: white;
}

.auto-play {
    margin-top: 1.5rem;
}

.content-panel {
    flex: 2;
    min-width: 400px;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.viewer {
    height: 500px;
    background-color: #f0f0f0;
    border: 2px dashed #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.viewer img,
.viewer video,
.viewer iframe {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.thumbnail-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 2px solid #a5d6a7;
}

.thumbnail {
    height: 120px;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-info {
    padding: 0.5rem;
}

.thumbnail-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.thumbnail-tag {
    padding: 0.2rem 0.4rem;
    border-radius: 15px;
    font-size: 0.7rem;
}

/* 公共样式 */
h1, h2, h3 {
    margin-top: 0;
    color: #2c3e50;
}

button {
    outline: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-section {
        flex-direction: column;
    }
    
    .browse-section {
        flex-direction: column;
    }
    
    .thumbnail-item {
        grid-column: span 2;
    }
}

/* 添加到 static/css/style.css */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-previous, .nav-next {
    max-width: 45%;
}

.nav-previous span, .nav-next span {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.nav-previous a, .nav-next a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.nav-previous a:hover, .nav-next a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-previous, .nav-next {
        max-width: 100%;
    }
}


