body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* 防止主界面滚动 */
    background-color: #f5f5f5;
}

.view {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.view.active {
    display: flex;
}

/* 登录视图 */
#login-view {
    background-color: #ffffff;
}
.logo {
    max-width: 300px;
    max-height: 300px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.login-buttons button {
    margin: 0 15px;
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}
.login-buttons button:hover {
    background-color: #0056b3;
}

/* 形象选择视图 */
#profile-view {
    background-color: #e3f2fd;
    overflow-y: auto;
}
.profile-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    width: 90%;
}
.profile-container h2 {
    text-align: center;
    margin-top: 0;
    color: #333;
}
.avatars h3 {
    margin-bottom: 10px;
    color: #555;
}
.avatar-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}
.avatar-option {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 4px solid transparent;
    border-radius: 10px;
    transition: transform 0.2s, border-color 0.2s;
}
.avatar-option:hover {
    transform: scale(1.05);
}
.avatar-option.selected {
    border-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}
.settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings label {
    font-weight: bold;
    color: #444;
}
.settings input {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.settings button {
    margin-top: 20px;
    padding: 15px;
    font-size: 18px;
    cursor: pointer;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
}
.settings button:hover {
    background-color: #388e3c;
}

/* 主界面视图 */
#main-view {
    background-size: cover;
    background-position: center;
    position: relative;
}
.player {
    position: absolute;
    /* 初始居中 */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    transition: transform 0.1s ease-out; /* 平滑缩放 */
}
.player > img {
    width: 120px; /* 基础大小 */
    height: 120px;
    object-fit: cover;
    border-radius: 50%; /* 圆形头像显示效果更好 */
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

/* 隐藏名字和技能，直到鼠标悬停 */
.player-name, .player-skills {
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* 防止遮挡鼠标悬停事件 */
}
.player:hover .player-name,
.player:hover .player-skills {
    opacity: 1;
}

.player-name {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 16px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.player-skills {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.skill {
    position: absolute;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    /* Transform将在JS中设置，用于精准居中定位 */
}

/* 老板虾聊天栏 */
.boss-chat-bar {
    display: none;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    padding: 15px 30px;
    border-radius: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    align-items: center;
    gap: 20px;
    z-index: 100;
    backdrop-filter: blur(8px);
}
.boss-chat-bar input[type="text"] {
    width: 380px;
    padding: 12px 20px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}
.mode-toggles {
    display: flex;
    gap: 15px;
    color: white;
    font-size: 16px;
    font-weight: bold;
}
.mode-toggles label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.boss-chat-bar button {
    padding: 12px 25px;
    border-radius: 20px;
    border: none;
    background-color: #ff9800;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
.boss-chat-bar button:hover {
    background-color: #e68a00;
    transform: scale(1.05);
}
#btn-reset-task {
    background-color: #757575;
}
#btn-reset-task:hover {
    background-color: #616161;
}

/* 动态显隐与动画控制 */
.hidden-shrimp {
    opacity: 0 !important;
    pointer-events: none;
    transform: scale(0) !important;
}
.boss-shrimp {
    transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), 
                top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 0.4s ease-out;
}
.always-show-info .player-name,
.always-show-info .player-skills {
    opacity: 1 !important;
}