/* grade1.css - 一年级拼音z/zh生字卡专用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background: linear-gradient(145deg, #FDE8CD 0%, #FCE5C1 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: 'Segoe UI', 'Noto Sans CJK SC', 'PingFang SC', '微软雅黑', system-ui, sans-serif;
    padding: 20px;
    padding-top: 28px;
}

.card {
    width: 100%;
    max-width: 680px;
    background: #FFFFF2;
    border-radius: 64px 40px 80px 40px;
    box-shadow: 0 25px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #FFDEB3;
    margin-top: 6px;
}

.card-inner {
    padding: 2.5rem 1.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.level-badge {
    background: #FFB882;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.hanzi {
    font-size: 7rem;
    font-weight: 800;
    color: #3B5C2E;
    margin-bottom: 1rem;
    font-family: 'Noto Serif SC', '楷体', serif;
    text-shadow: 4px 4px 10px rgba(0,0,0,0.05);
}

.phrase {
    font-size: 1.6rem;
    background: #FFF1E2;
    padding: 0.3rem 1.2rem;
    border-radius: 60px;
    color: #C1672C;
    font-weight: 500;
}

.pinyin-area {
    margin-top: 2rem;
    background: #EDF3E3;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    transition: 0.2s;
    border: 1px solid #D6E5B5;
}

.pinyin {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1F6390;
    font-family: monospace;
}

.pinyin-label {
    font-size: 0.8rem;
    color: #7B8F5B;
}

/* 底部操作区：采用flex列布局，计数器与提示分行，间距明确 */
.info-bar {
    background: #F7EFE2;
    padding: 16px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #FFE2BF;
}

/* 计数行：单独一行 */
.counter-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

/* 提示行（点卡片看拼音）：单独一行 */
.hint-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* 按钮行 */
.button-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.counter {
    background: #EBDCC8;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    text-align: center;
}

.hint-text {
    background: #EBDCC8;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    text-align: center;
}

/* 随机换字按钮：大号粗体 */
button {
    background: #FFF6EA;
    border: none;
    padding: 12px 36px;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.3rem;
    color: #B4622A;
    cursor: pointer;
    transition: 0.1s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    letter-spacing: 2px;
    width: auto;
    min-width: 180px;
}

button:active {
    transform: scale(0.96);
    background: #F2E2CF;
}

.footer-note {
    font-size: 0.7rem;
    background: #FAF0E3;
    text-align: center;
    padding: 10px;
    color: #A97A4A;
    border-top: 1px solid #FFE2BF;
}

/* ========= 手机版：彻底让计数器、提示分行且不粘在一起 ========= */
@media (max-width: 550px) {
    .hanzi {
        font-size: 5rem;
    }
    .phrase {
        font-size: 1.2rem;
    }
    .pinyin {
        font-size: 1.4rem;
    }
    button {
        font-size: 1.1rem;
        padding: 10px 24px;
        min-width: 150px;
    }
    .info-bar {
        padding: 12px 16px 18px 16px;
    }
    .counter-row {
        margin-bottom: 14px;
    }
    .hint-row {
        margin-bottom: 24px;
    }
    .counter, .hint-text {
        font-size: 0.9rem;
        padding: 6px 18px;
        font-weight: 700;
    }
    body {
        padding-top: 22px;
    }
    .card {
        margin-top: 6px;
    }
}

/* 超小屏（宽度小于400）再增加间距避免拥挤 */
@media (max-width: 450px) {
    .counter-row {
        margin-bottom: 12px;
    }
    .hint-row {
        margin-bottom: 22px;
    }
    .counter, .hint-text {
        font-size: 0.85rem;
        padding: 5px 16px;
    }
}

.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2E3F2C;
    color: #FFF1CF;
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
    z-index: 200;
    font-weight: 500;
    white-space: nowrap;
}