/**
 * 装備コーディネート一覧ページ用CSS
 * Archive Coordinate Page Styles
 */

/* ========================================
   1. アーカイブヘッダー
   ======================================== */

.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
}

.archive-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* ========================================
   2. フィルター・ソートエリア
   ======================================== */

.coordinate-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ソートボタンエリア */
.sort-buttons {
    flex: 1 1 100%;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.sort-buttons label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.sort-btn {
    padding: 0.6rem 1.2rem;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sort-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.sort-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 700;
}

/* フィルター送信・リセットボタン */
.filter-submit,
.filter-reset {
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.filter-submit {
    background: #667eea;
    color: #fff;
    border: 2px solid #667eea;
}

.filter-submit:hover {
    background: #5568d3;
    border-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.filter-reset {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.filter-reset:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* ========================================
   3. テーブルレイアウト
   ======================================== */

.coordinate-list {
    margin-bottom: 2rem;
}

.coordinate-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    writing-mode: horizontal-tb;
    table-layout: fixed;
}

/* 行 */
.coordinate-row {
    display: table-row;
    transition: all 0.3s ease;
    writing-mode: horizontal-tb;
}

/* ヘッダー行 */
.coordinate-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
}

.coordinate-header .coordinate-col {
    padding: 1rem;
    border-bottom: none;
}

/* データ行 */
.coordinate-item {
    text-decoration: none;
    color: #333;
    cursor: pointer;
}

.coordinate-item:hover {
    background: #f8f9fa;
}

.coordinate-item:hover .coordinate-col {
    color: #667eea;
}

/* 列 */
.coordinate-col {
    display: table-cell;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: nowrap;
}

/* 各列の幅調整 */
.col-weapon {
    width: 25%;
    font-weight: 600;
    white-space: normal;
    word-wrap: break-word;
}

.col-author {
    width: 15%;
    white-space: normal;
    word-wrap: break-word;
}

.col-damage {
    width: 15%;
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

.col-views {
    width: 12%;
    text-align: right;
}

.col-good {
    width: 12%;
    text-align: right;
    color: #f56565;
}

.col-date {
    width: 15%;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    white-space: normal;
}

/* ========================================
   4. ページネーション
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

.pagination .current {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 700;
}

/* ========================================
   5. 投稿なしメッセージ
   ======================================== */

.no-posts {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

/* ========================================
   6. レスポンシブ対応
   ======================================== */

/* タブレット */
@media (max-width: 1024px) {
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .sort-buttons {
        justify-content: flex-start;
    }
    
    /* テーブルの列幅調整 */
    .col-weapon {
        width: 30%;
    }
    
    .col-author {
        width: 15%;
    }
    
    .col-damage,
    .col-views,
    .col-good {
        width: 12%;
    }
    
    .col-date {
        width: 15%;
    }
}

/* スマホ */
@media (max-width: 768px) {
    .archive-header h1 {
        font-size: 1.5rem;
    }
    
    .coordinate-filters {
        padding: 1rem;
    }
    
    .sort-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sort-btn {
        width: 100%;
        text-align: center;
    }
    
    /* テーブルをカード形式に変換 */
    .coordinate-table {
        display: block;
    }
    
    .coordinate-row {
        display: block;
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .coordinate-header {
        display: none; /* ヘッダーを非表示 */
    }
    
    .coordinate-item {
        display: block;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .coordinate-col {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .coordinate-col:last-child {
        border-bottom: none;
    }
    
    /* ラベルを追加 */
    .coordinate-col::before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
    }
    
    .col-weapon::before {
        content: '武器名: ';
    }
    
    .col-author::before {
        content: '投稿者: ';
    }
    
    .col-damage::before {
        content: 'ダメージ: ';
    }
    
    .col-views::before {
        content: 'アクセス: ';
    }
    
    .col-good::before {
        content: 'Good: ';
    }
    
    .col-date::before {
        content: '投稿日: ';
    }
    
    /* テキスト配置をリセット */
    .col-damage,
    .col-views,
    .col-good,
    .col-date {
        text-align: left;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   7. アクセシビリティ
   ======================================== */

.coordinate-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ========================================
   8. 印刷用スタイル
   ======================================== */

@media print {
    .coordinate-filters,
    .pagination {
        display: none;
    }
    
    .coordinate-item:hover {
        background: transparent;
    }
}
