/* ============================================
   Board Styles — RagnaGate Community
   ============================================ */

/* === Category Tabs === */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    height: 0;
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.cat-tab:hover {
    color: var(--text-primary);
    background: var(--bg-surface-3);
}

.cat-tab.active {
    color: var(--accent);
    background: rgba(232, 168, 56, 0.08);
    border-color: var(--accent);
    font-weight: 700;
}

/* === Post Category Badge === */
.post-category-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
    margin-right: 6px;
    line-height: 1.5;
    white-space: nowrap;
}

/* === Form Select (Category Dropdown) === */
.form-select {
    width: 100%;
    max-width: 300px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    cursor: pointer;
    appearance: auto;
}

.form-select:focus {
    border-color: var(--accent);
}

/* === Board Container === */
.board-container {
    max-width: var(--max-width);
    margin: 30px auto;
    padding: 0 20px;
}

/* === Breadcrumb === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 12px 0;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--text-muted);
    font-size: 10px;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* === Board Header === */
.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.board-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-header h1 .board-icon {
    font-size: 22px;
}

.board-header .board-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === Board Toolbar === */
.board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.board-toolbar .post-count {
    font-size: 13px;
    color: var(--text-muted);
}

.board-toolbar .post-count strong {
    color: var(--accent);
    font-weight: 700;
}

/* === Search Form === */
.board-search {
    display: flex;
    gap: 8px;
}

.board-search select {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.board-search select:focus {
    border-color: var(--accent);
}

.board-search input[type="text"] {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: border-color var(--transition);
}

.board-search input[type="text"]:focus {
    border-color: var(--accent);
}

.board-search input[type="text"]::placeholder {
    color: var(--text-muted);
}

.board-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.board-search button:hover {
    background: var(--primary-dark);
}

/* === Board Table === */
.board-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.board-table thead {
    background: var(--bg-surface-3);
}

.board-table th {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.board-table td {
    padding: 13px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(42, 47, 62, 0.4);
    text-align: center;
}

.board-table tbody tr {
    transition: background var(--transition);
}

.board-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.board-table tbody tr:last-child td {
    border-bottom: none;
}

.board-table .col-no {
    width: 60px;
}

.board-table .col-title {
    text-align: left;
    max-width: 500px;
}

.board-table .col-author,
.board-table .td-author {
    width: 150px;
    text-align: left;
}

.board-table .col-date,
.board-table .td-date {
    width: 110px;
}

.board-table .col-comments,
.board-table .td-comments {
    width: 70px;
}

.board-table .col-recommend,
.board-table .td-recommend {
    width: 60px;
}

.board-table .col-views,
.board-table .td-views {
    width: 70px;
}

.board-table .post-title-link {
    color: var(--text-primary);
    font-weight: 400;
    transition: color var(--transition);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.board-table .post-title-link:hover {
    color: var(--accent);
}

.board-table .comment-count {
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

.board-table .new-badge {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.board-table .td-no {
    color: var(--text-muted);
    font-size: 13px;
}

.board-table .td-author {
    color: var(--text-secondary);
    font-size: 13px;
}

.board-table .td-date {
    color: var(--text-muted);
    font-size: 12px;
}

.board-table .td-views {
    color: var(--text-muted);
    font-size: 12px;
}

/* Empty State */
.board-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Pinned Posts */
.board-table tr.pinned-row {
    background: rgba(232, 168, 56, 0.12);
    /* Increased distinction */
}

.board-table tr.pinned-row:hover {
    background: rgba(232, 168, 56, 0.18);
}

.pin-badge {
    display: none;
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-surface-2);
}

.pagination a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(232, 168, 56, 0.05);
}

.pagination .active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* === Board Bottom Actions === */
.board-bottom {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 168, 56, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c73838;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--border-color-light);
    background: var(--bg-surface-3);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* Administrative Form Fields - Hiding for Admins */
.form-group.admin-hidden {
    display: none !important;
}

.comment-write-row.admin-hidden {
    display: none !important;
}

/* === Write / Edit Form === */
.write-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.write-form .form-group {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.write-form .form-group:last-of-type {
    border-bottom: none;
}

.write-form .form-label {
    flex-shrink: 0;
    width: 120px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-3);
    text-align: center;
}

.write-form .form-input {
    flex: 1;
    padding: 14px 20px;
}

.write-form input[type="text"],
.write-form input[type="password"] {
    width: 100%;
    max-width: 300px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.write-form input[type="text"].full-width {
    max-width: 100%;
}

.write-form input:focus {
    border-color: var(--accent);
}

.write-form input::placeholder {
    color: var(--text-muted);
}

.write-form .form-group-content {
    border-bottom: none;
    flex-direction: column;
    align-items: stretch;
}

.write-form .form-group-content .form-label {
    width: 100%;
    text-align: left;
    padding: 14px 20px 10px;
}

.write-form textarea {
    width: 100%;
    min-height: 350px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
    margin: 20px;
    width: calc(100% - 40px);
}

.write-form textarea:focus {
    border-color: var(--accent);
}

.write-form textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

/* === View Post === */
.post-view {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-view-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.post-view-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.4;
}

.post-view-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.post-view-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-view-meta .meta-label {
    color: var(--text-muted);
}

.post-view-meta .meta-value {
    color: var(--text-secondary);
    font-weight: 500;
}

.post-view-content {
    padding: 30px 28px;
    min-height: 200px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
}

.post-view-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
}

/* === Comments Section === */
.comments-section {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-3);
}

.comments-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-header .count {
    color: var(--accent);
    font-size: 14px;
}

.comment-list {
    list-style: none;
}

.comment-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(42, 47, 62, 0.4);
    transition: background var(--transition);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.01);
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-meta .comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-meta .comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-meta .comment-actions {
    display: flex;
    gap: 8px;
}

.comment-meta .comment-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all var(--transition);
    font-family: inherit;
}

