/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #90EE90 100%);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
}

/* 登录界面样式 */
.login-container {
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    animation: gradientBG 15s ease infinite;
    background-size: 400% 400%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 400px;
    animation: floatIn 0.8s ease-out;
    position: absolute;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
    z-index: -1;
}

@keyframes floatIn {
    0% { transform: translate(-50%, -70%); opacity: 0; }
    100% { transform: translate(-50%, -50%); opacity: 1; }
}

.login-title {
    font-size: 28px;
    color: #2E8B57;
    margin-bottom: 30px;
    font-weight: bold;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-title img {
    display: block;
}

.login-title::after {
    content: '';
    display: none;
}

.login-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* 测试登录表单 */
.test-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin: 0 auto 20px;
}

.test-input {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    background: rgba(240, 240, 240, 0.8);
    color: #333;
    outline: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.test-input:focus {
    border-color: #32CD32;
    box-shadow: 0 0 15px rgba(50, 205, 50, 0.3);
    background: white;
}

.test-input::placeholder {
    color: #999;
}

.test-notice {
    color: rgba(46, 139, 87, 0.8);
    font-size: 14px;
    margin-top: 10px;
    line-height: 1.5;
    background: rgba(240, 248, 255, 0.6);
    padding: 12px;
    border-radius: 10px;
    border-left: 4px solid #32CD32;
}

.login-btn {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(50, 205, 50, 0.5);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
}

.login-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20px;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.8s;
}

.login-btn:hover::after {
    left: 120%;
}

.login-loading {
    display: none;
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

.login-loading.show {
    display: block;
}

.login-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    border-top-color: #32CD32;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 全屏游戏界面 */
.game-interface {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* 农场容器 */
.farm-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('../images/caodi.svg') center center fixed;
    background-size: cover;
    overflow: hidden;
}

/* 农场装饰 */
.farm-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tree {
    position: absolute;
    font-size: 40px;
    z-index: 2;
}

.tree-1 {
    top: 15%;
    left: 10%;
}

.tree-2 {
    top: 20%;
    right: 15%;
}

.flower {
    position: absolute;
    font-size: 20px;
    z-index: 2;
}

.flower-1 {
    top: 60%;
    left: 20%;
}

.flower-2 {
    top: 65%;
    right: 25%;
}

.flower-3 {
    bottom: 30%;
    left: 15%;
}

/* 鸡舍 */
.chicken-coop {
    position: absolute;
    top: 60%;
    left: 80%;
    width: 120px;
    height: 120px;
    z-index: 4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chicken-coop:hover {
    transform: scale(1.05);
}

/* 鸡舍内的鸡蛋显示 */
.coop-eggs {
    position: absolute;
    top: -30px; /* 在鸡舍上方显示 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 90px;
    z-index: 10; /* 提高层级，确保不被鸡舍挡住 */
    pointer-events: none;
}

.coop-egg {
    font-size: 28px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    animation: eggWiggle 2s ease-in-out infinite;
}

.coop-egg:nth-child(1) { animation-delay: 0s; }
.coop-egg:nth-child(2) { animation-delay: 0.3s; }
.coop-egg:nth-child(3) { animation-delay: 0.6s; }

/* 鸡舍下方的鸡蛋数量显示 */
.coop-egg-count {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 4px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 11;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    border: 2px solid #FFD700;
    pointer-events: none;
}

.coop-egg-count-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 可收蛋提示 */
.coop-hint {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.95);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    white-space: nowrap;
    z-index: 12;
    animation: hintBounce 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.coop-roof {
    font-size: 60px;
}

/* 3D鸡舍 */
.chicken-coop-3d {
    position: absolute;
    top: 15%;
    right: 8%;
    width: 200px;
    height: 180px;
    background-image: url('../images/chicken-coop.svg');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 8;
    transform: perspective(500px) rotateY(-15deg) rotateX(5deg);
    animation: coopSway3D 6s ease-in-out infinite;
}

@keyframes coopSway3D {
    0%, 100% { transform: perspective(500px) rotateY(-15deg) rotateX(5deg) translateZ(0px); }
    50% { transform: perspective(500px) rotateY(-12deg) rotateX(3deg) translateZ(5px); }
}

/* 小鸡游戏区域 */
.chickens-playground {
    position: absolute;
    top: 25%;
    left: 15%;
    right: 25%;
    bottom: 25%;
    z-index: 7;
    perspective: 1000px;
}

.chicken {
    position: relative;
    width: 100px;
    height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes chickenWalk3D {
    0%, 100% { transform: translateZ(0px) rotateY(0deg); }
    25% { transform: translateZ(10px) rotateY(5deg); }
    50% { transform: translateZ(5px) rotateY(0deg); }
    75% { transform: translateZ(15px) rotateY(-5deg); }
}

.chicken:hover {
    transform: scale(1.1) translateZ(20px);
    filter: brightness(1.2);
}

.chicken.hungry {
}

@keyframes chickenHungry3D {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-10px) rotateZ(5deg); }
}

.chicken.fed {
}

@keyframes chickenFed3D {
    0% { transform: scale(1) rotateZ(0deg); }
    50% { transform: scale(1.2) rotateZ(10deg); }
    100% { transform: scale(1) rotateZ(0deg); }
}

.chicken.ready {
}

@keyframes chickenReady3D {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); filter: brightness(1); }
    50% { transform: translateY(-5px) rotateZ(-3deg); filter: brightness(1.3); }
}

