* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
}

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

.blog-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-title {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0f2b3d, #1e4b6e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-title span {
    color: #3b82f6;
    background: none;
}

.auth-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 4px 16px 4px 8px;
    border-radius: 60px;
    border: 1px solid #e2e8f0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-google, .btn-outline {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-google:hover, .btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.sign-out {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 30px;
    transition: background 0.2s;
}

.sign-out:hover {
    background: #fee2e2;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #3b82f6;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1e4b6e;
}

.posts-container {
    margin: 48px 0 40px;
}

.post-card, .comment-section, .create-post-form, .profile-card {
    background: white;
    border-radius: 28px;
    padding: 28px 32px;
    margin-bottom: 32px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
}

.post-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    word-break: break-word;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #5b6e8c;
    font-size: 0.85rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
}

.post-meta-left {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.post-excerpt {
    color: #334155;
    margin-bottom: 24px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.read-more:hover {
    text-decoration: underline;
}

.delete-post, .edit-post {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-post {
    background: #f59e0b;
    margin-right: 8px;
}

.edit-post:hover {
    background: #d97706;
}

.delete-post:hover {
    background: #dc2626;
}

.share-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3b82f6;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 30px;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #f1f5f9;
}

/* Comments */
.comment-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-list {
    margin-bottom: 28px;
    max-height: 500px;
    overflow-y: auto;
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #eff3f8;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-text {
    margin-top: 6px;
    color: #2c3e50;
    word-break: break-word;
    line-height: 1.5;
}

.comment-date {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 6px;
}

.comment-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #5b6e8c;
    padding: 4px;
    border-radius: 20px;
}

.icon-btn:hover {
    background: #f1f5f9;
}

.comment-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 12px 18px;
    font-family: inherit;
    resize: vertical;
    margin: 12px 0;
}

.btn-submit, .btn-primary {
    background: #0f2b3d;
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-submit:hover, .btn-primary:hover {
    background: #1e4b6e;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.back-home:hover {
    text-decoration: underline;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    background: #f8fafc;
    border-radius: 28px;
    color: #5b6e8c;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background: white;
    border-radius: 32px;
    padding: 28px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content input, .modal-content textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 12px 16px;
    margin: 12px 0;
    font-family: inherit;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.create-post-form input, .create-post-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 12px 18px;
    font-family: inherit;
    margin: 8px 0;
}

.create-post-form textarea {
    min-height: 180px;
    resize: vertical;
}

/* Profile */
.profile-card {
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #e2e8f0;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-email {
    color: #5b6e8c;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .blog-title {
        font-size: 1.4rem;
    }

    .post-card, .comment-section, .create-post-form, .profile-card {
        padding: 20px 24px;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .user-name {
        font-size: 0.8rem;
    }

    .nav-links {
        gap: 12px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-area {
        width: 100%;
        justify-content: space-between;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-actions {
        margin-left: 0;
        margin-top: 8px;
    }
}