body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #000000;
    color: #fff;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin: 0;
    font-family: 'Nunito', sans-serif;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

button i {
    font-size: 0.9rem;
}

.home-button {
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: white;
}

.home-button:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-post {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.blog-post h2 {
    margin-top: 15px;
    font-size: 1.8rem;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    font-family: 'Nunito', sans-serif;
}

.blog-post a.post-title-link {
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.blog-post-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    max-height: 200px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.post-content {
    margin: 15px 0;
    line-height: 1.6;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
    max-height: 100px; /* Limit height for overflow */
    overflow: hidden; /* Hide overflow content */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
    display: -webkit-box;
    -webkit-box-orient: vertical; /* Set box orientation to vertical */
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    color: #ffffff;
}

.blog-date {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 53, 69, 0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 1);
}

.add-post-form {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.add-post-form h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #43a047;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

input:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

textarea {
    height: 150px;
    resize: vertical;
}

.login-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 50px;
    max-width: 400px;
    margin: 0 auto 50px;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.login-form h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #43a047;
}

.empty-message {
    text-align: center;
    font-size: 1.5rem;
    opacity: 0.7;
    margin: 100px 0;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-message i {
    font-size: 3rem;
    opacity: 0.5;
}

.file-input-container {
    position: relative;
}

.file-input-container input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-preview {
    margin-top: 15px;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
}

/* Add these styles for multiple image preview */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(67, 160, 71, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.file-help-text {
    margin-top: 5px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Notification system */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background: rgba(40, 167, 69, 0.9);
}

.notification.error {
    background: rgba(220, 53, 69, 0.9);
}

/* Sorting controls */
.sorting-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 20px;
    border-radius: 10px;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown select {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.reorder-toggle {
    display: flex;
    gap: 10px;
}

.reorder-btn, .save-order-btn {
    background: rgba(67, 160, 71, 0.2);
}

.reorder-btn:hover, .save-order-btn:hover {
    background: rgba(67, 160, 71, 0.4);
}

.blog-posts.reorder-mode .blog-post {
    cursor: move;
    position: relative;
}

.blog-posts.reorder-mode .blog-post::before {
    content: "≡";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.5);
}

.blog-posts.reorder-mode .blog-post:hover::before {
    color: rgba(255, 255, 255, 0.8);
}

.drag-placeholder {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

/* Add this to both blog.css and projects.css */
#cancel-edit {
    background: rgba(108, 117, 125, 0.7);
    margin-left: 0px;
    margin-top: 10px;
}

#cancel-edit:hover {
    background: rgba(108, 117, 125, 0.9);
}
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-toggle button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.language-toggle button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.language-toggle button i {
    font-size: 1rem;
}

.language-toggle button .lang-text {
    font-size: 0.9rem;
}
/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

/* Thêm vào blog.css và projects.css */

/* Form buttons layout */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#signup-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    padding-top: 20px;
}

#signup-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ff9800;
}

.form-title {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Thêm vào cuối file blog.css */
.admin-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.edit-btn, .delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.edit-btn {
    background: rgba(0, 123, 255, 0.8);
}

.delete-btn {
    background: rgba(220, 53, 69, 0.8);
}

.edit-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.edit-btn:active, .delete-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}