/*
 * Feliex自定义样式
 */

/* 页面加载动画 */
.site {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 增强的导航样式 */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

/* 移动端菜单 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        display: none;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 1rem;
    }
}

/* 文章卡片样式 */
.entry-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.entry-card .post-thumbnail {
    overflow: hidden;
}

.entry-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.entry-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.entry-card .entry-content {
    padding: 1.5rem;
}

/* 元信息样式 */
.entry-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entry-meta span {
    margin-right: 1rem;
}

.entry-meta span:before {
    content: "• ";
    color: #3498db;
    font-weight: bold;
    margin-right: 0.5rem;
}

.entry-meta span:first-child:before {
    content: "";
}

/* 分页样式 */
.pagination {
    margin: 3rem 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.pagination .current {
    background: #3498db;
    color: white;
}

/* 评论样式 */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
}

.comment-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 表单样式 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* 小工具样式 */
.widget {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #3498db;
}

/* 滚动到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.scroll-to-top.show {
    display: flex;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
