/* ========== ヘッダー基本 ========== */
header {
    position: fixed;
    height: 60px;
    width: 100%;
    background-color: white;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

#Logo_are {
    width: 300px;
    height: 100%;
    float: left;
    background-color: black;
}

#Logo_are h1 {
    margin-top: 5%;
    text-align: center;
    text-decoration: none;
    color: white;
}

#icon {
    position: absolute;
    top: 10px;
    right: 20px;
}

#button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: gray;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== オーバーレイ ========== */
#user-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1100;
}
#user-overlay.open {
    display: block;
}

/* ========== スライドパネル ========== */
#user-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #1a1a1a;
    color: #eee;
    z-index: 1200;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
#user-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 16px 20px;
    border-bottom: 1px solid #333;
    background: #111;
}

.panel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    flex-shrink: 0;
}

.panel-userinfo {
    flex: 1;
}

.panel-username {
    font-size: 1em;
    font-weight: bold;
    color: #fff;
}

.panel-role {
    font-size: 0.8em;
    color: #888;
    margin-top: 2px;
}

.badge-admin {
    background: #c0392b;
    color: #fff;
    font-size: 0.75em;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.panel-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px 8px;
}
.panel-close:hover {
    color: #fff;
}

.panel-section {
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

.panel-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    padding: 0 16px 6px;
}

.panel-item {
    display: block;
    padding: 10px 16px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.92em;
    transition: background 0.15s, color 0.15s;
}
.panel-item:hover {
    background: #2a2a2a;
    color: #fff;
}

.panel-logout {
    color: #e74c3c;
}
.panel-logout:hover {
    background: #2a0a0a;
    color: #ff6b6b;
}

/* ========== スマホ対応 ========== */
#menu-toggle {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1001;
}
#menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: 0.2s;
}

@media (max-width: 768px) {
    #Logo_are {
        width: 100%;
        text-align: center;
    }
    #Logo_are h1 {
        font-size: 1.1em;
    }
    #menu-toggle {
        display: flex;
    }
    #icon {
        top: 10px;
        right: 12px;
    }
}