/*
Theme Name: Truyện Xu Hướng
Theme URI: https://truyenxuhuong.com
Description: Theme đọc truyện trực tuyến với thiết kế phong cách biển, hỗ trợ đa thể loại, đánh giá sao, và hệ thống quản lý nội dung hoàn chỉnh.
Author: Truyện Xu Hướng Team
Author URI: https://truyenxuhuong.com
Version: 1.0.0
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truyen-xu-huong
Tags: truyen, novel, reading, vietnamese, responsive, custom-post-types
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    color: #48cae4;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-logo:hover {
    color: #023e8a;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Navigation */
.main-navigation {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.main-navigation a:hover {
    background: #48cae4;
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin: 20px 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-button {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
    background: #ee5a52;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Story Grid */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.story-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.story-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-cover {
    transform: scale(1.05);
}

.story-content {
    padding: 20px;
}

.story-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.story-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 2px;
    margin: 10px 0;
}

.star {
    color: #ddd;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star.filled {
    color: #ffd700;
}

.star:hover {
    color: #ffd700;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #48cae4;
}

.section-title {
    font-size: 2rem;
    color: #333;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: #48cae4;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #023e8a;
    transform: translateY(-2px);
}

.pagination .current {
    background: #023e8a;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 40px 0 20px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #48cae4;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #48cae4;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .story-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .story-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* WordPress Specific Styles */
.wp-block-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

/* Custom Post Type Styles */
.post-type-archive-story .site-content,
.single-story .site-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Search Results */
.search-results .story-card {
    margin-bottom: 20px;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #48cae4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
