/*
Theme Name: KZHNet01
Description: KZHNet01 Theme - Modern and Responsive
Author: PanJiadong
Version: 2.0
Text Domain: kzhnet01
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.content-area {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Cards */
.posts-container {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-link {
    text-decoration: none;
    color: inherit;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.post-excerpt {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.post-date {
    color: #6c757d;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 2rem;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .current {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.footer-section p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

.beian-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Single Post Styles */
.single-post {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    align-items: center;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
}

.post-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #495057;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #2c3e50;
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6c757d;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.post-tags {
    font-size: 0.9rem;
    color: #6c757d;
}

.post-tags a {
    color: #667eea;
    text-decoration: none;
    margin: 0 0.25rem;
}

.post-tags a:hover {
    text-decoration: underline;
}

.page-links {
    margin: 2rem 0;
    font-weight: 500;
}

.page-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 0.25rem;
}

.page-links a:hover {
    text-decoration: underline;
}

/* Website Search Styles */
.website-search {
    margin-left: 2rem;
}

.website-search form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-search input[type="search"] {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-width: 200px;
}

.website-search button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.website-search button:hover {
    background: #5a67d8;
}

/* Website List Styles */
.website-search-results {
    max-width: 1000px;
    margin: 0 auto;
}

.website-search-results h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.websites-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.website-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.website-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.website-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-title a {
    color: inherit;
    text-decoration: none;
}

.website-title a:hover {
    color: #667eea;
}

.website-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.website-url {
    margin-bottom: 1rem;
}

.website-url a {
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
}

.website-url a:hover {
    color: #667eea;
    text-decoration: underline;
}

.website-description {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.website-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.website-domain {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.website-date,
.website-keywords {
    padding: 0.25rem 0.5rem;
}

/* Search Highlight Styles */
.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

.no-websites {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 3rem;
}

/* Comments Section */
.comments-area {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-top: 2rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-metadata {
    font-size: 0.9rem;
    color: #6c757d;
}

.comment-content {
    line-height: 1.6;
    color: #495057;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .site-title {
        font-size: 1.8rem;
    }
    
    .main-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left {
        width: 100%;
        justify-content: center;
    }
    
    .nav-menu {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .website-search {
        margin-left: 0;
        margin-top: 0;
        width: 100%;
    }
    
    .website-search form {
        justify-content: center;
    }
    
    .website-search input[type="search"] {
        min-width: 150px;
        flex: 1;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .posts-container {
        gap: 1.5rem;
    }
    
    .website-card {
        padding: 1rem;
    }
    
    .website-title {
        font-size: 1.1rem;
    }
    
    .website-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section ul li a:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .pagination .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.6s ease-out;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .pagination {
        display: none;
    }
    
    .post-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
