/* ========================================================
   GOGETA - DIỄN ĐÀN (diendan.css)
   Inspired by Chibi Super Saiyan Blue Gogeta Watercolor Style
   ======================================================== */

.forum-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: "Nunito", sans-serif;
    background: #ffffff;
}

/* User Header Banner */
.forum-user-header {
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 3.5px solid #0f172a;
    padding: 18px 15px;
    text-align: center;
    position: relative;
}

.forum-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    border: 3px solid #0f172a;
    margin: 0 auto 10px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.6), 2px 2px 0 #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-avatar-male {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
}

.forum-avatar-female {
    background: linear-gradient(135deg, #f472b6, #db2777);
}

.forum-avatar-namek {
    background: linear-gradient(135deg, #4ade80, #16a34a);
}

.forum-avatar-admin {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.forum-username {
    color: #0f172a;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.forum-user-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.forum-btn {
    background: linear-gradient(180deg, #ffe066 0%, #ff9800 60%, #e65100 100%);
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 800;
    font-family: "Nunito", "Baloo 2", sans-serif;
    text-decoration: none;
    font-size: 13px;
    box-shadow: 2px 2px 0 #0f172a;
    transition: all 0.15s ease;
    display: inline-block;
}

.forum-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 4px 0 #0f172a;
}

.forum-header-btn {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    color: #ffffff;
    border: 2.5px solid #0f172a;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 800;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    margin: 0 8px;
    box-shadow: 3px 3px 0 #0f172a;
    transition: all 0.2s ease;
}

.forum-header-btn:hover {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 4px 5px 0 #0f172a, 0 8px 18px rgba(2, 132, 199, 0.35);
}

.forum-header-btn:last-child {
    background: linear-gradient(180deg, #ffe066 0%, #ff9800 100%);
    color: #0f172a;
}

/* Post Items */
.forum-posts-section {
    padding: 16px;
    min-height: 320px;
}

.forum-post-item {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 2.5px 2.5px 0 #0f172a;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.forum-post-item:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    transform: translateX(4px);
    box-shadow: 3px 4px 0 #0f172a, 0 6px 14px rgba(2, 132, 199, 0.15);
}

.forum-post-item.top-post {
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 6px solid #0284c7;
}

.forum-post-item.top-post:hover {
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
}

.forum-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #0f172a;
    background: #ffffff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 1.5px 1.5px 0 #0f172a;
}

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

.forum-post-content {
    flex: 1;
    min-width: 0;
}

.forum-post-title {
    color: #0284c7;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 4px;
    text-decoration: none;
    display: block;
    line-height: 1.35;
    transition: color 0.15s;
}

.forum-post-title:hover {
    color: #0369a1;
    text-decoration: underline;
}

.forum-post-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-weight: 600;
}

.forum-post-author {
    color: #d97706;
    font-weight: 800;
}

.forum-post-server {
    background: #e2e8f0;
    color: #334155;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Post Detail */
.forum-detail-container {
    display: flex;
    gap: 15px;
    padding: 18px;
    align-items: flex-start;
}

.forum-detail-avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 2.5px solid #0f172a;
    box-shadow: 2px 2px 0 #0f172a;
    overflow: hidden;
    margin-bottom: 6px;
}

.forum-detail-wrapper {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 2.5px solid #0f172a;
    border-radius: 16px;
    box-shadow: 3.5px 3.5px 0 #0f172a;
    overflow: hidden;
}

.forum-detail-header {
    background: #ffffff;
    padding: 18px;
}

.forum-detail-title {
    color: #0284c7;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.forum-detail-content {
    color: #1e293b;
    line-height: 1.7;
    font-size: 15px;
    white-space: pre-line;
    word-break: break-word;
}

/* Comments Section */
.forum-comments-section {
    background: #f8fafc;
    border-top: 2.5px solid #0f172a;
    padding: 16px;
}

.forum-comment-item {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 2px 2px 0 #0f172a;
    margin-bottom: 12px;
}

.forum-comment-body {
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
}

/* Comment Form */
.forum-comment-form {
    background: #f0f9ff;
    border: 2.5px solid #0f172a;
    border-radius: 16px;
    padding: 16px;
    margin-top: 18px;
    box-shadow: 3px 3px 0 #0f172a;
}

.forum-comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #0f172a;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    outline: none;
}

.forum-comment-form textarea:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.forum-comment-form button {
    background: linear-gradient(180deg, #ffe066 0%, #ff9800 60%, #e65100 100%);
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 12px;
    padding: 9px 24px;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    font-size: 14px;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 2.5px 2.5px 0 #0f172a;
    transition: all 0.15s ease;
}

.forum-comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 3.5px 4px 0 #0f172a;
}

/* ==========================================
 * POST CREATION FORM (TẠO BÀI VIẾT MỚI)
 * ========================================== */
.forum-post-form {
    background: #ffffff;
    border: 2.5px solid #0f172a;
    border-radius: 16px;
    padding: 24px;
    margin: 15px;
    box-shadow: 4px 4px 0 #0f172a;
}

.forum-post-form h3 {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 20px;
    color: #b45309;
    margin-bottom: 18px;
}

.forum-form-group {
    margin-bottom: 16px;
}

.forum-form-group label {
    display: block;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 6px;
}

.forum-form-group input[type="text"],
.forum-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #0f172a;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.forum-form-group textarea {
    width: 100%;
    min-height: 280px;
    padding: 12px 14px;
    border: 2px solid #0f172a;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    background: #f8fafc;
    box-sizing: border-box;
    resize: vertical;
    transition: all 0.2s ease;
}

