/* ===== 全局 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --mint: #34e0b4;
    --mint-dark: #0fb89a;
    --mint-light: #e6fcf5;
    --blue: #4d8dff;
    --blue-light: #e8f1ff;
    --ink: #1a1a1a;
    --gray: #8a93a6;
    --shadow: 0 8px 30px rgba(30, 60, 90, .08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #eef4f9 0%, #f7f9fc 30%, #f7f9fc 100%);
    color: var(--ink);
    min-height: 100vh;
}

.page {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ===== Hero 渐变区 ===== */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 30px 22px 26px;
    background: linear-gradient(135deg, #3fe8b8 0%, #1fd0c0 55%, #18b8d8 100%);
    box-shadow: 0 16px 40px rgba(24, 200, 180, .35);
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}

.hero-circle-1 {
    width: 220px;
    height: 220px;
    top: -90px;
    right: -60px;
}

.hero-circle-2 {
    width: 140px;
    height: 140px;
    bottom: -70px;
    left: -40px;
    background: rgba(255, 255, 255, .1);
}

.hero-text { position: relative; z-index: 2; max-width: 62%; }

.title {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.15;
    color: #0b2b26;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, .92);
    color: #0b6e5f;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(11, 110, 95, .12);
}

.hero-tag::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--mint-dark);
}

.subtitle {
    margin-top: 14px;
    font-size: 13px;
    color: rgba(11, 43, 38, .65);
    letter-spacing: 3px;
}

.hero-illu {
    position: absolute;
    right: 10px;
    bottom: 0;
    width: 38%;
    max-width: 220px;
    z-index: 1;
}

.hero-illu img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .12));
}

/* ===== 主功能卡片 ===== */
.main-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: -18px;
    position: relative;
    z-index: 3;
    padding: 0 6px;
    margin-bottom: 16px;
}

.main-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: #fff;
    border-radius: 20px;
    padding: 14px 10px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s;
    text-align: left;
    font-family: inherit;
}

.main-card:active { transform: scale(.97); }

.main-card.active {
    box-shadow: 0 10px 30px rgba(24, 184, 154, .28);
    outline: 2px solid rgba(15, 184, 154, .55);
}

