/*
Theme Name: YPT2025
Description: 自定义WordPress主题，兼容WordPress 6.8.2
Version: 1.0
Author: YPT
*/

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1;
}

/* 移除WordPress默认的顶部管理栏 */
#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}

/* 页头样式 */
.site-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.site-title:hover {
    color: #3498db;
}

/* 立即发布按钮样式 */
.quick-publish {
    flex-shrink: 0;
}

.quick-publish-btn {
    background: #e74c3c;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
    white-space: nowrap;
}

.quick-publish-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
    color: #fff;
    text-decoration: none;
}

/* 用户信息样式 */
.user-info {
    flex-shrink: 0;
}

.login-btn {
    background: #3498db;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
}

.login-btn:hover {
    background: #2980b9;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* 导航栏样式 */
.main-navigation {
    background-color: #fff;
    padding: 0;
    border-bottom: 3px solid #e74c3c;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    height: 50px;
    flex-wrap: nowrap;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-right: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-menu a {
    color: #2c3e50;
    text-decoration: none;
    padding: 12px 10px;
    display: block;
    transition: all 0.3s;
    border-radius: 5px;
    margin: 3px;
    font-size: 14px;
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: #ecf0f1;
    color: #e74c3c;
}

.nav-menu a.current,
.nav-menu a.active {
    background-color: #e74c3c;
    color: #fff;
}

/* 用户下拉菜单样式 */
.user-info .user-menu {
    position: relative;
}

.user-info .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
}

.user-info .user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info .user-dropdown a {
    display: block;
    padding: 12px 15px;
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.3s;
}

.user-info .user-dropdown a:last-child {
    border-bottom: none;
}

.user-info .user-dropdown a:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
}

.user-info .user-dropdown-toggle {
    cursor: pointer;
    background: #3498db;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
}

.user-info .user-dropdown-toggle:hover {
    background: #2980b9;
    color: #fff;
    text-decoration: none;
}

/* 主要内容区域 */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Banner区域 */
.banner-section {
    width: 100%;
    height: 510px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    border-radius: 10px;
}

/* 推荐信息列表 */
.recommended-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.recommended-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding-bottom: 10px;
}

.recommended-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.recommended-item:hover {
    transform: translateY(-5px);
}

.featured-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

.recommended-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recommended-item:hover .recommended-thumb {
    transform: scale(1.05);
}

.recommended-item h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.recommended-item .post-date {
    font-size: 12px;
    color: #7f8c8d;
}

/* 文章列表区域 */
.articles-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.articles-column {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-item {
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
}

.article-item:last-child {
    border-bottom: none;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.article-category {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.top-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.article-title {
    font-size: 16px;
    color: #2c3e50;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.article-title:hover {
    color: #3498db;
}

.article-date {
    font-size: 12px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .nav-menu li {
        margin-right: 0;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .nav-menu li:last-child {
        margin-left: 0;
    }
    
    .recommended-list {
        flex-direction: column;
    }
    
    .recommended-item {
        flex: none;
    }
    
    .articles-section {
        grid-template-columns: 1fr;
    }
    
    .banner-section {
        height: 250px;
    }
}

/* 页脚样式 */
.site-footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-info p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-info a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}
