/* TimeMatrix.css */
.tm-outer-container {
    display: flex;
    justify-content: flex-start; /* 核心：内容向左靠拢 */
    gap: 30px;
    padding: 20px;
    width: 100%;
}

.tm-main-viewport {
    flex: 1;
    min-width: 0;
    width: auto;
    overflow: visible;
}

.tm-main-viewport::-webkit-scrollbar {
    display: none;
}

.tm-main-viewport {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Loading state */
.tm-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
    color: #64748b;
    font-size: 14px;
}

.tm-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: tm-spin 0.8s linear infinite;
}

@keyframes tm-spin {
    to { transform: rotate(360deg); }
}

/* 6列网格：缩小间距以适配 300px 广告位的挤压 */
.tm-matrix-grid {
    display: grid;
    grid-template-columns: repeat(6, 130px);
    gap: 12px 6px;
    margin-bottom: 32px;
    justify-items: start;
}

/* 紧凑型卡片设计 (参考 frontend-design 审美) */
.tm-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 13px 5px 12px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: 114px;
}

.tm-card:hover {
    border-color: #ef4444;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tm-active {
    background-color: #fff1f2;
    border: 1px solid #ef4444 !important;
}

/* 文本排版 */
.tm-kanji { font-size: 16px; font-weight: 700; color: #1e293b; transform: translateY(6px); }
.tm-furigana { font-size: 11px; color: #64748b; font-weight: normal; }
.tm-meaning { display: block; font-size: 14px; color: #64748b; margin-top: 4px; transform: translateY(1px); }

/* 播放图标：平时半透明，悬停显色 */
.tm-icon-play {
    position: absolute;
    right: 4px;
    top: 1px;
    width: 14px;
    height: 14px;
    color: #cbd5e1;
}
.tm-card:hover .tm-icon-play { color: #ef4444; }

/* 红色分类标签 */
.tm-group-label {
    display: inline-block;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 横幅广告栏：位于内容底部 */
.tm-bottom-banner-ad {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.tm-bottom-banner-ad .banner-ad-content {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin-left: 0;
    margin-right: 0;
    padding: 0 16px;
    height: 70px;
    gap: 12px;
}
