/*
Theme Name: WPost WordPress文章排行榜主题
Description: 专为wpost.top设计的WordPress文章收录和排行榜主题，使用 TailwindCSS 构建
Version: 1.1
Author: WPost Team
*/

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #f5f5f5;
}

/* 评分系统星星样式 */
.rating-stars {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star:hover,
.star.active,
.star.hover {
    color: #ffc107;
    transform: scale(1.2);
}

.star.interactive:hover {
    color: #ffc107;
    transform: scale(1.2);
}

.rating-system.rated .star {
    cursor: default;
}

.rating-system.rated .star:hover {
    transform: none;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 300px;
}

.message.show {
    transform: translateX(0);
}

.message-success {
    background-color: #28a745;
}

.message-error {
    background-color: #dc3545;
}

.message-warning {
    background-color: #ffc107;
    color: #333;
}

.message-info {
    background-color: #17a2b8;
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    margin-left: 10px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    float: right;
}

/* 加载动画 */
.loading {
    display: inline-block;
    position: relative;
}

.loading:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页样式 */
.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 网格视图样式 */
.post-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.post-list.grid-view .post-item {
    height: auto;
}

/* 头部波浪动画 */
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
    animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-50px); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .post-list.grid-view {
        grid-template-columns: 1fr;
    }
    
    .star {
        font-size: 1.2rem;
    }
    
    .rating-stars {
        gap: 3px;
    }
    
    .message {
        max-width: 250px;
        font-size: 14px;
    }
} 

/* 评论区域样式 */
.comment-section {
    border-top: 1px solid #e5e7eb;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

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

.comment-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.comment-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.comment-submit {
    padding: 0.75rem 1rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.comment-submit:hover {
    background-color: #2563eb;
}

.comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-item {
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.comment-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.comment-text {
    color: #374151;
    line-height: 1.5;
}

/* 排序和视图按钮样式 */
.sort-btn, .view-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.sort-btn:hover, .view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 文章项目样式 */
.post-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
} 