/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #3D3D4F;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #FF7500 0%, #ff8c2e 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    transform: translateY(0);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.auth-btn:hover {
    background-color: white;
    color: #FF7500;
}

.admin-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
}

/* 发布文章区域 */
.publish-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.publish-section h2 {
    color: #3D3D4F;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-left: 4px solid #FF7500;
    padding-left: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #3D3D4F;
    font-weight: 600;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF7500;
}

.toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-btn {
    background-color: #3D3D4F;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background-color: #2d2d3f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #FF7500 0%, #ff8c2e 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 117, 0, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 117, 0, 0.4);
}

.copy-btn {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* 文章列表区域 */
.articles-section {
    background: transparent;
    padding: 2rem;
    border-radius: 12px;
}

.articles-section h2 {
    color: #3D3D4F;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-left: 4px solid #FF7500;
    padding-left: 1rem;
}

/* 搜索框 */
.search-box {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #FF7500 0%, #ff8c2e 100%);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 117, 0, 0.3);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box input::placeholder {
    color: #999;
}

.clear-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #FF7500;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-btn:hover {
    background-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 文章卡片 */
.article-card {
    background: linear-gradient(135deg, #FF7500 0%, #ff8c2e 100%);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(255, 117, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 117, 0, 0.4);
}

.article-title {
    color: white;
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.article-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.article-category {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.article-date {
    color: white;
    font-weight: 600;
}

.article-content {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    color: #333;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content a {
    color: #FF7500;
    text-decoration: none;
    border-bottom: 1px solid #FF7500;
    transition: all 0.3s ease;
    font-weight: 600;
}

.article-content a:hover {
    color: #ff8c2e;
    border-bottom-color: #ff8c2e;
}

.delete-btn {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background-color: #dc3545;
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 登录模态框 */
.modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(61, 61, 79, 0.95);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    animation: slideDown 0.4s ease;
}

.modal-content h2 {
    color: #3D3D4F;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.login-hint {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

/* 欢迎信息 */
.welcome-message {
    text-align: center;
    padding: 3rem 2rem;
}

.welcome-message h3 {
    color: #3D3D4F;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome-message p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 117, 0, 0.2);
    border-color: #FF7500;
}

.category-icon {
    font-size: 3rem;
}

.category-name {
    color: #3D3D4F;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .publish-section,
    .articles-section {
        padding: 1.5rem;
    }

    .toolbar {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }
}
