/* Posts List Page Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #495057;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.navbar-menu .btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.navbar-menu .btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.navbar-menu .btn-primary {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.navbar-menu .btn-primary:hover {
    background: #495057;
    border-color: #495057;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

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

.header-text {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-write {
    background: #000000;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-write:hover {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .btn-write {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Search Section */
.search-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.search-group {
    flex: 1;
}

.search-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000000;
}

.search-types {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.search-types input[type="checkbox"] {
    margin-right: 0.25rem;
}

.search-types label {
    font-weight: normal;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #495057;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #000000;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #495057;
    transform: translateY(-1px);
}

/* Posts Table */
.posts-table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.table-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 1rem;
    align-items: center;
}

.table-header > div {
    text-align: center;
}

.table-header > div:first-child {
    text-align: left;
}

.post-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 1rem;
    align-items: center;
    transition: background-color 0.2s ease;
}

.post-item:hover {
    background: #f8f9fa;
}

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

.post-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    text-decoration: none;
    line-height: 1.4;
}

.post-title:hover {
    color: #495057;
}

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

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.post-author {
    text-align: center;
    color: #495057;
    font-weight: 500;
}

.post-date {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    fill: #adb5bd;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-message {
    font-size: 1rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border: 1px solid #e9ecef;
    background: #ffffff;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.pagination .current {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.pagination .disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.pagination .disabled:hover {
    background: #ffffff;
    border-color: #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-menu {
        gap: 0.5rem;
    }
    
    .navbar-menu .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-header,
    .post-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .table-header {
        display: none;
    }
    
    .post-item {
        padding: 1rem;
    }
    
    .post-main {
        order: 1;
    }
    
    .post-author,
    .post-date {
        text-align: left;
        font-size: 0.85rem;
    }
    
    .post-stats {
        justify-content: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.125rem;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .search-section {
        padding: 1rem;
    }
    
    .search-types {
        flex-wrap: wrap;
    }
    
    .post-stats {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
}