.forum-form-group input[type="text"]:focus,
.forum-form-group select:focus,
.forum-form-group textarea:focus {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.forum-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1.5px dashed #cbd5e1;
}

.forum-cancel-btn {
    background: #94a3b8;
    color: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 10px;
    padding: 9px 20px;
    font-weight: 800;
    font-family: "Nunito", "Baloo 2", sans-serif;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 2px 2px 0 #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.forum-cancel-btn:hover {
    background: #64748b;
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #0f172a;
}

.forum-submit-btn {
    background: linear-gradient(180deg, #ffe066 0%, #ff9800 60%, #e65100 100%);
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 10px;
    padding: 9px 28px;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 2.5px 2.5px 0 #0f172a;
    transition: all 0.15s ease;
}

.forum-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3.5px 4px 0 #0f172a;
}

/* ========================================================
   FORUM CONTAINER EXPANSION & RESPONSIVE LAYOUT
   ======================================================== */
.main-wrapper.forum-main-wrapper {
    max-width: 960px !important;
    width: 95% !important;
}

.forum-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 2px 2px 0 #0f172a;
    transition: all 0.15s ease;
}

.forum-back-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.forum-detail-avatar-left {
    width: 72px;
    flex-shrink: 0;
    text-align: center;
    position: sticky;
    top: 20px;
}

.forum-detail-avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 2.5px solid #0f172a;
    box-shadow: 2px 2px 0 #0f172a;
    overflow: hidden;
    margin: 0 auto 6px;
    position: relative;
}

.forum-detail-avatar-name {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
    line-height: 1.2;
    margin-bottom: 3px;
}

.forum-detail-avatar-server {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border-radius: 6px;
    padding: 2px 6px;
    display: inline-block;
}

.forum-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.forum-detail-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.forum-detail-score {
    font-size: 12px;
    font-weight: 800;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 6px;
}

/* Post Images & Content Images */
.forum-post-images {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.forum-post-image {
    width: 100%;
    text-align: center;
    position: relative;
}

.forum-post-image a {
    display: inline-block;
    max-width: 100%;
    text-decoration: none;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.forum-post-image a:hover {
    transform: scale(1.008);
}

.forum-post-image-badge {
    display: inline-block;
    background: #0f172a;
    color: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    margin-top: 6px;
    letter-spacing: 0.3px;
    box-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.2);
}

.forum-post-image img,
.forum-post-images img,
.forum-detail-content img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 12px;
    border: 2px solid #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Admin Actions on Post Detail */
.forum-detail-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.forum-edit-btn,
.forum-lock-btn,
.forum-delete-btn {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    border: 1.5px solid #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 2px 2px 0 #0f172a;
    transition: all 0.15s ease;
}

.forum-edit-btn {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #0284c7;
}

.forum-edit-btn:hover {
    background: #bae6fd;
    color: #0c4a6e;
    transform: translateY(-1px);
}

.forum-lock-btn {
    background: #f1f5f9;
    color: #1e293b;
}

.forum-lock-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.forum-delete-btn {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #991b1b;
}

.forum-delete-btn:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.forum-comment-container {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
}

.forum-comment-avatar-left {
    width: 50px;
    flex-shrink: 0;
    text-align: center;
}

.forum-comment-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #0f172a;
    box-shadow: 1.5px 1.5px 0 #0f172a;
    overflow: hidden;
    margin: 0 auto 4px;
    position: relative;
}

.forum-comment-avatar-name {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.forum-comment-avatar-server {
    font-size: 10px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border-radius: 4px;
    padding: 1px 4px;
    display: inline-block;
}

.forum-comment-item {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 2px 2px 0 #0f172a;
    margin-bottom: 0;
}

.forum-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.forum-comment-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.forum-comment-score {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
}

.forum-delete-btn-small {
    display: inline-block;
    margin-top: 8px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .main-wrapper.forum-main-wrapper {
        width: 100% !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 0;
    }
    .forum-detail-container {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }
    .forum-detail-avatar-left {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        position: static;
    }
    .forum-detail-avatar-circle {
        margin: 0;
    }
}

