/* 页面基础样式 */
html, body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 视频背景 - 仅首页使用 */
body:not(.article-page) .video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

body:not(.article-page) .video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 半透明黑色蒙版 - 仅首页使用 */
body:not(.article-page) .video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

/* 文章页面背景 */
body.article-page {
    background-color: #1a1a1a;
}

.container {
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 600px;
    margin-top: 100px;
}

.button-container {
    margin-top: 1rem;
    margin-left: 2rem;
}

.content-area {
    margin-top: 2rem;
    margin-left: 2rem;
}

h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.content {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    left: 2rem;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.svg-container {
    text-align: center;
    margin: 2rem 0;
}

.button {
    display: inline-block;
    background: linear-gradient(90deg, #0004ff, #0066ff);
    background-size: 200% 100%;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 200000px;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgb(119, 119, 119);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.button:hover {
    background: linear-gradient(90deg, #0066ff, #0004ff);
    background-size: 200% 100%;
    box-shadow: 0 4px 8px rgb(119, 119, 119);
    transform: translateY(-2px);
}

/* slogin样式 */
slogin {
    display: block;
    font-size: 2.5rem;
    text-align: left;
    font-weight: bold;
    margin: 2rem 0;
    margin-left: 2rem;
    background: linear-gradient(90deg, blue, #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    will-change: background-position;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 100% 0%;
    }
}

/* 文章页面样式 */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.article-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-item {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.3);
}

.article-item,
.article-item *,
button,
.btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-user-select: none;
    user-select: none;
}

.article-item .article-header {
    margin-bottom: 1rem;
    text-align: left;
}

.article-item h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.article-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.article-content .content-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-content code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.article-content pre {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
}

.article-content blockquote {
    border-left: 4px solid #0066ff;
    padding-left: 1rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.article-content ul {
    padding-left: 1.5rem;
}

.article-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, #0004ff, #0066ff);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #0066ff, #0004ff);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.btn-like {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-like:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-like[data-liked="true"] {
    color: #ff6b6b;
}

.like-icon {
    font-size: 1rem;
}

.btn-share {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-share:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}

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

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

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

/* 编辑器工具栏样式 */
.editor-toolbar {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.editor-toolbar .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.editor-toolbar .html-tag-btn {
    background: transparent;
    color: #5f6368;
    border: none;
    color: rgba(255, 255, 255, 0.8);
}

.editor-toolbar .html-tag-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
}

.editor-toolbar .html-tag-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.editor-toolbar .insert-image-btn {
    background: linear-gradient(90deg, #0004ff, #0066ff) !important;
    color: #fff !important;
    border: none !important;
}

.editor-toolbar .insert-image-btn:hover {
    background: linear-gradient(90deg, #0066ff, #0004ff) !important;
    transform: translateY(-2px);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: rgba(30, 30, 30, 0.95);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    color: #fff;
}

.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066ff;
    background-color: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Toast消息提示 */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    z-index: 3000;
    display: none;
}

.toast-success {
    background-color: #27ae60;
}

.toast-error {
    background-color: #e74c3c;
}

/* 加载状态 */
.loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    padding: 2rem;
}

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #0066ff;
    text-decoration: none;
    cursor: pointer;
    transform: scale(1.2);
}