/* -----------------------------------------------------------
   Apache AutoIndex Modern Theme (Final Version - Fixed)
   ----------------------------------------------------------- */

/* 全体のレイアウト設定 */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    background-color: #f1f3f4 !important;
    color: #444 !important;
    margin: 0 !important;
    padding: 30px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* タイトル部分：再表示し、左寄せ・スリムに設定 */
h1, h1#indextitle {
    display: block !important; /* 非表示を解除 */
    font-weight: 100 !important;
    font-size: 2.2rem !important; /* 少しサイズを調整 */
    color: #5f6368 !important;
    margin-bottom: 20px !important; /* ヘッダーの高さを抑える */
    margin-top: 0 !important;
    letter-spacing: -1px !important;
    width: 100% !important;
    max-width: 1000px !important; /* テーブルの幅と一致させる */
    text-align: left !important;
}

/* ファイルリスト（テーブル）のカード化 */
table, table#indexlist {
    background: #ffffff !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    max-width: 1000px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    padding: 24px !important;
    margin-bottom: 40px !important;
    border: none !important;
}

/* 表の見出し行 */
.indexhead th, th {
    padding: 8px 20px !important;
    border-bottom: 1.5px solid #e8eaed !important;
    color: #1a73e8 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    text-align: left;
}

/* 見出し内のリンク（アンダーラインを消去） */
.indexhead th a, th a {
    color: #1a73e8 !important;
    text-decoration: none !important;
}

/* デフォルトの区切り線（HR）が入る行を非表示 */
.indexbreakrow, hr {
    display: none !important;
}

/* 各データ行のスタイル */
td {
    padding: 16px 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    vertical-align: middle !important;
}

/* 最後の行の境界線を削除 */
tr:last-child td {
    border-bottom: none !important;
}

/* ホバー時の行ハイライト */
tr:hover td {
    background-color: #f8f9fa !important;
}

/* カラム間隔の最適化 */
.indexcolicon {
    padding-right: 0 !important;
    width: 40px !important;
}
.indexcolname {
    padding-left: 10px !important;
}
.indexcollastmod {
    padding-right: 10px !important;
}
.indexcolsize {
    padding-left: 10px !important;
    width: 80px !important;
}

/* ファイル名のリンクスタイル */
td.indexcolname a, a {
    color: #1a73e8 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

td.indexcolname a:hover, a:hover {
    text-decoration: underline !important;
}

/* アイコン画像の調整 */
img {
    margin-right: 0 !important;
    vertical-align: middle !important;
    filter: grayscale(80%) opacity(0.7) !important;
    width: 20px !important;
    height: auto !important;
}

/* モバイル対応 */
@media (max-width: 600px) {
    body { padding: 20px 10px !important; }
    table, table#indexlist { padding: 10px !important; }
    h1, h1#indextitle {
        font-size: 1.8rem !important;
        text-align: center !important;
    }
}
