/* style_resonance.css */

/* 共鸣词网格 - 两列布局，适配移动端 */
.resonance-words-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 强制两列 */
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    padding-bottom: 20px;
}

/* 词汇卡片样式 */
.resonance-word-card {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 4px;
    padding: 12px 8px;
    text-align: center;
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    color: #2c2c2c; /* ink-black */
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    
    /* 确保在移动端易于点击 */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 悬停效果 */
.resonance-word-card:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #9ca3af; /* gray-400 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 选中状态 */
.resonance-word-card.selected {
    background-color: #2c2c2c; /* ink-black */
    color: #f3f4f6; /* gray-100 */
    border-color: #2c2c2c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 选中时的装饰线 */
.resonance-word-card.selected::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1px;
    background-color: #ef4444; /* stamp-red */
    opacity: 0.8;
}

/* 抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 脉冲动画 - 用于提示按钮 */
@keyframes pulse-gentle {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse-gentle 2s infinite;
}

/* 加载动画 */
.loading-spinner {
    width: 100%;
    text-align: center;
    padding: 20px;
    font-family: 'Noto Sans SC', sans-serif;
    color: #6b7280;
    font-size: 14px;
}

.error-message {
    width: 100%;
    text-align: center;
    padding: 20px;
    color: #ef4444;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .resonance-words-grid {
        gap: 8px;
    }
    
    .resonance-word-card {
        font-size: 15px;
        padding: 10px 4px;
    }
}

