/* ==========================================
   style.css - 样式文件 (V3.1 交互优化版)
   ========================================== */
body { 
    font-family: 'M PLUS Rounded 1c', 'ZCOOL KuaiLe', sans-serif; 
    background-color: #fef9c3; 
    
    /* 核心修复：禁止 iOS 点击高亮和长按菜单 */
    -webkit-tap-highlight-color: transparent; 
    -webkit-touch-callout: none; /* 禁止长按菜单 */
    -webkit-user-select: none;   /* 禁止文本选择 */
    user-select: none; 
    
    overscroll-behavior: none; /* 禁止橡皮筋效果 */
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden; /* 防止 body 滚动 */
}

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* APP 容器 */
.app-container { 
    padding-top: constant(safe-area-inset-top); /* 兼容旧版 iOS */
    padding-top: env(safe-area-inset-top);      /* iOS 11+ 标准写法 */
    max-width: 600px; 
    margin: 0 auto; 
    background-color: #ffffff; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 

    position: relative; 
    overflow: hidden;
}

/* 按钮点击效果 */
.btn-press { transition: transform 0.1s; cursor: pointer; } 
.btn-press:active { transform: scale(0.95); }

/* 动画定义 */
@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slideInRight { 0% { transform: translateX(100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { 0% { transform: translateX(-100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.animate-popIn { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.3s ease-out; }
.animate-slide-in-left { animation: slideInLeft 0.3s ease-out; }
.animate-pulse { animation: pulse-green 1.5s infinite; }
.animate-shake { animation: shake 0.5s; }
.animate-bounce { animation: bounce 1s infinite; }

/* 麦克风状态 */
.mic-default { background-color: #f3f4f6; color: #9ca3af; border: 4px solid #e5e7eb; transition: all 0.2s; }
.mic-holding { transform: scale(0.95); opacity: 0.8; }

/* 模态框 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: white; border-radius: 24px; width: 100%; max-width: 320px; padding: 24px; text-align: center; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

/* 下拉分类 */
.category-content { transition: max-height 0.3s ease-out; overflow: hidden; }
.category-content.hidden { display: none; }
.rotate-180 { transform: rotate(180deg); }

/* 底部导航按钮 */
.nav-btn.active { color: #eab308; transform: scale(1.1); } 

/* 视频/图片容器 */
.media-box { background-color: #f9fafb; position: relative; }

/* 强制禁止选择 */
img, button, .kana-card {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}