/* ===============================
   基本設定
=============================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    background: #0d0f14;
    color: #e6e6e6;
    line-height: 1.6;
}

a {
    color: #4da3ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===============================
   レイアウト
=============================== */
header {
    background: linear-gradient(90deg, #0a0d13, #12182a);
    border-bottom: 1px solid #1e253a;
    padding: 14px 20px;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    color: #7dd3ff;
    letter-spacing: 1px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-left: 4px solid #4da3ff;
    padding-left: 10px;
}

/* ===============================
   フォーム共通
=============================== */
.thread-form label {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #9fb7ff;
}

.input-text,
.input-textarea,
.input-select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    background: #151a2b;
    border: 1px solid #293055;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
}

.input-textarea {
    resize: vertical;
}

.input-file {
    margin-top: 6px;
    color: #ccc;
}

/* ===============================
   ボタン
=============================== */
button,
.btn-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #4da3ff, #7b5cff);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

button:hover,
.btn-primary:hover {
    opacity: 0.85;
}

/* TOPボタン */
.top-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #1e253a;
    color: #7dd3ff;
    border: 1px solid #334;
    padding: 10px 14px;
    border-radius: 50%;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(77,163,255,0.4);
}

/* ===============================
   スレッド一覧
=============================== */
.thread-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thread-list li {
    padding: 12px;
    border-bottom: 1px solid #1e253a;
}

.thread-title {
    font-size: 1rem;
    font-weight: bold;
}

.thread-meta {
    font-size: 0.75rem;
    color: #aaa;
}

/* ===============================
   カテゴリ表示
=============================== */
.category {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    background: #293055;
    color: #9fb7ff;
    border-radius: 10px;
}

/* ===============================
   書き込み表示
=============================== */
.post {
    padding: 14px;
    border-bottom: 1px solid #1e253a;
}

.post-name {
    font-size: 0.8rem;
    color: #7dd3ff;
}

.post-time {
    font-size: 0.7rem;
    color: #999;
}

.post-message {
    margin-top: 8px;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.post img {
    margin-top: 10px;
    max-width: 100%;
    border-radius: 6px;
}

/* ===============================
   SNSボタン
=============================== */
.sns-buttons img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sns-buttons img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(77,163,255,0.6);
}

/* ===============================
   管理画面
=============================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    border: 1px solid #293055;
    padding: 8px;
}

.admin-table th {
    background: #151a2b;
    color: #9fb7ff;
}

.delete-btn {
    background: #ff4d4d;
    border-radius: 14px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.75rem;
}

/* ===============================
   フッター
=============================== */
footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #777;
}

/* ===============================
   検索フォーム（2行防止）
=============================== */
.search-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

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

.search-form button {
    white-space: nowrap;
    word-break: keep-all;
    min-width: 60px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   レスポンシブ
=============================== */
@media (max-width: 600px) {
    .container {
        padding: 14px;
    }

    header h1 {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form button {
        width: 100%;
    }
}