/* 资源面板 */
.resource-panel {
    display: flex;
    gap: 10px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.resource-icon {
    font-size: 16px;
}

.friends-item {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    cursor: pointer;
}

.friends-item .resource-icon {
    filter: brightness(1.2);
}

.friends-item:hover {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    transform: scale(1.05);
}

.friends-item:active {
    transform: scale(0.98);
}

.resource-value {
    font-size: 14px;
    font-weight: bold;
    min-width: 30px;
}

/* 底部操作栏 */
.action-bar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.action-btn-icon {
    font-size: 24px;
}

.action-btn-text {
    font-size: 12px;
    font-weight: bold;
}

/* 模态框样式 - 底部抽屉式（重构为更精致卡片） */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 18px 24px;
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-height: 72vh;
    overflow-y: auto;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.28s ease-in-out;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    border: 1px solid rgba(0,0,0,0.06);
}

.modal.show .modal-content { transform: translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2E8B57;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

.modal-close:hover { color: #333; }

/* 任务列表更美观的卡片 */
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-item {
    background: #ffffff;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(50,205,50,0.18);
    box-shadow: 0 4px 18px rgba(50,205,50,0.12);
}
.task-item .task-name { font-size: 16px; font-weight: 700; color: #2E8B57; margin-bottom: 6px; }
.task-item .task-desc { color: #666; margin-bottom: 8px; }
.task-item .task-reward { color: #FF6347; font-weight: 700; }
.task-item .task-btn {
    margin-top: 10px;
    background: linear-gradient(45deg, #32CD32, #22b322);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.task-item .task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 205, 50, 0.3);
}
.task-item .task-btn:active {
    transform: translateY(0);
}
/* 去完成按钮样式 */
.task-btn-active {
    background: linear-gradient(45deg, #32CD32, #22b322) !important;
    color: white !important;
}
/* 已完成按钮样式 */
.task-btn-completed {
    background: linear-gradient(45deg, #90EE90, #98FB98) !important;
    color: #2E8B57 !important;
    cursor: not-allowed !important;
}
.task-item .task-btn[disabled] { 
    opacity: 0.8; 
    cursor: not-allowed;
    transform: none !important;
}

/* 兑换与饲料列表样式 */
.exchange-list, .feed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.exchange-item, .feed-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.exchange-item .exchange-item-image { height: 84px; border-radius: 10px; background: #f5f7fa; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.exchange-item .exchange-item-name { font-weight: 600; color: #333; margin-top: 8px; }
.exchange-item .exchange-item-price { color: #2E8B57; font-weight: 700; margin-top: 4px; }
.exchange-item .exchange-item-stock { color: #666; font-size: 12px; margin-top: 2px; }

/* 任务列表样式 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #32CD32;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.2);
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: #90EE90;
}

.task-name {
    font-size: 18px;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 8px;
}

/* 任务进度显示 */
.task-progress {
    font-size: 14px;
    color: #FF6347;
    font-weight: bold;
    margin-left: 8px;
}

.task-desc {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #FF6347;
    font-weight: bold;
}

/* 兑换商店样式 - 列表形式 */
.exchange-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.exchange-item {
    background: linear-gradient(135deg, #fff8dc 0%, #f5f5dc 100%);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #FFD700;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.exchange-item:hover {
    border-color: #32CD32;
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(50, 205, 50, 0.3);
}

.exchange-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.exchange-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.exchange-details {
    flex: 1;
}

.exchange-name {
    font-size: 16px;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 5px;
}

.exchange-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.exchange-type {
    font-size: 11px;
    color: #FF6347;
    background: rgba(255, 99, 71, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.exchange-cost {
    background: linear-gradient(135deg, #32CD32, #228B22);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(50, 205, 50, 0.3);
}

.exchange-cost:hover {
    background: linear-gradient(135deg, #228B22, #006400);
    transform: scale(1.05);
}

.exchange-cost:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 兑换等级限制样式 */
.exchange-item-level {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.exchange-item-level.level-ok {
    background: rgba(50, 205, 50, 0.15);
    color: #2E8B57;
    border: 1px solid #32CD32;
}

.exchange-item-level.level-locked {
    background: rgba(255, 0, 0, 0.1);
    color: #d32f2f;
    border: 1px solid #f44336;
}

/* 锁定的兑换项 */
.exchange-item-locked {
    opacity: 0.6;
    filter: grayscale(50%);
    cursor: not-allowed !important;
}

.exchange-item-locked:hover {
    border-color: #999 !important;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* 饲料仓库样式 */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
}

.feed-item {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 3px solid #87CEEB;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feed-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    border-color: #999;
}

.feed-item.disabled:hover {
    transform: none;
    box-shadow: none;
}

.feed-item:not(.disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3);
    border-color: #32CD32;
}

.feed-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.feed-item:hover::before {
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.feed-icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.feed-name {
    font-size: 14px;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 5px;
}

.feed-type {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.feed-desc {
    font-size: 11px;
    color: #FF6347;
    margin-top: 5px;
}

.feed-count {
    font-size: 18px;
    font-weight: bold;
    color: #FF6347;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 10px;
    display: inline-block;
    min-width: 30px;
}

.feed-count.zero {
    color: #999;
    background: rgba(200, 200, 200, 0.3);
}

/* 消息提示样式 - 修复层级和显示问题 */
.message {
    position: fixed !important;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000 !important;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

.message.info {
    background: rgba(52, 152, 219, 0.95);
    color: white;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.message.success {
    background: rgba(46, 204, 113, 0.95);
    color: white;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.message.warning {
    background: rgba(241, 196, 15, 0.95);
    color: white;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.message.error {
    background: rgba(231, 76, 60, 0.95);
    color: white;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 修复模态框层级问题 */
.modal {
    z-index: 9999 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
}

/* 修复底部控制栏层级问题 */
.bottom-controls {
    z-index: 1000 !important;
}

/* 修复按钮悬停效果 */
.action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.action-btn:active {
    transform: translateY(0) !important;
}

/* 修复禁用状态 */
.action-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.action-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}
.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    font-size: 16px;
    font-weight: bold;
    color: #2E8B57;
    backdrop-filter: blur(10px);
    animation: messageShow 0.3s ease-out;
}

@keyframes messageShow {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 好友排名模态框样式 */
.friends-ranking-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.friend-rank-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.friend-rank-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.friend-rank-item.current-user {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.friend-rank-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.6);
}

.friend-rank-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(169, 169, 169, 0.2));
    border: 2px solid rgba(192, 192, 192, 0.6);
}

.friend-rank-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(184, 115, 51, 0.2));
    border: 2px solid rgba(205, 127, 50, 0.6);
}

.rank-number {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    min-width: 30px;
    text-align: center;
    margin-right: 15px;
}

.friend-rank-item.rank-1 .rank-number {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.friend-rank-item.rank-2 .rank-number {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.friend-rank-item.rank-3 .rank-number {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.8);
}

.friend-avatar {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.friend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.friend-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.friend-eggs {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
}

.rank-medal {
    font-size: 24px;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 滚动条样式 */
.friends-ranking-list::-webkit-scrollbar {
    width: 6px;
}

.friends-ranking-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.friends-ranking-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.friends-ranking-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-panel {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
    }
    
    .resource-panel {
        top: 10px;
        right: 10px;
        padding: 10px;
        gap: 10px;
    }
    
    .resource-item {
        padding: 6px 10px;
    }
    
    .resource-icon {
        font-size: 18px;
    }
    
    .resource-value {
        font-size: 14px;
    }
    
    .action-bar {
        bottom: 10px;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .action-btn {
        padding: 10px 12px;
        min-width: 60px;
    }
    
    .action-btn-icon {
        font-size: 20px;
    }
    
    .action-btn-text {
        font-size: 11px;
    }
    
    .chicken {
        width: 60px;
        height: 60px;
    }
    
    .chicken-coop-3d {
        width: 150px;
        height: 135px;
        top: 10%;
        right: 5%;
    }
    
    .tree-1, .tree-2 {
        width: 60px;
        height: 75px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .user-panel {
        flex-direction: column;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .resource-panel {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-bar {
        gap: 8px;
        padding: 8px 12px;
    }
    
    .action-btn {
        padding: 8px 10px;
        min-width: 50px;
    }
    
    .chicken {
        width: 50px;
        height: 50px;
    }
    
    .chicken-coop-3d {
        width: 120px;
        height: 108px;
    }
}

/* 顶部状态栏样式 */
.top-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, rgba(135, 206, 250, 0.9) 0%, rgba(173, 216, 230, 0.8) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #FFA500;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-level-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name-display {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.level-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-number {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.top-right-buttons {
    display: flex;
    gap: 10px;
}

.top-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(240, 248, 255, 0.8));
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, rgba(255, 255, 255, 1), rgba(240, 248, 255, 0.9));
}







/* 主要小鸡角色 - 优化设计 */
.main-chicken {
    position: absolute;
    left: 50%;
    top: 60%;
    transform: translateX(-50%);
    width: 120px;
    height: 140px;
    z-index: 15;
    animation: chickenBob 3s ease-in-out infinite;
}

.chicken-body {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 95px;
    background: linear-gradient(145deg, #FFFEF7, #FFF8DC, #F0F8FF);
    border-radius: 50% 50% 65% 35%;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.chicken-head {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 65px;
    background: linear-gradient(145deg, #FFFEF7, #FFF8DC, #F0F8FF);
    border-radius: 50%;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.chicken-beak {
    position: absolute;
    bottom: 105px;
    left: 45%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #FF8C00;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.chicken-eyes {
    position: absolute;
    bottom: 118px;
    left: 42%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #000 30%, #333 70%, #666 100%);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chicken-eyes::after {
    content: '';
    position: absolute;
    right: -16px;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #000 30%, #333 70%, #666 100%);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chicken-eyes::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    z-index: 1;
}

.chicken-wings {
    position: absolute;
    bottom: 65px;
    left: 18px;
    width: 28px;
    height: 45px;
    background: linear-gradient(145deg, #F5DEB3, #DEB887, #D2B48C);
    border-radius: 50% 20% 50% 80%;
    transform: rotate(-15deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.chicken-wings::after {
    content: '';
    position: absolute;
    right: -50px;
    width: 28px;
    height: 45px;
    background: linear-gradient(145deg, #F5DEB3, #DEB887, #D2B48C);
    border-radius: 20% 50% 80% 50%;
    transform: rotate(30deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.chicken-feet {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 18px;
}

.chicken-feet::before,
.chicken-feet::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 10px;
    background: linear-gradient(145deg, #FF8C00, #FFA500);
    border-radius: 0 0 50% 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chicken-feet::before {
    left: 3px;
}

.chicken-feet::after {
    right: 3px;
}

/* 添加小鸡的鸡冠 */
.chicken-comb {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: linear-gradient(145deg, #FF6B6B, #FF4757);
    border-radius: 50% 50% 0 0;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.chicken-comb::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    width: 15px;
    height: 12px;
    background: linear-gradient(145deg, #FF6B6B, #FF4757);
    border-radius: 50% 50% 0 0;
    transform: rotate(-20deg);
}

.chicken-comb::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 5px;
    width: 15px;
    height: 12px;
    background: linear-gradient(145deg, #FF6B6B, #FF4757);
    border-radius: 50% 50% 0 0;
    transform: rotate(20deg);
}

@keyframes chickenBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* 装饰树木 */
.decorative-tree {
    position: absolute;
    right: 15%;
    top: 35%;
    width: 100px;
    height: 120px;
    z-index: 8;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 40px;
    background: linear-gradient(145deg, #8B4513, #A0522D);
    border-radius: 10px;
}

.tree-crown {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #228B22, #32CD32);
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.tree-leaves {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #90EE90, #98FB98);
    border-radius: 50%;
    opacity: 0.8;
}

/* 地面装饰元素 */
.ground-decorations {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 5;
}

.grass-patch {
    position: absolute;
    bottom: 0;
    background: linear-gradient(145deg, #90EE90, #98FB98);
    border-radius: 50% 50% 0 0;
}

.patch-1 {
    left: 20%;
    width: 40px;
    height: 20px;
}

.patch-2 {
    right: 25%;
    width: 35px;
    height: 18px;
}

.flower-spot {
    position: absolute;
    bottom: 10px;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #FF69B4, #FFB6C1);
    border-radius: 50%;
}

.spot-1 {
    left: 30%;
}

.spot-2 {
    right: 40%;
}

.small-rock {
    position: absolute;
    bottom: 5px;
    background: linear-gradient(145deg, #A9A9A9, #C0C0C0);
    border-radius: 50%;
}

.rock-1 {
    left: 15%;
    width: 12px;
    height: 8px;
}

.rock-2 {
    right: 20%;
    width: 10px;
    height: 6px;
}

/* 浮动数字显示 */
.floating-number {
    position: absolute;
    left: 60%;
    top: 30%;
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 20;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 场景新增：饲料盆、饥饿气泡与小鸡移动 */
.feed-trough {
    position: absolute;
    bottom: 18%;
    right: 12%;
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    z-index: 6;
}
.trough-icon {
    width: 100px;
    height: 40px;
    background: #8B5A2B;
    border-radius: 20px 20px 10px 10px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.2);
}
.trough-feed {
    font-size: 28px;
    transform: translateY(-8px);
}
.trough-feed-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.trough-feed-btn:hover { filter: brightness(1.1); }

/* 饥饿气泡（锚定主小鸡） */
.hungry-bubble {
    position: absolute;
    top: calc(50% - 120px);
    left: calc(50% - 40px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 8px 12px;
    color: #333;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 7;
    animation: bubbleFloat 2.5s ease-in-out infinite;
}
@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 小鸡走向饲料盆动画标记 */
.main-chicken.eating-move {
    animation: chickenMoveToTrough 1.6s ease-in-out forwards;
}
@keyframes chickenMoveToTrough {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(32vw, 22vh) scale(1.02); }
}

/* 进食中状态：主小鸡轻微摆动+阴影加深 */
.main-chicken.eating {
    filter: brightness(1.05);
    animation: chickenEatSway 2.2s ease-in-out infinite;
}
@keyframes chickenEatSway {
    0%, 100% { transform: translate(32vw, 22vh) rotate(0deg); }
    50% { transform: translate(32vw, 22vh) rotate(2deg); }
}

/* 可选：给 .chicken.hungry 展示微弱晃动与色相变化 */
.chicken.hungry { filter: saturate(1.1); }

/* 顶部纵向三按钮布局 - 测试版本v3 */
.floating-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 120;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* 改为center会导致头像被压缩 */
}

/* 右侧三按钮靠右对齐且竖排 */
.floating-ui .top-actions {
    display: flex;
    flex-direction: row;  /* 改为水平排列 */
    gap: 8px;
    align-items: center;
}

/* 顶部图标按钮样式 - 精致圆形 */
.top-icon-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.top-icon-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.top-icon-btn:active {
    transform: translateY(0) scale(0.95);
}

/* 图标样式 */
.top-icon-btn .action-btn-icon {
    font-size: 20px !important;
    line-height: 1;
}

/* 鸡蛋数量样式 */
.action-btn-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    border: 2px solid white;
}

/* 好友按钮特殊样式 */
.floating-ui #friendsBtn {
    background: linear-gradient(135deg, #4facfe, #00f2fe) !important;
    border: none !important;
}

.floating-ui #friendsBtn .action-btn-icon {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* 设置按钮样式 */
.floating-ui #settingsBtn:hover {
    background: rgba(240, 240, 240, 0.95) !important;
}

/* 左侧用户信息整体外观微调 - 强制50px头像 */
.floating-ui .user-panel {
    display: flex !important;
    flex-direction: row !important;  /* 强制水平排列，覆盖媒体查询 */
    align-items: center !important;
    gap: 10px !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 覆盖头像与昵称的默认样式以适配顶部栏 */
.floating-ui .user-avatar { 
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%; 
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}
.floating-ui .user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.floating-ui .user-name { 
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #333 !important;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.floating-ui .user-level { 
    font-size: 11px !important;
    color: #888 !important;
    line-height: 1.3;
    white-space: nowrap;
}



/* ========== 草窝与食盆场景元素 ========== */

/* 草窝 - 收蛋区域 */
.nest-area {
    position: absolute;
    top: calc(65% - 20px);
    left: 5%;
    width: 120px;
    height: 120px;
    z-index: 9;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.nest-area:hover {
    transform: scale(1.05);
}

.nest-container {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 草窝内的鸡蛋显示 */
.nest-eggs {
    position: absolute;
    bottom: 55px; /* 往上移动4个像素 (原15px + 4px) */
    left: calc(50% - 15px); /* 往左移动3个像素 */
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 90px;
    z-index: 10; /* 提高层级，确保不被草窝挡住 */
    pointer-events: none;
}

.nest-egg {
    font-size: 28px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    animation: eggWiggle 2s ease-in-out infinite;
}

.nest-egg:nth-child(1) { animation-delay: 0s; }
.nest-egg:nth-child(2) { animation-delay: 0.3s; }
.nest-egg:nth-child(3) { animation-delay: 0.6s; }

/* 草窝下方的鸡蛋数量显示 */
.nest-egg-count {
    position: absolute;
    bottom: -10px;
    left: 40%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 4px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 11;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    border: 2px solid #FFD700;
    pointer-events: none;
}

.nest-egg-count-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

@keyframes eggWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* 可收蛋提示 */
.nest-hint {
    position: absolute;
    top: -10px;
    left: 40%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.95);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    white-space: nowrap;
    z-index: 12;
    animation: hintBounce 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* 食盆 - 喂食区域 */
.food-bowl-area {
    position: absolute;
    right: 10%;
    width: 50px;
    height: 50px;
    z-index: 9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.food-bowl-area:hover {
    transform: scale(1.05);
}

.bowl-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 食盆本体 */
.food-bowl {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 50px;
    background: linear-gradient(145deg, #DC143C, #B22222, #8B0000);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 -3px 8px rgba(0, 0, 0, 0.3),
        inset 0 3px 8px rgba(255, 255, 255, 0.2);
}

/* 食盆边缘高光 */
.bowl-rim {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 105px;
    height: 12px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
}

/* 食盆内的饲料 */
.bowl-food {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 30px;
    background: linear-gradient(145deg, #FFD700, #FFA500, #FF8C00);
    border-radius: 50%;
    box-shadow: 
        0 2px 8px rgba(255, 165, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bowl-food.has-food {
    opacity: 1;
    animation: foodShimmer 2s ease-in-out infinite;
}

@keyframes foodShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* 饲料颗粒效果 */
.food-grain {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #FFEBCD;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.grain-1 { top: 8px; left: 20px; }
.grain-2 { top: 12px; left: 35px; }
.grain-3 { top: 10px; left: 50px; }
.grain-4 { top: 15px; left: 25px; }
.grain-5 { top: 14px; left: 45px; }

/* 喂食提示 */
.bowl-hint {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(50, 205, 50, 0.95);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(50, 205, 50, 0.4);
    white-space: nowrap;
    display: none;
}

.bowl-hint.show {
    display: block;
    animation: hintBounce 1s ease-in-out infinite;
}

/* ========== 小鸡容器与小鸡显示优化 ========== */

/* 小鸡头顶倒计时显示 */
.chicken-timer {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    white-space: nowrap;
    display: none;
    animation: timerPulse 1s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.chicken-timer.show {
    display: block;
}

@keyframes timerPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

/* 小鸡走向食盆动画 */
.chicken.walking-to-bowl {
    transition: all 1.5s ease-in-out;
    z-index: 20;
}

/* 小鸡进食中状态 */
.chicken.eating {
    animation: chickenEating 1s ease-in-out infinite;
}

@keyframes chickenEating {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}

/* 小鸡容器 - 居中显示 */
.chickens-container {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 600px;
    min-height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10;
    padding: 20px;
    pointer-events: none;
}

/* 单个小鸡 */
.chicken {
    position: relative;
    width: 120px;
    height: 140px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.chicken:hover {
    transform: scale(1.1);
}

/* 小鸡图标 */
.chicken-icon {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
    display: block;
}

/* 小鸡状态标签 */
.chicken-status {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* 倒计时显示 */
.chicken-countdown {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 165, 0, 0.95);
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 3px 12px rgba(255, 165, 0, 0.4);
    white-space: nowrap;
    animation: countdownPulse 1s ease-in-out infinite;
    z-index: 10;
}

@keyframes countdownPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

/* 吃饭状态的倒计时 */
.chicken.eating .chicken-countdown {
    background: rgba(50, 205, 50, 0.95);
    box-shadow: 0 3px 12px rgba(50, 205, 50, 0.4);
}

/* 消化状态的倒计时 */
.chicken.fed .chicken-countdown {
    background: rgba(100, 149, 237, 0.95);
    box-shadow: 0 3px 12px rgba(100, 149, 237, 0.4);
}

/* 饥饿状态 */
.chicken-status.hungry {
    color: #FF6347;
    border-color: #FF6347;
    background: rgba(255, 99, 71, 0.1);
}

/* 吃饭状态 */
.chicken-status.eating {
    color: #32CD32;
    border-color: #32CD32;
    background: rgba(50, 205, 50, 0.15);
}

.chicken.eating .chicken-icon {
}

@keyframes chickenEating {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.chicken.hungry .chicken-icon {
}

@keyframes chickenHungryShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-3px) rotate(-2deg); }
    75% { transform: translateX(3px) rotate(2deg); }
}

/* 饱食状态 */
.chicken-status.fed {
    color: #32CD32;
    border-color: #32CD32;
    background: rgba(50, 205, 50, 0.1);
}

.chicken.fed .chicken-icon {
}

@keyframes chickenHappyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 可收蛋状态 */
.chicken-status.ready {
    color: #FFD700;
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    animation: statusGlow 2s ease-in-out infinite;
}

@keyframes statusGlow {
    0%, 100% { box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6); }
}

.chicken.ready .chicken-icon {
}

@keyframes chickenReadyShine {
    0%, 100% { filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.8)); transform: scale(1.05); }
}

/* 小鸡鸡蛋数量显示 */
.chicken-eggs {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-weight: 600;
}

/* 鸡蛋指示器 */
.egg-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    animation: eggPulse 2s ease-in-out infinite;
    border: 2px solid white;
}

@keyframes eggPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 无小鸡提示 */
.no-chickens {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.no-chickens-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: chickenBob 3s ease-in-out infinite;
}

.no-chickens-text {
    font-size: 20px;
    font-weight: bold;
    color: #2E8B57;
    margin-bottom: 10px;
}

.no-chickens-hint {
    font-size: 14px;
    color: #666;
}

/* 抓虫按钮样式优化 */
.catch-bug-btn {
    display: none;
    position: absolute;
    top: 50%;
    right: -50px;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 12px;
    background: linear-gradient(45deg, #ffcc66, #ff9966);
    color: #fff;
    border: none;
    box-shadow: 0 3px 10px rgba(255, 153, 102, 0.4);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chicken:hover .catch-bug-btn {
    display: block;
}

.catch-bug-btn:hover {
    background: linear-gradient(45deg, #ff9966, #ff6633);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 102, 51, 0.5);
}

.catch-bug-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* 收取按钮样式 */
.collect-egg-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.collect-egg-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.collect-egg-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* 公告模态框样式 */
.announcement-modal .modal-content {
    max-width: 600px;
}

.announcement-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.announcement-item-content {
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.announcement-item-date {
    font-size: 12px;
    color: #999;
}

/* 个人中心样式 */
.profile-modal {
    max-width: 500px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.profile-basic {
    flex: 1;
}

.user-name-display {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-openid {
    font-size: 12px;
    opacity: 0.8;
}

.edit-nickname-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.edit-nickname-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-weight: bold;
}

.profile-stats > div {
    flex: 1;
    text-align: center;
}

.profile-stats span {
    color: #007bff;
    font-size: 18px;
}

.profile-exchange {
    margin-top: 20px;
}

.profile-exchange h4 {
    color: #333;
    margin-bottom: 15px;
}

.exchange-record-list {
    max-height: 300px;
    overflow-y: auto;
}

.exchange-record-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.exchange-record-item:hover {
    background-color: #f8f9fa;
}

.record-left {
    font-size: 24px;
}

.record-right {
    flex: 1;
}

.record-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.record-status {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.record-time {
    font-size: 12px;
    color: #999;
}

/* 编辑昵称模态框样式 */
.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-btn:active {
    transform: translateY(0);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-stats > div {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .chickens-container {
        gap: 20px;
        width: 45%;
    }
    
    .chicken {
        width: 80px;
        height: 100px;
    }
    
    .chicken-icon {
        font-size: 50px;
    }
    
    .catch-bug-btn {
        right: -35px;
        font-size: 11px;
        padding: 4px 8px;
    }
}