/* 基本設定 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e9f2f9; /* 淡い青系の背景色 */
    color: #262626; /* 濃いグレーのテキスト */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダー */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #dbe2ff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: #0c0c75;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #0000bb;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #495057;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #4942ce;
}

/* メインコンテンツとサイドバー */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    flex: 1;
}

.main-content {
    flex: 1;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar {
    width: 200px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* グリッド表示追加 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.post-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-thumbnail {
    width: 100%;
    height: 180px; /* サムネイル高さ統一 */
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* トリミングして揃える */
    display: block;
}

/* タイトル2行省略対応 */
.post-title {
    font-size: 16px;
    margin: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2行まで */
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* タグの高さを一定にする */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 10px;
    min-height: 28px; /* タグが無い場合もスペース確保 */
}

.tag {
    background-color: #eee;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.tag:hover {
    background-color: #f10048; /* 赤系 */
    color: #ffffff;
}

/* メタ情報（時間左、サイト名右） */
.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
    padding: 5px 10px 10px;
    margin-top: auto;
}

.post-time {
    text-align: left;
}

.site-name {
    text-align: right;
}

/* フッター */
footer {
    background-color: #1a1a1a;
    color: #f4efff;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    border-top: 4px solid #4c84ff;
    flex-shrink: 0;
}

footer a {
    color: #dbe2ff;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #999999;
}

/* フッター3カラム用 */
.footer-inner.footer-grid {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    box-sizing: border-box;
    text-align: left; /* 左揃え */
}

.footer-column {
    flex: 1;
    min-width: 180px;
    margin: 0 10px;
}

/* 見出しを左揃えにしてボーダーいっぱいまで伸ばす */
.footer-column .footer-title {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #4c84ff;
    
    /* 高さを固定して文字を中央に配置 */
    display: flex;
    align-items: center;   /* 垂直中央 */
    height: 28px;          /* 日本語・英語で揃える */
    width: 100%;           /* 幅いっぱいに伸ばす */
    box-sizing: border-box;
}


/* リストとリンク */
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left; /* 左揃え */
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #dbe2ff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #ffffff;
}

/* コピーライト */
footer .copyright {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    color: #aaaaaa;
    border-top: 1px solid #333333;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .footer-inner.footer-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-column {
        margin: 0;
        width: 100%;
    }

    .footer-column ul li {
        margin-bottom: 6px;
    }
}

/* 見出し */
h1, h2, h3, h4 {
    color: #17151d;
    padding-bottom: 8px;
    margin-top: 0;
    font-weight: bold;
    position: relative;
}

/* h1装飾 */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 4px solid #4c84ff; /* 青系太線 */
    letter-spacing: 1px;
}

/* h2装飾 */
h2 {
    font-size: 24px;
    margin-bottom: 18px;
    border-bottom: 3px solid #31708f; /* 少し暗め青 */
    letter-spacing: 0.5px;
}

/* h3装飾 */
h3 {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f10048; /* 赤系 */
    letter-spacing: 0.5px;
}

/* h4装飾 */
h4 {
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 2px solid #555555; /* グレー */
    letter-spacing: 0.3px;
}

/* 記事リスト */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.post-list li:last-child {
    border-bottom: none;
}

.post-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333333;
    transition: color 0.2s, background-color 0.2s;
    padding: 5px;
    border-radius: 3px;
}

.post-list a:hover {
    color: #4942ce;
    background-color: #f4efff;
}

.site-name {
    font-size: 14px;
    color: #777777;
    flex: 0 0 150px;
}

.post-title {
    flex-grow: 1;
    font-size: 16px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 10px;
}

.post-date {
    font-size: 12px;
    color: #a6a6a6;
    flex-shrink: 0;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #31708f;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: #f8f9fa;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #4c84ff;
    box-shadow: 0 0 5px rgba(76, 132, 255, 0.5);
}

.required {
    color: #f10048; /* 赤系 */
    font-weight: normal;
    margin-left: 5px;
}

small {
    display: block;
    margin-top: 5px;
    color: #808080;
    font-size: 12px;
}

