@charset "UTF-8";

/* =========================================
   1. 変数定義 (Color Palette & Sizes)
   ========================================= */
:root {
    /* Colors */
    --primary: #1d9bf0;          /* Geneam Blue */
    --primary-hover: #1a8cd8;
    --bg-color: #ffffff;
    --text-main: #0f1419;
    --text-sub: #536471;
    --border-color: #eff3f4;
    --hover-bg: rgba(15, 20, 25, 0.1);
    
    /* Like / Error Colors */
    --like-color: #f91880;
    --error-color: #f4212e;
    --success-color: #00ba7c;

    /* Layout Sizes */
    --sidebar-left-width: 275px;
    --main-col-width: 600px;
    --sidebar-right-width: 350px;
    --header-height: 53px;
}

/* =========================================
   2. リセット & 基本設定
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-y: scroll; /* スクロールバーのガタつき防止 */
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Material Symbols の調整 */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
/* 塗りつぶし用クラス */
.fill-icon {
    font-variation-settings: 'FILL' 1;
}

/* =========================================
   3. レイアウト構造 (3カラム)
   ========================================= */
.layout-container {
    display: flex;
    justify-content: center; /* 画面中央寄せ */
    min-height: 100vh;
    max-width: 1300px;
    margin: 0 auto;
    align-items: flex-start; /* 縦に伸びすぎないようにする */
}

/* 左サイドバー (メニュー) */
.sidebar-left {
    width: var(--sidebar-left-width);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    z-index: 100; /* コンテンツより上に */
}

/* 中央カラム (タイムライン) */
.main-column {
    width: var(--main-col-width);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding-bottom: 60px; /* フッターがある場合の余白 */
}

/* 右サイドバー (検索・トレンド) */
.sidebar-right {
    width: var(--sidebar-right-width);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 12px 24px;
    overflow-y: auto;
}

/* =========================================
   4. コンポーネント: ナビゲーション
   ========================================= */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px 12px 12px;
    margin: 4px 0;
    border-radius: 9999px;
    color: var(--text-main);
    font-size: 1.25rem;
    transition: background-color 0.2s;
    width: fit-content;
}

.nav-item:hover {
    background-color: var(--hover-bg);
}

.nav-item span.icon {
    font-size: 28px;
    margin-right: 16px;
}

.nav-item.active {
    font-weight: 700;
}

/* ツイートボタン (左サイドバー) */
.tweet-btn {
    background-color: var(--primary);
    color: white;
    width: 90%;
    padding: 15px 0;
    border-radius: 9999px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 15px;
    transition: background-color 0.2s;
    text-align: center;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tweet-btn:hover {
    background-color: var(--primary-hover);
}

/* =========================================
   5. コンポーネント: タイムライン & 投稿
   ========================================= */
.feed-header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.85); /* すりガラス風 */
    backdrop-filter: blur(12px);
    padding: 15px;
    font-weight: 800;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 90;
    cursor: pointer;
}

/* 投稿カード */
.post-card {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    transition: background-color 0.2s;
    cursor: pointer; /* クリックできる感 */
}

.post-card:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.post-meta {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-left: 5px;
}

.post-content {
    margin-top: 5px;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* 認証バッジ */
.verified-badge {
    color: var(--primary);
    font-size: 18px !important;
    margin-left: 4px;
    vertical-align: text-bottom;
}

/* アクションボタン (いいね、返信など) */
.action-btn {
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    padding: 8px;
    border-radius: 50%;
}

.action-btn:hover {
    background-color: rgba(29, 155, 240, 0.1);
    color: var(--primary);
}

/* いいねボタン特別色 */
.action-btn .liked {
    color: var(--like-color);
}
.action-btn:hover .fa-heart {
    color: var(--like-color);
}

/* =========================================
   6. モーダル (ポップアップ)
   ========================================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4);
    animation: fadeIn 0.2s;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* =========================================
   7. フォーム要素
   ========================================= */
.post-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.25rem;
    font-family: inherit;
    resize: none;
    margin-top: 10px;
}

.search-box {
    background-color: #eff3f4;
    border-radius: 9999px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-size: 1rem;
}

/* =========================================
   8. レスポンシブ対応 (スマホ・タブレット)
   ========================================= */

/* タブレット以下: 右サイドバーを消す or 調整 */
@media screen and (max-width: 1000px) {
    .sidebar-right {
        display: none;
    }
    .main-column {
        width: 100%;
        max-width: 600px;
        border-right: 1px solid var(--border-color);
    }
    .sidebar-left {
        width: 80px; /* アイコンのみにする幅 */
        align-items: center;
        padding: 0 10px;
    }
    .nav-item span.text, 
    .tweet-btn span.text {
        display: none; /* テキストを隠す */
    }
    .nav-item {
        padding: 12px; /* 真ん中に寄せる */
    }
    .nav-item span.icon {
        margin-right: 0;
    }
    .tweet-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24px;
    }
    /* "Post" 文字の代わりにアイコンを出すためのハック（必要であればHTML側で調整推奨） */
    .tweet-btn::after {
        content: '+'; 
        font-family: sans-serif;
        font-size: 30px;
        line-height: 1;
    }
}

/* スマホ: さらに調整 */
@media screen and (max-width: 500px) {
    .layout-container {
        flex-direction: column;
    }
    .sidebar-left {
        display: none; /* スマホでは下のナビゲーションバーにするのが一般的だが、今回は簡易的に非表示またはハンバーガーメニュー等 */
        /* 下部固定ナビにする場合 */
        position: fixed;
        bottom: 0;
        top: auto;
        width: 100%;
        height: 53px;
        flex-direction: row;
        justify-content: space-around;
        background: white;
        border-top: 1px solid var(--border-color);
        padding: 0;
    }
    .nav-item {
        margin: 0;
    }
    .main-column {
        width: 100%;
        margin-bottom: 60px; /* 下部ナビ用スペース */
        border: none;
    }
    /* スマホ用の浮き投稿ボタン (FAB) */
    .mobile-fab {
        position: fixed;
        bottom: 70px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: var(--primary);
        color: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 900;
        cursor: pointer;
    }
}