/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    touch-action: manipulation;
    width: 100vw;
    height: 100vh;
}

/* 主容器 */
.watch-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 10px 0;
}

.header h1 {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* 模式切换按钮 */
.mode-switch {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}

.mode-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 动物显示区域 */
.animal-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
}

.animal-emoji {
    font-size: 70px;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-15px) scale(1.05); 
    }
}

.animal-name {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.status-text {
    font-size: 13px;
    color: #aaa;
    margin-top: 8px;
    text-align: center;
    min-height: 20px;
    transition: all 0.3s ease;
}

/* 消息显示区域 */
.message-display {
    width: 90%;
    max-height: 120px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-top: 15px;
    font-size: 12px;
    line-height: 1.6;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-message {
    color: #ccc;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.animal-message {
    color: #00d4ff;
    padding: 5px 0;
    margin-top: 5px;
    font-weight: 500;
}

/* 翻译结果 */
.translation-result {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed rgba(0, 212, 255, 0.3);
}

.translation-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    font-weight: bold;
}

.translation-text {
    font-size: 14px;
    color: #ffd700;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* 控制按钮区域 */
.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.95);
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    flex: 1;
    text-align: center;
}

/* 录音按钮 */
.btn-record {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-record:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn-record.recording {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.9);
    }
}

/* 播放按钮 */
.btn-play {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-play:hover {
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 录音指示器 */
.recording-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.4) 0%, rgba(255, 107, 107, 0) 70%);
    border-radius: 50%;
    display: none;
    animation: ripple-effect 1.5s ease-out infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes ripple-effect {
    0% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(2); 
        opacity: 0; 
    }
}

/* 滑动提示 */
.swipe-hint {
    font-size: 11px;
    color: #666;
    text-align: center;
    padding: 8px 0;
    letter-spacing: 1px;
}

/* 滚动条样式 */
.message-display::-webkit-scrollbar {
    width: 4px;
}

.message-display::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.message-display::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 2px;
}

/* 响应式优化 - 小屏幕设备 */
@media (max-width: 320px) {
    .animal-emoji {
        font-size: 60px;
    }
    
    .animal-name {
        font-size: 18px;
    }
    
    .btn {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .header h1 {
        font-size: 16px;
    }
}

/* 响应式优化 - 大屏幕设备 */
@media (min-width: 400px) {
    .animal-emoji {
        font-size: 90px;
    }
    
    .animal-name {
        font-size: 26px;
    }
    
    .status-text {
        font-size: 15px;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 400px) {
    .watch-container {
        padding: 10px;
    }
    
    .animal-emoji {
        font-size: 50px;
    }
    
    .header h1 {
        font-size: 14px;
    }
    
    .message-display {
        max-height: 80px;
    }
}
