/* 收藏品面板 */
.collectibles-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 85;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 折叠状态的面板 */
.collectibles-panel.collapsed {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
}

.collectibles-panel.collapsed .collectibles-list,
.collectibles-panel.collapsed .progress-container {
    display: none;
}

.collectibles-panel.collapsed .collectibles-header {
    height: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.collectibles-panel.collapsed .collectibles-header h3 {
    display: none;
}

.collectibles-header {
    padding: 18px 20px 15px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
    position: relative;
}

/* 折叠/展开按钮 */
.toggle-panel {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.toggle-panel:hover {
    opacity: 1;
    transform: scale(1.1);
}

.toggle-panel:before {
    content: '';
    position: absolute;
    background-color: white;
    width: 100%;
    height: 2px;
    top: 10px;
    left: 0;
    transition: all 0.3s ease;
}

/* 移除+号的垂直线 */
.collectibles-panel.collapsed .toggle-panel:before {
    transform: rotate(0);
}

.collectibles-panel .toggle-panel:after {
    display: none;
}

/* 收集图标 - 在折叠状态下显示 */
.collection-icon {
    display: none;
    font-size: 24px;
    color: white;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.collectibles-panel.collapsed .collection-icon {
    display: block;
}

.collectibles-header h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-container {
    margin-top: 12px;
}

.progress-bar {
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #f1c40f, #f39c12);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-text {
    text-align: right;
    font-size: 13px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.collectibles-list {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    position: relative;
    z-index: 5;
}

.collectibles-list::-webkit-scrollbar {
    width: 6px;
}

.collectibles-list::-webkit-scrollbar-track {
    background: transparent;
}

.collectibles-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.collectible-type-section {
    margin-bottom: 20px;
}

.collectible-type-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    font-weight: 600;
}

.collectible-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.collectible-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.collectible-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.collectible-item.found {
    background-color: #e8f5e9;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.collectible-item.not-found {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.collectible-item img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.collectible-item span {
    font-size: 13px;
    text-align: center;
    color: #555;
    font-weight: 500;
}

.unknown-item {
    width: 45px;
    height: 45px;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: #999;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 地图上的收藏品 */
.collectible-item-map {
    position: absolute;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 50;
    transform: translate(-50%, -50%);
}

/* 宝箱图标样式 */
.collectible-item-map .collectible-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 51;
    animation: treasureBounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}

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

.collectible-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: collectible-pulse 2s infinite;
    z-index: 49;
}

/* 宝箱特殊发光效果 */
.collectible-glow.treasure {
    background-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: treasureGlow 2s infinite;
}

@keyframes treasureGlow {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: scale(1.3);
        opacity: 0.9;
        box-shadow: 0 0 35px rgba(255, 215, 0, 0.9);
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* 不同类型的收藏品样式 */
.collectible-item-map.flower .collectible-glow {
    background-color: rgba(255, 105, 180, 0.7);
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.7);
}

.collectible-item-map.stone .collectible-glow {
    background-color: rgba(169, 169, 169, 0.7);
    box-shadow: 0 0 10px rgba(169, 169, 169, 0.7);
}

.collectible-item-map.herb .collectible-glow {
    background-color: rgba(50, 205, 50, 0.7);
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.7);
}

.collectible-item-map.artifact .collectible-glow {
    background-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.collectible-item-map.scroll .collectible-glow {
    background-color: rgba(160, 82, 45, 0.7);
    box-shadow: 0 0 10px rgba(160, 82, 45, 0.7);
}

/* 收藏品收集动画 */
@keyframes collectible-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

.collectible-item-map.collected {
    animation: collect-item 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes collect-item {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.9;
    }
    60% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* 收集成功提示 */
.collection-success {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.collection-success.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.success-content {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-content h3 {
    color: #3a7bd5;
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

.item-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    text-align: left;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.item-info img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-right: 20px;
    background-color: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.item-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.item-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.close-success {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.close-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 收藏品详情 */
.collectible-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.collectible-detail.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.collectible-detail .detail-content {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    text-align: center;
}

.collectible-detail h3 {
    margin: 0 0 15px 0;
    color: #3a7bd5;
    text-align: center;
    font-weight: 600;
    font-size: 22px;
}

.item-image {
    text-align: center;
    margin-bottom: 20px;
}

.item-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.item-description {
    margin-bottom: 25px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.item-description p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.close-detail-btn {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.close-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 游戏控制面板 */
.game-control-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 95;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.start-game-btn, .reset-game-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.start-game-btn {
    background: linear-gradient(135deg, #1abc9c, #2ecc71);
    color: white;
    padding: 15px 35px;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    animation: buttonPulse 2s infinite;
}

.start-game-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.start-game-btn:hover {
    background: linear-gradient(135deg, #16a085, #27ae60);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

.start-game-btn:hover::before {
    left: 100%;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.reset-game-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.reset-game-btn:hover {
    transform: translateY(-2px);
    background-color: #2980b9;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.hidden {
    display: none;
}

/* 游戏开始提示 */
.game-start-tip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
}

.game-start-tip.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.tip-content {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s ease forwards;
}

.tip-content h3 {
    color: #1abc9c;
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
}

.tip-content p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.5;
}

.close-tip {
    background: linear-gradient(135deg, #1abc9c, #2ecc71);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.close-tip:hover {
    background: linear-gradient(135deg, #16a085, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.4);
}

/* 游戏完成提示 */
.game-completion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
}

.game-completion.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.completion-content {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s ease forwards;
}

.completion-content h3 {
    color: #f1c40f;
    margin: 0 0 15px 0;
    font-size: 26px;
}

.completion-content p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.5;
}

.completion-reward {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.completion-reward p {
    font-weight: bold;
    color: #333;
}

.completion-reward img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 5px;
}

.close-completion {
    background-color: #f1c40f;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    margin-right: 10px;
}

.close-completion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1);
    }
}

/* 响应式样式 */
/* 大屏设备 (lg - PC端 > 992px) */
@media (min-width: 992px) {
    .collectibles-panel {
        width: 320px;
        max-height: 80vh;
        top: 20px;
        right: 20px;
    }
    
    .collectible-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .item-info img {
        width: 80px;
        height: 80px;
    }
    
    .success-content,
    .tip-content,
    .completion-content,
    .collectible-detail .detail-content {
        max-width: 450px;
        padding: 30px;
    }
}

/* 中等设备 (md - 平板 768px - 992px) */
@media (min-width: 768px) and (max-width: 991px) {
    .collectibles-panel {
        width: 280px;
        max-height: 75vh;
        top: 15px;
        right: 15px;
    }
    
    .collectible-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .item-info img {
        width: 70px;
        height: 70px;
    }
    
    .success-content,
    .tip-content,
    .completion-content,
    .collectible-detail .detail-content {
        max-width: 400px;
        padding: 25px;
    }
    
    .collectibles-header h3 {
        font-size: 18px;
    }
    
    .collectible-item-map {
        width: 40px;
        height: 40px;
    }
}

/* 小屏设备 (sm - 手机端 < 768px) */
@media (max-width: 767px) {
    .collectibles-panel {
        top: 10px;
        right: 10px;
        width: 280px;
        max-height: 75vh;
    }
    
    .collectibles-header {
        padding: 15px;
    }
    
    .collectibles-header h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .toggle-panel {
        top: 15px;
        right: 15px;
        width: 18px;
        height: 18px;
    }
    
    .collectible-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .collectible-type-section h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .collectibles-list {
        padding: 15px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overflow-y: scroll;
    }
    
    .item-info {
        flex-direction: column;
        align-items: center;
    }
    
    .item-info img {
        width: 60px;
        height: 60px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .collectible-item-map {
        width: 40px;
        height: 40px;
    }
    
    .success-content,
    .collectible-detail .detail-content {
        padding: 20px;
        max-width: 300px;
    }
    
    .success-content h3,
    .collectible-detail h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .close-success,
    .close-detail-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .start-game-btn {
        padding: 12px 22px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .collectibles-panel {
        top: 10px;
        right: 10px;
        width: 200px;
    }
    
    .success-content,
    .tip-content,
    .completion-content,
    .collectible-detail .detail-content {
        width: 95%;
        padding: 15px;
    }
}

/* 灰色蒙版 */
.overlay-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 90;
    pointer-events: all;
    transition: opacity 0.5s ease;
} 