/**
 * Bulletin Board Styles
 */

/* メインコンテナ */
.bulletin-board {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.bb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.bb-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.bb-back-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    margin-right: 20px;
}

.bb-back-link:hover {
    text-decoration: underline;
}

/* ボタン */
.bb-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bb-btn-primary {
    background-color: #0073aa;
    color: white;
}

.bb-btn-primary:hover {
    background-color: #005a87;
}

.bb-btn-secondary {
    background-color: #ddd;
    color: #333;
}

.bb-btn-secondary:hover {
    background-color: #ccc;
}

/* ログイン通知 */
.bb-login-notice {
    color: #666;
    font-size: 14px;
}

.bb-login-notice a {
    color: #0073aa;
}

/* フォームコンテナ */
.bb-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.bb-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bb-form-header h3 {
    margin: 0;
    font-size: 20px;
}

.bb-close-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.bb-close-btn:hover {
    color: #333;
}

/* フォームグループ */
.bb-form-group {
    margin-bottom: 20px;
}

.bb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.bb-form-group input[type="text"],
.bb-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.bb-form-group textarea {
    resize: vertical;
}

.bb-form-group input[type="file"] {
    display: block;
}

.bb-form-actions {
    display: flex;
    gap: 10px;
}

/* スレッド一覧 */
.bb-thread-list {
    margin-bottom: 30px;
}

.bb-no-threads,
.bb-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.bb-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bb-table thead {
    background: #f5f5f5;
}

.bb-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.bb-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.bb-table tbody tr:hover {
    background: #f9f9f9;
}

.bb-thread-title {
    width: 50%;
}

.bb-thread-count {
    width: 10%;
    text-align: center;
}

.bb-thread-author {
    width: 20%;
}

.bb-thread-date {
    width: 20%;
}

.bb-thread-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.bb-thread-link:hover {
    text-decoration: underline;
}

/* ユーザーリンク */
.bb-user-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0073aa;
    text-decoration: none;
}

.bb-user-link:hover {
    text-decoration: underline;
}

.bb-user-link img {
    border-radius: 50%;
    vertical-align: middle;
}

/* 投稿表示 */
.bb-posts {
    margin-bottom: 30px;
}

.bb-post {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bb-post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bb-post-number {
    font-weight: 600;
    color: #999;
    font-size: 14px;
}

.bb-post-user {
    flex: 1;
}

.bb-post-user .bb-user-link {
    gap: 10px;
}

.bb-user-name {
    font-weight: 600;
    color: #333;
}

.bb-post-date {
    color: #999;
    font-size: 13px;
}

.bb-post-content {
    color: #333;
    line-height: 1.6;
}

.bb-post-content p {
    margin-bottom: 10px;
}

.bb-post-image {
    margin-top: 15px;
}

.bb-post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 返信フォーム */
.bb-reply-form {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.bb-reply-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

.bb-locked-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    margin-top: 30px;
}

.bb-locked-notice p {
    margin: 0;
    color: #856404;
}

/* ページネーション */
.bb-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.bb-page-link {
    display: inline-block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bb-page-link:hover {
    background: #0073aa;
    color: white;
}

.bb-page-link.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .bb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bb-table {
        font-size: 14px;
    }
    
    .bb-table th,
    .bb-table td {
        padding: 10px;
    }
    
    .bb-thread-count,
    .bb-thread-date {
        display: none;
    }
    
    .bb-thread-title {
        width: 60%;
    }
    
    .bb-thread-author {
        width: 40%;
    }
    
    .bb-post-header {
        flex-wrap: wrap;
    }
    
    .bb-form-actions {
        flex-direction: column;
    }
    
    .bb-btn {
        width: 100%;
    }
}