.main-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.main-card-icon.blue { background: linear-gradient(135deg, #6db3ff, #3b82f6); }
.main-card-icon.mint { background: linear-gradient(135deg, #4ae8bb, #0fb89a); }
.main-card-icon.amber { background: linear-gradient(135deg, #ffd166, #ff9f43); }

.main-card-icon .icon { width: 24px; height: 24px; }

.main-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.main-card-desc {
    margin-top: 3px;
    font-size: 10px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 输入卡片 ===== */
.input-card {
    background: #fff;
    border: 2px solid #cdeef6;
    border-radius: 24px;
    padding: 20px 18px 14px;
    box-shadow: var(--shadow);
    transition: border-color .2s;
}

.input-card:focus-within { border-color: var(--mint); }

#inputText {
    width: 100%;
    border: none;
    outline: none;
    resize: vertical;
    min-height: 130px;
    font-size: 18px;
    line-height: 1.7;
    font-family: inherit;
    color: var(--ink);
    background: transparent;
}

#inputText::placeholder { color: #c3c9d4; }

.input-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* 语言切换胶囊 */
.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f0fbff, #eaf6ff);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #1e5fb8;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 3px 10px rgba(59, 130, 246, .1);
}

.lang-pill:active { filter: brightness(.96); }

.swap-icon { color: #3b82f6; }

/* 麦克风按钮 */
.mic-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3fe8b8, #12b5c9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 6px 16px rgba(18, 181, 201, .35);
    transition: transform .15s;
}

.mic-btn:active { transform: scale(.94); }
.mic-btn.recording { background: linear-gradient(135deg, #ff8a8a, #ef4444); box-shadow: 0 6px 16px rgba(239, 68, 68, .35); }

.icon { width: 22px; height: 22px; }

/* ===== 工具按钮（朗读/慢速/复制） ===== */
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: var(--blue-light);
    color: #2f6fe0;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.tool-btn:hover { filter: brightness(.97); }
.tool-btn:active { transform: scale(.95); }
.tool-btn.playing { background: linear-gradient(135deg, #6db3ff, #3b82f6); color: #fff; }

.tool-btn .slow-tag { font-weight: 700; font-size: 14px; }

/* ===== 每日一句卡片 ===== */
.sentence-card {
    margin-top: 18px;
    background: linear-gradient(135deg, #e8fdf4 0%, #dcf7ec 100%);
    border-radius: 24px;
    padding: 20px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.sentence-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(52, 224, 180, .16);
    top: -50px;
    right: -40px;
}

.sentence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.sentence-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f7a5c;
    letter-spacing: 1px;
}

.edit-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f7a5c;
    background: rgba(255, 255, 255, .6);
}

.edit-btn:hover { background: rgba(255, 255, 255, .9); }
.edit-btn.active { color: #fff; background: linear-gradient(135deg, #6db3ff, #3b82f6); }
.edit-btn .icon { width: 16px; height: 16px; }

.sentence-en {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ink);
    cursor: pointer;
    position: relative;
}

.sentence-zh {
    margin-top: 6px;
    font-size: 15px;
    color: #5b6b63;
    line-height: 1.6;
    position: relative;
}

.sentence-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
    position: relative;
}

.sentence-bar .tool-btn {
    background: rgba(255, 255, 255, .85);
    color: #0f7a5c;
    justify-content: center;
    padding: 9px 4px;
}

.sentence-bar .tool-btn.playing { background: linear-gradient(135deg, #4ae8bb, #0fb89a); color: #fff; }
.sentence-bar .btn-text { font-size: 13px; }
.sentence-bar .tool-btn .icon { width: 16px; height: 16px; }

/* ===== 句子编辑区 ===== */
.sentence-edit input {
    width: 100%;
    border: 2px solid #e3e9f0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}

.sentence-edit input:focus { border-color: var(--mint); }

.edit-actions { display: flex; gap: 10px; }

.action-btn {
    flex: 1;
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #eef1f6;
    color: #4b5563;
    font-family: inherit;
    transition: transform .15s;
}

.action-btn:active { transform: scale(.96); }

.action-btn.primary {
    background: linear-gradient(135deg, #3fe8b8, #12b5c9);
    color: #fff;
    box-shadow: 0 6px 16px rgba(18, 181, 201, .3);
}

/* ===== 常用句子 ===== */
.phrases-card {
    background: #fff;
    border-radius: 24px;
    padding: 20px 18px;
    box-shadow: var(--shadow);
}

.phrases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.phrases-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.phrases-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3fe8b8, #12b5c9);
}

.phrases-header .edit-btn { color: #6b7280; background: #f2f4f8; }
.phrases-header .edit-btn:hover { background: #e6eaf1; }

/* ===== 个人收藏 ===== */
.sentence-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
#favSentenceBtn {
    color: #f59e0b;
    background: #fff8eb;
}
#favSentenceBtn:hover { background: #fef3c7; }
#favSentenceBtn.faved svg { fill: #f59e0b; }

.fav-btn {
    color: #f59e0b !important;
    background: #fff8eb !important;
}
.fav-btn.faved svg { fill: #f59e0b; }

.fav-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 14px;
    line-height: 1.8;
}
.fav-empty svg {
    width: 48px;
    height: 48px;
    color: #fcd34d;
    margin-bottom: 12px;
}

/* 退出登录按钮 */
.phrases-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: #fef1f2;
    color: #e5484d;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: transform .15s, background .15s;
}

.logout-btn:hover { background: #fee2e4; }
.logout-btn:active { transform: scale(.94); }
.logout-btn .icon { width: 14px; height: 14px; }

.manage-on .phrases-title { color: var(--mint-dark); }
.manage-on .phrases-title::before { background: linear-gradient(180deg, #6db3ff, #3b82f6); }

/* 句子搜索框 */
.phrase-search {
    position: relative;
    margin-bottom: 14px;
}

.phrase-search::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E") no-repeat center / contain;
    pointer-events: none;
}

.phrase-search input {
    width: 100%;
    border: 2px solid #eef1f6;
    border-radius: 999px;
    padding: 13px 16px 13px 42px;
    font-size: 15px;
    outline: none;
    background: #f7f9fc;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}

.phrase-search input:focus {
    border-color: var(--mint);
    background: #fff;
}

/* 分类导航：一行两个 */
.cat-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.cat-tab {
    border: none;
    background: #f2f4f8;
    color: #5b6472;
    border-radius: 16px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
    line-height: 1.35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.cat-tab.active {
    background: linear-gradient(135deg, #34e0b4, #12b5c9);
    color: #fff;
    box-shadow: 0 6px 16px rgba(18, 181, 201, .3);
}

.cat-tab .cat-count {
    font-size: 12px;
    opacity: .7;
    margin-left: 3px;
}

.cat-tools {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    gap: 2px;
}

.cat-edit {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .6;
    cursor: pointer;
    vertical-align: middle;
}

.cat-edit:hover { opacity: 1; }
.cat-edit .icon { width: 14px; height: 14px; }

/* 分类排序箭头 */
.cat-arrow {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .6;
    cursor: pointer;
}

.cat-arrow:hover { opacity: 1; }
.cat-arrow .icon { width: 14px; height: 14px; }
.cat-arrow.disabled { opacity: .25; cursor: not-allowed; }
.cat-arrow.disabled:hover { opacity: .25; }

/* 句子列表 */
.phrase-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #9aa3b2;
    letter-spacing: 2px;
    margin: 18px 0 4px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phrase-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e5eaf2, transparent);
}

.phrases-tip {
    font-size: 12px;
    color: #aab2c0;
    margin: -4px 0 12px;
}

.phrase-item {
    padding: 14px 6px;
    border-bottom: 1px solid #f2f4f8;
    border-radius: 12px;
    transition: background .15s;
}

.phrase-item:hover { background: #fafcfe; }
.phrase-item:last-child { border-bottom: none; }

.phrase-texts { cursor: pointer; }
.phrase-texts:active .phrase-en { color: var(--mint-dark); }

.phrase-en {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

.phrase-zh {
    margin-top: 3px;
    font-size: 13px;
    color: #9aa3b2;
    line-height: 1.5;
}

.phrase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.phrase-actions .tool-btn {
    padding: 8px 12px;
    font-size: 13px;
}

.phrase-actions .tool-btn .icon { width: 16px; height: 16px; }

.phrase-actions .del-btn {
    background: #fef1f2;
    color: #e5484d;
}

.phrase-actions .del-btn:hover { background: #fee2e4; }

.phrase-actions .edit-item-btn {
    background: #f2f4f8;
    color: #5b6472;
}

.empty-tip {
    text-align: center;
    color: #c3c9d4;
    font-size: 14px;
    padding: 24px 0;
}

/* 添加/编辑表单 */
.phrase-add {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed #e8edf3;
}

.phrase-add-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--mint-dark);
    margin-bottom: 12px;
}

.phrase-add input,
.phrase-add select {
    width: 100%;
    border: 2px solid #e3e9f0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s;
}

.phrase-add input:focus,
.phrase-add select:focus { border-color: var(--mint); }

/* ===== 收藏弹窗 ===== */
.save-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.save-modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 30, .5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.save-modal-box {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: auto;
    background: #fff;
    border-radius: 28px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    animation: modalIn .35s cubic-bezier(.22, 1, .36, 1);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

@keyframes modalIn {
    from { transform: scale(.9) translateY(16px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.save-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-modal-title svg {
    width: 20px;
    height: 20px;
    color: var(--mint-dark);
}

.save-modal-preview {
    margin: 16px 24px;
    background: linear-gradient(135deg, #e6fcf5 0%, #e8f1ff 100%);
    border-radius: 16px;
    padding: 14px 16px;
}

.save-modal-preview .preview-en {
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.4;
}

.save-modal-preview .preview-zh {
    color: #8a93a6;
    font-size: 14px;
    line-height: 1.4;
}

.save-modal-label {
    font-size: 13px;
    color: #8a93a6;
    margin: 0 24px 8px;
    font-weight: 600;
}

.save-modal-box input[type="text"] {
    width: calc(100% - 48px);
    margin: 0 24px 14px;
    border: 2px solid #e3e9f0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s;
}

.save-modal-box input[type="text"]:focus { border-color: var(--mint); }

.save-modal-actions {
    display: flex;
    gap: 10px;
    padding: 0 24px 24px;
}

.save-modal-actions .action-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform .15s;
}

.save-modal-actions .action-btn.primary {
    background: linear-gradient(135deg, #3fe8b8, #12b5c9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(18, 181, 201, .35);
}

.save-modal-actions .action-btn:active { transform: scale(.95); }

.save-modal-actions .action-btn:not(.primary) {
    background: #f2f4f8;
    color: #5b6472;
    box-shadow: none;
}

/* 通用输入弹窗 */
.prompt-input {
    width: calc(100% - 48px);
    margin: 0 24px 22px;
    border: 2px solid #e3e9f0;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
    background: #fff;
    box-sizing: border-box;
}

.prompt-input:focus { border-color: var(--mint); }

/* ===== 自定义下拉框 ===== */
.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.save-modal .custom-select {
    margin: 0 24px 22px;
    width: calc(100% - 48px);
}

.cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #e3e9f0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s;
    user-select: none;
}

.cs-trigger:hover { border-color: #b9c2d0; }
.custom-select.open .cs-trigger { border-color: var(--mint); }

.cs-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}

.cs-arrow {
    width: 16px;
    height: 16px;
    color: #9aa3b2;
    flex-shrink: 0;
    transition: transform .2s;
}

.custom-select.open .cs-arrow { transform: rotate(180deg); }

.cs-menu {
    display: none;
    margin-top: 6px;
    background: #fff;
    border: 2px solid #eef1f6;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(30, 60, 90, .14);
    max-height: 216px;
    overflow-y: auto;
    padding: 6px;
}

.cs-menu::-webkit-scrollbar { width: 5px; }
.cs-menu::-webkit-scrollbar-thumb { background: #d4dbe4; border-radius: 4px; }
.cs-menu::-webkit-scrollbar-track { background: transparent; }

.custom-select.open .cs-menu { display: block; }

.cs-option {
    padding: 11px 12px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    color: #374151;
    transition: background .12s;
    user-select: none;
}

.cs-option:hover { background: #f4f7fb; }
.cs-option.active { background: linear-gradient(135deg, #34e0b4, #12b5c9); color: #fff; }

.cs-option.cs-new {
    color: var(--mint-dark);
    font-weight: 600;
    border-top: 1px solid #f0f2f6;
    margin-top: 4px;
    padding-top: 13px;
}

.cs-option.cs-new:hover { background: var(--mint-light); }

/* ===== 页脚 ===== */
.footer {
    margin-top: 34px;
    text-align: center;
    font-size: 12px;
    color: #b3bac6;
    letter-spacing: 1px;
}

/* ===== 提示条 ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%) translateY(16px) scale(.92);
    background: rgba(20, 22, 28, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: .5px;
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.2, .9, .3, 1.15);
    z-index: 99;
    white-space: nowrap;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .3);
    display: flex;
    align-items: center;
    gap: 7px;
}

.toast::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* 跟随按钮定位的提示（复制/收藏） */
.toast.toast-anchored {
    bottom: auto;
    transform: translateX(-50%) translateY(-100%) scale(.92);
}
.toast.toast-anchored.show {
    transform: translateX(-50%) translateY(-100%) scale(1);
}
.toast.toast-anchored.below {
    transform: translateX(-50%) translateY(16px) scale(.92);
}
.toast.toast-anchored.below.show {
    transform: translateX(-50%) translateY(0) scale(1);
}

/* ===== 桌面端适配 ===== */
@media (min-width: 768px) {
    .page { padding-top: 40px; }
    .title { font-size: 46px; }
}

/* ===== 小屏手机适配（≤375px） ===== */
@media (max-width: 480px) {
    .main-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 14px 6px;
    }
    .main-card-info { display: flex; flex-direction: column; align-items: center; }
    .main-card-title { font-size: 13px; }
    .main-card-desc { display: none; }
    .main-card-icon { width: 42px; height: 42px; }
}

@media (max-width: 375px) {
    .title { font-size: 32px; }
    .hero { padding: 24px 18px 22px; }
    .hero-tag { font-size: 11px; padding: 5px 10px; }
    .main-card { padding: 12px 4px; gap: 6px; }
    .main-card-icon { width: 38px; height: 38px; border-radius: 11px; }
    .main-card-title { font-size: 13px; }
    .tool-btn {
        padding: 8px 12px;
        font-size: 13px;
        gap: 4px;
    }
    .tool-btn .btn-text { font-size: 13px; }
    .tool-btn .icon { width: 16px; height: 16px; }
    .save-modal-box { max-width: 100%; border-radius: 20px; }
    .save-modal { padding: 16px; }
    .save-modal-preview { padding: 12px; margin: 12px 18px; }
    .save-modal-title { padding: 18px 18px 0; font-size: 15px; }
    .save-modal-label { margin: 0 18px 8px; }
    .save-modal select { width: calc(100% - 36px); margin: 0 18px 16px; }
    .save-modal-box input[type="text"] { width: calc(100% - 36px); margin: 0 18px 14px; }
    .save-modal-actions { padding: 0 18px 18px; }
}

/* ===== 超小屏（≤320px 如 iPhone 5/SE） ===== */
@media (max-width: 320px) {
    .title { font-size: 28px; }
    .tool-btn { padding: 7px 10px; font-size: 12px; gap: 3px; }
    .tool-btn .btn-text { font-size: 12px; }
    .tool-btn .icon { width: 14px; height: 14px; }
    .phrase-actions .tool-btn { padding: 7px 9px; font-size: 12px; }
}
