/* ============================================
   桃花源订阅转换 · 主样式
   ============================================ */

:root {
    --rose: #f43f8e;
    --rose-deep: #e11d6d;
    --rose-light: #ff7eb3;
    --fuchsia: #a21caf;
    --ink: #3b2f40;
    --ink-2: #8a7688;
    --line: #f0e3ee;
    --card-bg: rgba(255, 255, 255, 0.92);
    --radius: 18px;
    --shadow: 0 24px 64px rgba(180, 60, 130, 0.14);
    --gradient: linear-gradient(135deg, #ff6b9d 0%, #f43f8e 55%, #d946ef 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 560px at 8% -8%, rgba(255, 126, 179, 0.30), transparent 62%),
        radial-gradient(1000px 620px at 108% 6%, rgba(217, 70, 239, 0.18), transparent 60%),
        radial-gradient(900px 680px at 50% 122%, rgba(129, 140, 248, 0.18), transparent 62%),
        linear-gradient(160deg, #fdf3f8 0%, #faf5ff 55%, #f3f1ff 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

/* ---------- 布局 ---------- */

.shell {
    width: 100%;
    max-width: 560px;
}

.hero {
    text-align: center;
    margin-bottom: 24px;
}

.nav-switch-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.nav-switch-item {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.nav-switch-item.active {
    background: var(--gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(244, 63, 142, 0.28);
}
.nav-switch-item:not(.active) {
    color: var(--ink-2);
}
.nav-switch-item:not(.active):hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
}

.hero .logo {
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff1f6, #fbe8ff);
    border: 1px solid rgba(244, 63, 142, 0.18);
    box-shadow: 0 14px 34px rgba(244, 63, 142, 0.20);
}

.hero h1 {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(120deg, #e11d6d 0%, #a21caf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-2);
    letter-spacing: 0.4px;
}

/* ---------- 卡片 ---------- */

.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 32px 28px 28px;
    animation: fadeUp 0.6s 0.08s ease both;
}

/* ---------- 表单 ---------- */

.field {
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    stroke: #c3a8c0;
    pointer-events: none;
    transition: stroke 0.25s ease;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input-wrap input::placeholder {
    color: #c9b6c6;
}

.input-wrap input:hover {
    border-color: #e8cfe4;
}

.input-wrap input:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(244, 63, 142, 0.12);
}

.input-wrap:focus-within svg {
    stroke: var(--rose);
}

.hint {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.6;
}

/* ---------- 按钮 ---------- */

.actions {
    display: flex;
    gap: 12px;
    margin: 30px 0 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 26px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    flex: 1;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 10px 26px rgba(244, 63, 142, 0.32);
}

.btn-primary:hover {
    box-shadow: 0 14px 32px rgba(244, 63, 142, 0.42);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--ink-2);
    background: #faf4fa;
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    background: #f5ecf5;
    color: var(--ink);
}

/* ---------- 结果区 ---------- */

.result label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.result + .result {
    margin-top: 20px;
}

.result-box {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.result-box textarea {
    flex: 1;
    min-height: 62px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
    background: #fdf8fc;
    border: 1.5px dashed #e8cfe4;
    border-radius: 12px;
    outline: none;
    resize: none;
    overflow: auto;
    word-break: break-all;
    white-space: pre-wrap;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.result-box textarea:focus {
    border-color: var(--rose);
    background: #fff;
}

.result-box textarea.has-value {
    border-style: solid;
    border-color: #f3c6de;
}

.btn-copy {
    min-width: 108px;
    color: var(--rose-deep);
    background: #fff0f6;
    border: 1px solid #f8d5e8;
}

.btn-copy:hover {
    background: #ffe4f0;
}

/* ---------- 页脚 ---------- */

.footer {
    margin-top: 26px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-2);
    animation: fadeUp 0.6s 0.16s ease both;
}

.footer a {
    color: var(--rose);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.footer a:hover {
    opacity: 0.75;
}

.footer .dot {
    margin: 0 10px;
    color: #d8c2d4;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 42px;
    transform: translate(-50%, 16px);
    padding: 11px 22px;
    font-size: 14px;
    color: #fff;
    background: rgba(59, 30, 50, 0.92);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(59, 30, 50, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    z-index: 99;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- 动画 ---------- */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 移动端适配 ---------- */

@media (max-width: 480px) {
    body {
        padding: 20px 12px;
    }

    .hero h1 {
        font-size: 23px;
    }

    .card {
        padding: 26px 18px 22px;
    }

    .result-box {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }
}
