/**
 * DVTV ユーザー切り替え - フロントエンドスタイル
 */

/* コンテナ */
.dvtv-us-container {
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* タイトル */
.dvtv-us-title {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 1.3em;
}

/* ユーザー一覧 */
.dvtv-us-user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* フォーム */
.dvtv-us-form {
    margin: 0;
}

/* 切り替えボタン */
.dvtv-us-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
}

.dvtv-us-button:hover {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.dvtv-us-button:hover .dvtv-us-level {
    color: rgba(255, 255, 255, 0.8);
}

/* アバター */
.dvtv-us-avatar {
    display: flex;
    align-items: center;
}

.dvtv-us-avatar img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

/* ユーザー名 */
.dvtv-us-name {
    font-weight: 500;
}

/* レベル */
.dvtv-us-level {
    color: #666;
    font-size: 0.9em;
}

/* メッセージ */
.dvtv-us-message {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
}

/* 「元に戻る」ボタン - フローティング */
.dvtv-us-return-container {
    position: fixed;
    top: 50px;
    left: 20px;
    z-index: 99999;
}

.dvtv-us-return-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
    animation: dvtv-us-pulse 2s infinite;
}

.dvtv-us-return-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.dvtv-us-return-icon {
    font-size: 18px;
}

.dvtv-us-return-text {
    white-space: nowrap;
}

/* パルスアニメーション */
@keyframes dvtv-us-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(231, 76, 60, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    }
}

/* 管理バー表示時の位置調整 */
.admin-bar .dvtv-us-return-container {
    top: 82px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
    .dvtv-us-container {
        padding: 15px;
    }
    
    .dvtv-us-user-list {
        flex-direction: column;
    }
    
    .dvtv-us-button {
        width: 100%;
        justify-content: flex-start;
    }
    
    .dvtv-us-return-container {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .dvtv-us-return-button {
        width: 100%;
        justify-content: center;
    }
    
    .admin-bar .dvtv-us-return-container {
        top: auto;
        bottom: 20px;
    }
}
