/* name 子目录专用样式文件 */
/* n1-n4 和 na 目录的名称学习页面样式 */

/* 主表格样式 - 保留原有的边框设计 */
table.name-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #bbbddd;
}

table.name-table th,
table.name-table td {
    border: 1px solid #bbbddd;
    padding: 15px;
    text-align: center;
    vertical-align: middle;
}

table.name-table th {
    background: #f5f5f5;
    font-weight: bold;
    font-size: 0.95rem;
}

/* 英文名显示区 */
.name-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.english-name {
    color: #cc0000;
}

/* 拼音+汉字容器 */
.pinyin-hanzi-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* 拼音+汉字分组 */
.word-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pinyin-item {
    font-size: 1rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
}

.hanzi-item {
    font-size: 1.1rem;
    color: #cc0000;
    font-weight: bold;
    line-height: 1.4;
}

/* 播放按钮 */
.sound-cell {
    min-width: 60px;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: all 0.2s ease;
}

.play-btn:hover {
    background: #0055aa;
    transform: scale(1.05);
}

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

.play-btn.playing {
    background: #ff9500;
}

/* 字母导航 */
.alphabet-nav {
    margin: 15px 0;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.alphabet-nav a {
    color: #0055aa;
    text-decoration: none;
    margin: 0 3px;
}

.alphabet-nav a:hover {
    text-decoration: underline;
}

/* 名字范围导航 */
.range-nav {
    margin: 20px 0;
    padding: 12px 15px;
    background: #f0f8ff;
    border-radius: 6px;
    text-align: left;
}

.range-nav strong {
    color: #cc0000;
    font-size: 1.1rem;
}

.range-nav a {
    color: #0055aa;
    text-decoration: none;
    margin: 0 5px;
}

.range-nav a:hover {
    text-decoration: underline;
    color: #007AFF;
}

/* 名字列表（na目录索引页） */
.name-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px 20px;
    margin: 25px 0;
    padding: 15px;
}

.name-list .name {
    display: inline-block;
}

.name-list .name a {
    color: #0055aa;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.name-list .name a:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* 名称链接 */
.name-links {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.name-links li {
    padding: 5px 0;
}

.name-links a {
    color: #0055aa;
    text-decoration: none;
}

.name-links a:hover {
    text-decoration: underline;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    table.name-table thead {
        display: none;
    }

    table.name-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #bbbddd;
        border-radius: 8px;
        overflow: hidden;
    }

    table.name-table td {
        display: block;
        width: 100% !important;
        border: none;
        border-bottom: 1px solid #eee;
        padding: 12px;
    }

    table.name-table td:last-child {
        border-bottom: none;
    }

    .name-display {
        font-size: 1.3rem;
        background: #f9f9f9;
        padding: 10px;
    }

    .pinyin-hanzi-container {
        gap: 12px;
        padding: 10px;
    }

    .word-group {
        gap: 10px;
    }

    .pinyin-item {
        font-size: 1.1rem;
    }

    .hanzi-item {
        font-size: 1.3rem;
    }

    .sound-cell {
        text-align: center;
        padding: 10px;
    }

    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .alphabet-nav {
        font-size: 0.8rem;
    }

    .alphabet-nav a {
        display: inline-block;
        margin: 3px 2px;
    }

    /* 名字列表移动端适配 */
    .name-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 12px;
        padding: 10px;
    }

    .range-nav {
        font-size: 0.9rem;
        padding: 10px;
    }

    .range-nav a {
        margin: 0 3px;
        font-size: 0.85rem;
    }
}

/* 小屏幕移动端 */
@media (max-width: 480px) {
    .name-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 10px;
    }

    .name-list .name a {
        font-size: 0.9rem;
    }
}
