/* --- メニュー・ヘッダー基本設定 --- */
.menu-header {
    display: flex;
    align-items: center;
}

.menu-icon {
    margin-right: 15px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.menu-icon:hover {
    opacity: 0.7;
}

/* --- 右上ユーザーアイコンのナビゲーション --- */
.user-nav-container {
    position: fixed;
    top: 5px;
    right: 20px;
    z-index: 9999; /* 最前面に表示 */
    display: flex;
    align-items: center;
}

.user-icon-link {
    text-decoration: none;
    /* transformとopacityにアニメーションを適用 */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.user-icon-link:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.top-user-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #00c0ff;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 192, 255, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.user-icon-link:hover .top-user-img {
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 192, 255, 0.6);
}

.default-avatar-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #333;
    color: #00c0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #00c0ff;
    transition: all 0.3s ease;
}

.user-icon-link:hover .default-avatar-icon {
    background: #444;
    color: #fff;
    border-color: #fff;
}

/* --- ログインボタン（未ログイン時） --- */
.login-btn-top {
    background: #00c0ff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 192, 255, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.login-btn-top:hover {
    background: #0099cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 192, 255, 0.5);
}

/* --- オーバーレイ（暗幕） --- */
.user-overlay {
    display: none; /* JSでflexに切り替え */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    /* 出現時のフェードアニメーション */
    backdrop-filter: blur(4px); /* 背景を少しぼかすとお洒落です */
    animation: fadeIn 0.3s ease forwards;
}

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

/* --- ポップアップ本体 --- */
.overlay-content {
    background: #1a1a1a;
    color: #fff;
    padding: 25px;
    border-radius: 15px;
    width: 320px;
    text-align: center;
    position: relative;
    border: 1px solid #00c0ff;
    box-shadow: 0 0 30px rgba(0, 192, 255, 0.4);
    /* 下からふわっと浮き上がるアニメーション */
    animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease, transform 0.2s ease;
}

.close-btn:hover {
    color: #ff4b4b;
    transform: rotate(90deg); /* 閉じボタンに遊び心を加える */
}

.overlay-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid #00c0ff;
    object-fit: cover;
}

.overlay-username {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #00c0ff; /* 名前をテーマカラーに */
}

.info-list {
    text-align: left;
    font-size: 14px;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.overlay-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

/* --- アクションボタン --- */
.edit-btn,
.logout-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #333;
    color: #00c0ff;
    border: 1px solid #00c0ff;
}

.edit-btn:hover {
    background: #00c0ff;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 192, 255, 0.5);
}

.logout-btn {
    background: #ff4b4b;
    color: white;
    border: 1px solid #ff4b4b;
}

.logout-btn:hover {
    background: transparent;
    color: #ff4b4b;
    box-shadow: 0 0 15px rgba(255, 75, 75, 0.4);
}