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

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Main Layout */
.main-container {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Sidebar */
.sidebar {
    flex: 0 0 300px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.sidebar h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-me {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.stat i {
    color: var(--accent-color);
}

.categories, .recent-posts {
    margin-bottom: 2rem;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.category:hover {
    background: var(--primary-color);
    color: white;
}

.recent-post {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.recent-post:hover {
    color: var(--primary-color);
}

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

/* Blog Content */
.blog-content {
    flex: 1;
    min-width: 0;
}

/* Form Styles */
.new-post-form, .about-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.new-post-form h2, .about-section h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#post-form input, #post-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

#post-form input:focus, #post-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

#post-form textarea {
    resize: vertical;
    min-height: 200px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.publish-btn {
    background: var(--primary-color);
    color: white;
}

.publish-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.cancel-btn, .back-btn {
    background: var(--gray-color);
    color: white;
}

.cancel-btn:hover, .back-btn:hover {
    background: #5a6268;
}

/* Posts Container */
.posts-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.posts-header h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-post-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.new-post-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Blog Post Card */
.blog-post {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.blog-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

.post-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0;
}

.post-category {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.post-content {
    margin-bottom: 1rem;
    color: var(--gray-color);
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.action-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 100;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .posts-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .blog-content, .new-post-form, .about-section, .posts-container {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}