/* 公共样式文件 */
@layer utilities {
    /* 性能优化样式 */
    .content-auto {
        content-visibility: auto;
    }

    /* TabBar 相关样式 */
    .tabbar-item {
        @apply flex flex-col items-center justify-center text-neutral transition-colors duration-200;
    }
    .tabbar-item-active {
        color: #4F46E5;
    }

    /* 动画和过渡样式 */
    .bottle-fill {
        transition: height 0.5s ease-in-out;
    }
    .emotion-btn {
        @apply rounded-full py-3 px-6 m-2 text-white shadow-lg transform transition-all duration-300 hover:scale-105 active:scale-95;
    }

    /* 通用模态弹窗样式 */
    .modal-overlay {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        border-radius: 30px;
        font-weight: 500;
        z-index: 1000;
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    .modal-overlay.show {
        opacity: 1;
    }

    .emotion-feedback {
        @apply modal-overlay;
        background: rgba(0, 0, 0, 0.8);
        padding: 20px 40px;
        border-radius: 50px;
        font-size: 18px;
    }
    .emotion-feedback.show {
        transform: translate(-50%, -50%) scale(1.1);
    }

    .breathe-hint {
        @apply modal-overlay;
        background: rgba(79, 70, 229, 0.9);
        padding: 15px 30px;
        font-size: 16px;
        margin-top: 20px;
    }

    /* 瓶子相关样式 */
    .bottle-container {
        position: relative;
        width: 140px;
        height: 220px;
        margin: 0 auto;
        border: 3px solid #4F46E5;
        border-radius: 10px 10px 30px 30px;
        background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
    }

    /* 成就样式 */
    .achievement-card {
        @apply bg-white rounded-lg p-4 shadow-md border border-gray-200;
        transition: all 0.3s ease;
    }
    .achievement-card:hover {
        @apply shadow-lg transform -translate-y-1;
    }
    .achievement-completed {
        @apply bg-gradient-to-r from-green-50 to-green-100 border-green-300;
    }

    /* 图表容器样式 */
    .chart-container {
        position: relative;
        width: 100%;
        height: 300px;
        background: white;
        border-radius: 8px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* 情绪按钮颜色 */
    .emotion-anxiety { background-color: #F59E0B; }
    .emotion-tension { background-color: #EF4444; }
    .emotion-unease { background-color: #8B5CF6; }
    .emotion-loneliness { background-color: #06B6D4; }
    .emotion-depression { background-color: #6B7280; }
    .emotion-pressure { background-color: #10B981; }

    /* 响应式设计 */
    @media (max-width: 640px) {
        .bottle-container {
            width: 120px;
            height: 200px;
        }
        .emotion-btn {
            @apply py-2 px-4 text-sm;
        }
    }
}