/* ボタン */
button[type="submit"], .btn {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #4c84ff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

button[type="submit"]:hover, .btn:hover {
    background-color: #0000bb;
    color: #ffffff; /* 白文字で明確に */
}

/* 関連動画や記事ボタン用も同様 */
.btn-approve:hover,
.btn-reject:hover {
    color: #ffffff; /* 常に白文字で見やすく */
}

.btn-approve {
    background-color: #3a7711;
}

.btn-approve:hover {
    background-color: #2c590c;
}

.btn-reject {
    background-color: #f10048; /* 赤系ボタン */
}

.btn-reject:hover {
    background-color: #c5004c; /* 濃赤系 */
}

/* テーブル */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    border: 1px solid #e9ecef;
    padding: 10px;
    text-align: left;
}

.data-table th {
    background-color: #f4efff;
    font-weight: bold;
    color: #31708f;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* リンク */
a {
    color: #0000bb;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #4942ce;
}

/* 通知メッセージ */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.alert-success {
    background-color: #dbe2ff;
    color: #0c0c75;
    border: 1px solid #0000bb;
}

.alert-error {
    background-color: rgba(255, 0, 0, 0.8);
    color: #ffffff;
    border: 1px solid #ce0000;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 0;
    }

    .main-content,
    .sidebar {
        flex: auto;
        border-radius: 0;
        box-shadow: none;
        padding: 15px;
    }
    
    .sidebar {
        margin-top: 20px;
        width: 100%;
    }

    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .post-list a {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .post-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 🔍 検索フォーム + 人気タグエリア */
.search-tags-bar {
    max-width: 1200px;
    margin: 10px auto 20px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    box-sizing: border-box; /* 枠からはみ出さない */
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.search-form button {
    background-color: #4c84ff;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.search-form button:hover {
    background-color: #0000bb;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap; /* タグ折返し */
    gap: 6px;
    font-size: 14px;
    overflow: hidden; /* 枠外にはみ出さない */
}

.popular-tags .label {
    font-weight: bold;
    margin-right: 5px;
    color: #555;
    flex-shrink: 0;
}

.popular-tag {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap; /* タグ内改行防止 */
}

.popular-tag:hover {
    background-color: #f10048; /* 赤系アクセント */
    color: #ffffff;
}

/* サイト詳細ボックス */
.site-details-box {
    display: flex;
    border: 2px solid #4c84ff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.site-details-left {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #dbe2ff;
    background: #f8faff;
    padding: 20px 10px;
    text-align: center;
}

.site-rank-label {
    font-size: 16px;
    color: #31708f;
    margin-bottom: 8px;
}

.site-rank-value {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
}

.site-details-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-details-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #dbe2ff;
    background: #f8faff;
}

.site-details-row:last-child {
    border-bottom: none;
}

.site-details-row .label {
    min-width: 100px; /* PC/スマホのラベル幅を固定 */
    color: #31708f;
}

.site-details-row .colon {
    display: inline-block;
    width: 1em; /* ：の位置を揃える */
    text-align: center;
    margin-right: 5px;
}

.site-details-row .value {
    color: #333333;
}

.site-detail-note {
    flex-basis: 100%;
    margin: 10px 15px;
    font-size: 13px;
    color: #808080;
}

/* ===== operator_nav デザイン調整 ===== */
.operator-nav {
    max-width: 1200px;      /* 他コンテンツと同じ幅 */
    margin: 0 auto 20px;    /* 上下余白調整 */
    padding: 10px 20px;     /* container 内部余白と同じ */
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.operator-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.operator-nav li {
    margin: 0;
}

.operator-nav a {
    display: inline-block;
    padding: 8px 12px;
    background-color: #4c84ff; /* 既存ボタン系カラーに合わせる */
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.operator-nav a:hover {
    background-color: #0000bb;
    color: #ffffff;
}

/* ログアウトだけ赤系で目立たせる */
.operator-nav .operator-logout {
    background-color: #f10048;
}

.operator-nav .operator-logout:hover {
    background-color: #c5004c;
}
