/* ============================================================
   sidebar.css — HUBB 共通サイドバースタイル
   ============================================================ */

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: left 0.28s ease;
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

/* ロゴ */
.logo {
    padding: 0 25px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: white;
    text-decoration: none;
    display: block;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo p {
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.5;
}

/* メニューアイテム */
.menu-item {
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: white;
    display: block;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #3498db;
}

.menu-item.active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
}

.menu-label {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.menu-title {
    font-size: 16px;
    font-weight: 600;
}

/* サイドバー下部：ユーザー情報 / 認証リンク */
.sidebar-user {
    margin-top: auto;
    padding: 16px 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* サイドバー最下部：フッターリンク（縦並び） */
.sidebar-footer-links {
    padding: 10px 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-footer-links a {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    transition: color 0.2s;
}
.sidebar-footer-links a:hover {
    color: rgba(255,255,255,0.7);
}

.sidebar-user-name {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.sidebar-user-name span {
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-top: 3px;
}

.sidebar-mypage {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-mypage:hover,
.sidebar-mypage.active {
    background: rgba(255,255,255,0.12);
    color: white;
}

.sidebar-logout {
    display: inline-block;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 10px 10px 0;
    margin-top: 10px;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.sidebar-logout:hover {
    color: rgba(255,255,255,0.65);
}

.sidebar-auth-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-sidebar-login {
    display: block;
    text-align: center;
    padding: 9px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(52, 152, 219, 0.8);
    color: white;
}

.btn-sidebar-login:hover {
    background: #3498db;
}

.btn-sidebar-register {
    display: block;
    text-align: center;
    padding: 9px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: white;
    color: #2c3e50;
}

.btn-sidebar-register:hover {
    background: #ecf0f1;
}

/* ─── ハンバーガーボタン（モバイルのみ表示） ─── */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1100;
    width: 42px;
    height: 42px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* オーバーレイ（タップで閉じる） */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}

/* ─── モバイル（768px以下） ─── */
@media (max-width: 768px) {
    .sidebar {
        left: -260px; /* 初期は画面外 */
        width: 240px;
        position: fixed;
        height: 100vh;
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .sidebar-overlay.sidebar-open {
        display: block;
    }

    .hamburger-btn {
        display: flex;
    }
}
