/* Reset và cài đặt cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
}

.site-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #222;
}

.site-description {
    font-size: 1.2rem;
    color: #666;
}

/* Main Content */
.main-content {
    padding: 20px 0 60px;
}

.intro-section, .posts-section {
    margin-bottom: 50px;
}

.intro-section h2, .posts-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.profile {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.profile-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #222;
}

.profile-content p {
    margin-bottom: 15px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #222;
}

.post-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.post-excerpt {
    color: #444;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    font-weight: 500;
}

/* Thêm CSS cho thumbnail hình ảnh */
.post-thumbnail {
    height: 180px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    margin: -25px -25px 20px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
.footer {
    background-color: #fff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    padding: 30px 0;
    text-align: center;
}

.footer p {
    color: #666;
    margin-bottom: 10px;
}

.admin-link {
    font-size: 0.85rem;
    color: #999;
}

/* Trang chi tiết bài viết */
.post-content {
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 20px;
}

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

.featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Admin Dashboard */
.dashboard-container {
    max-width: 1000px;
    margin: 30px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.btn {
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-new {
    background-color: #28a745;
}

.btn-new:hover {
    background-color: #218838;
}

.btn-logout {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-logout:hover {
    background-color: #e9ecef;
}

.btn-container {
    display: flex;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-published {
    background-color: #d4edda;
    color: #155724;
}

.status-draft {
    background-color: #fff3cd;
    color: #856404;
}

.action-btn {
    margin-right: 8px;
    color: #0066cc;
    cursor: pointer;
}

.delete-btn {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-container {
        margin-top: 15px;
    }
}
/* Thêm CSS cho user-info */
.user-info {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Cập nhật nút login khi disabled */
.btn-login:disabled {
    background-color: #83b7e7;
    cursor: not-allowed;
}
