/* board.css */
.board-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

.board-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 8px;
}
.search-box select,
.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 10px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}
.search-box select { 
    color: #94a3b8; 
    border-right: 1px solid rgba(255,255,255,0.1); 
    cursor: pointer;
}
.search-box select option { background: #1e293b; color: #fff; }
.search-box button {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}
.search-box button:hover { background: rgba(255,255,255,0.2); }

.btn-write {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.btn-write:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59,130,246,0.4);
}

/* Traditional Board Table */
.board-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    text-align: center;
}
.board-table thead {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.board-table th {
    padding: 15px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
}
.board-table td {
    padding: 14px 15px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}
.board-table tr:hover td {
    background: rgba(255,255,255,0.03);
}
.board-table .title-cell {
    text-align: left;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.board-table .title-cell:hover {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.board-table .comment-count {
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 6px;
}
.board-table .hot-tag {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}
.page-btn {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.1);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.page-btn:hover {
    background: rgba(255,255,255,0.1);
}
.page-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Post Detail Styles */
.post-detail-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    margin-bottom: 25px;
}
.post-detail-header h2 {
    font-size: 1.6rem;
    margin: 0 0 15px 0;
    color: #f8fafc;
    word-break: break-all;
    line-height: 1.4;
}
.post-meta {
    font-size: 0.95rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 12px;
}
.post-meta .author { font-weight: 600; color: #cbd5e1; }
.post-meta .divider { color: rgba(255,255,255,0.2); }
.post-detail-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #f1f5f9;
    min-height: 250px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 40px;
}

.post-detail-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 30px;
    margin-bottom: 30px;
    position: relative;
}
.btn-like, .btn-dislike {
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Like Button States */
.btn-like {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.btn-like:hover, .btn-like.active {
    background: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}

/* Dislike Button States */
.btn-dislike {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-dislike:hover, .btn-dislike.active {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,68,68,0.3);
}

/* Comments */
.comments-section h3 {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.comment-item {
    background: rgba(15, 23, 42, 0.4);
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.comment-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.comment-meta .c-author { font-weight: 600; color: #94a3b8; font-size: 0.95rem; }
.comment-meta .c-author.author-marker { color: #3b82f6; border: 1px solid rgba(59,130,246,0.5); padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight:700; }

.comment-body {
    font-size: 1rem;
    color: #f8fafc;
    word-break: break-all;
    line-height: 1.5;
}
.comment-form {
    display: flex;
    gap: 12px;
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.comment-form input {
    flex: 1;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px 18px;
    border-radius: 8px;
    color: #fff;
    outline: none;
    font-size: 1rem;
    transition: 0.2s;
    font-family: inherit;
}
.comment-form input:focus { border-color: #60a5fa; background: rgba(30, 41, 59, 0.9); }
.comment-form button {
    background: #64748b;
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.comment-form button:hover { background: #94a3b8; }

/* Nested Reply UI */
.comment-reply {
    margin-top: 15px;
    margin-left: 20px;
    padding: 15px 20px;
    background: rgba(59, 130, 246, 0.08); /* 파란색 은은한 배경 */
    border-left: 3px solid #3b82f6;
    border-radius: 0 10px 10px 0;
}
.comment-reply .comment-meta { margin-bottom: 6px; }

.btn-reply {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    margin-left: auto; /* 우측 끝으로 밀기 */
}
.btn-reply:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.reply-form-container {
    margin-top: 15px;
    margin-left: 20px;
    display: none;
    gap: 8px;
    animation: fadeIn 0.3s forwards;
}
.reply-form-container input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    transition: 0.2s;
}
.reply-form-container input:focus { border-color: #3b82f6; }
.reply-form-container button {
    background: #3b82f6;
    border: none;
    color: #fff;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.reply-form-container button:hover { background: #2563eb; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modals General */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); }
.modal-content { background: rgba(30, 41, 59, 0.95); border: 1px solid var(--border-color); border-radius: 20px; margin: 5vh auto; padding: 40px; width: 90%; max-width: 800px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); position: relative; color: #e2e8f0; max-height: 90vh; overflow-y: auto; }
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); border-radius: 4px; }
.close-btn { color: #94a3b8; position: absolute; top: 30px; right: 35px; font-size: 32px; font-weight: bold; cursor: pointer; transition: 0.2s; line-height: 1; }
.close-btn:hover { color: #f87171; }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border-color); padding: 16px 20px; border-radius: 10px; color: #fff; font-size: 1.05rem; outline: none; transition: border-color 0.2s; font-family: inherit; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { border-color: #60a5fa; }
.btn-submit { width: 100%; background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: none; padding: 18px; border-radius: 10px; font-size: 1.2rem; font-weight: 600; cursor: pointer; transition: transform 0.2s; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); font-family: inherit; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
#richEditor:focus {
    border-color: #3b82f6 !important;
    background: rgba(15,23,42,1) !important;
}

#richEditor p {
    margin-bottom: 0.5em;
}

#richEditor img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 15px 0;
}

.editor-toolbar button:hover {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 4px;
}