.comment-meta .comment-actions button:hover {
    color: var(--danger);
    background: rgba(224, 72, 72, 0.1);
}

/* Comment Delete Button (Themed) */
.btn-comment-delete {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.btn-comment-delete:hover {
    background: rgba(224, 72, 72, 0.12);
    border-color: var(--danger);
    color: var(--danger);
}

.comment-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-deleted {
    color: var(--text-muted);
    font-style: italic;
}

.comment-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Comment Form === */
.comment-write {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-2);
}

.comment-write-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-write input[type="text"],
.comment-write input[type="password"] {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    width: 150px;
}

.comment-write input:focus,
.comment-write textarea:focus {
    border-color: var(--accent);
}

.comment-write input::placeholder,
.comment-write textarea::placeholder {
    color: var(--text-muted);
}

.comment-write-body {
    display: flex;
    gap: 10px;
}

.comment-write textarea {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color var(--transition);
    min-height: 70px;
}

.comment-write .btn-comment-submit {
    flex-shrink: 0;
    align-self: stretch;
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.comment-write .btn-comment-submit:hover {
    background: var(--primary-dark);
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease-out;
    position: relative;
    /* For X button positioning */
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal input[type="password"] {
    width: 100%;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    margin-bottom: 16px;
    transition: border-color var(--transition);
}

.modal input[type="password"]:focus {
    border-color: var(--accent);
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Confirm Specific Modals */
.modal-actions .btn {
    min-width: 90px;
}

/* Alert Modal Specifics */
#alert-desc {
    text-align: center;
    padding: 10px 0 20px;
    font-size: 15px;
    color: var(--text-primary);
}

#alert-modal .modal-actions {
    justify-content: center;
}

/* === Alert Messages === */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-success {
    background: rgba(72, 200, 120, 0.1);
    border-color: rgba(72, 200, 120, 0.3);
    color: #48c878;
}

.alert-error {
    background: rgba(224, 72, 72, 0.1);
    border-color: rgba(224, 72, 72, 0.3);
    color: var(--danger);
}

.alert-info {
    background: rgba(74, 144, 217, 0.1);
    border-color: rgba(74, 144, 217, 0.3);
    color: var(--primary-light);
}

/* === Responsive === */
@media (max-width: 768px) {
    .board-container {
        padding: 0 14px;
        margin-top: 16px;
    }

    .board-header h1 {
        font-size: 20px;
    }

    .board-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .board-search {
        flex-wrap: wrap;
    }

    .board-search input[type="text"] {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .category-tabs {
        padding: 6px;
        overflow-x: auto;
    }

    .cat-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* Transform Table to Card List */
    .board-table,
    .board-table tbody,
    .board-table tr,
    .board-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .board-table thead,
    .board-table .td-no {
        display: none;
    }

    .board-table tr {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(42, 47, 62, 0.4);
        background: transparent;
    }

    .board-table tbody tr:hover {
        background: var(--bg-card-hover);
    }

    .board-table td {
        padding: 0;
        border: none;
        text-align: left;
    }

    .board-table .col-title {
        margin-bottom: 10px;
        font-size: 15px;
        line-height: 1.4;
        display: flex;
        align-items: center;
        gap: 6px;
        overflow: hidden;
    }
    .board-table .post-title-link {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
    }

    .board-table .td-author,
    .board-table .td-date,
    .board-table .td-comments,
    .board-table .td-recommend,
    .board-table .td-views {
        display: inline-block;
        font-size: 12px;
        color: var(--text-muted);
        width: auto !important;
    }

    .board-table .td-author {
        color: var(--text-secondary);
        font-weight: 500;
    }

    .board-table .td-author::after,
    .board-table .td-date::after,
    .board-table .td-comments::after,
    .board-table .td-recommend::after {
        content: '·';
        margin: 0 6px;
        color: rgba(255, 255, 255, 0.15);
        display: inline-block;
    }

    .board-table .td-views::before {
        content: '조회 ';
    }

    .board-table .td-recommend::before {
        content: '추천 ';
    }

    .board-table .td-comments::before {
        content: '댓글 ';
    }

    /* Pagination */
    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 4px;
        font-size: 12px;
    }

    /* View Post */
    .post-view-header {
        padding: 18px 16px;
    }

    .post-view-header h1 {
        font-size: 18px;
    }

    .post-view-meta {
        gap: 12px;
    }

    .post-view-meta .meta-item {
        font-size: 12px;
    }

    .post-view-content {
        padding: 20px 16px;
        font-size: 14px;
    }

    .post-view-actions {
        padding: 14px 16px;
        justify-content: center;
    }

    /* Comments */
    .comments-header {
        padding: 14px 16px;
    }

    .comment-item {
        padding: 14px 16px;
    }

    /* Form */
    .write-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .write-form .form-label {
        width: 100%;
        text-align: left;
        padding: 12px 16px 6px;
        background: transparent;
        border-bottom: none;
    }

    .write-form .form-input {
        padding: 6px 16px 16px;
    }

    .write-form input[type="text"],
    .write-form input[type="password"],
    .form-select {
        max-width: 100%;
    }

    .write-form textarea {
        min-height: 250px;
        margin: 0 16px 16px;
        width: calc(100% - 32px);
    }

    .write-form .form-group-content .form-label {
        padding: 16px 16px 10px;
    }

    .comment-write {
        padding: 16px;
    }

    .comment-write-row {
        flex-direction: column;
    }

    .comment-write input[type="text"],
    .comment-write input[type="password"] {
        width: 100%;
    }

    .comment-write-body {
        flex-direction: column;
    }

    .comment-write .btn-comment-submit {
        padding: 12px;
    }
}

/* Recommend Button */
.post-recommend-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.btn-recommend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-recommend:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-recommend .rec-icon {
    font-size: 18px;
}

.btn-recommend .rec-count {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    margin-left: 4px;
}

.btn-recommend.recommended {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(232, 168, 56, 0.3);
}

.btn-recommend.processing {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Custom Per Page Dropdown */
.custom-per-page {
    position: relative;
    display: inline-block;
    user-select: none;
    z-index: 50;
}

.custom-per-page .cpp-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.custom-per-page .cpp-trigger:hover,
.custom-per-page.active .cpp-trigger {
    border-color: var(--accent);
}

.custom-per-page .cpp-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    list-style: none;
    padding: 4px 0;
    margin: 0;
    display: none;
    white-space: nowrap;
}

.custom-per-page.active .cpp-options {
    display: block;
}

.custom-per-page .cpp-options li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background var(--transition);
}

.custom-per-page .cpp-options li:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

.custom-per-page .cpp-options li.selected {
    background: rgba(232, 168, 56, 0.1);
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 768px) {
    .post-recommend-section {
        margin: 20px 16px;
    }

    .btn-recommend {
        width: calc(100% - 32px);
        box-sizing: border-box;
        padding: 16px 20px;
        font-size: 16px;
        justify-content: center;
        border-radius: var(--radius-sm);
    }
}