/* ============================================================
   prompt-generator.html — 暗黑霓虹主题 (Dark Neon)
   仅作用于本页；不改动公共 css/site-header.css
   调色集中在 :root 令牌，与 css/batch-generate.css 保持一致
   ============================================================ */
:root {
    /* 底色层次 */
    --bg-page: #05060d;
    --bg-panel: #0b0f1c;
    --bg-card: #0d1222;
    --bg-input: #070a13;
    --bg-elev: #121a2e;

    /* 描边 */
    --line: #1b2743;
    --line-soft: rgba(46, 224, 255, 0.16);
    --line-hi: rgba(46, 224, 255, 0.45);

    /* 霓虹主色 */
    --cyan: #2ee0ff;
    --cyan-2: #10b6f0;
    --cyan-deep: #0a7fb8;
    --pink: #ff2d8e;
    --pink-2: #d81b74;
    --purple: #8b5cf6;
    --blue: #3b82f6;

    /* 文字 */
    --txt-1: #e7ecf9;
    --txt-2: #9aa6c2;
    --txt-3: #6b7695;

    /* 语义色 */
    --green: #2ee6a8;
    --amber: #ffc44d;
    --red: #ff5c78;

    /* 光晕 */
    --glow-cyan: 0 0 18px rgba(46, 224, 255, 0.35);
    --glow-cyan-strong: 0 0 28px rgba(46, 224, 255, 0.55);
    --glow-pink: 0 0 18px rgba(255, 45, 142, 0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-page);
    background-image:
        radial-gradient(58% 46% at 10% 4%, rgba(124, 58, 237, 0.26), transparent 62%),
        radial-gradient(48% 40% at 92% 8%, rgba(139, 92, 246, 0.18), transparent 60%),
        radial-gradient(70% 55% at 50% 112%, rgba(56, 130, 255, 0.18), transparent 66%);
    background-attachment: fixed;
    color: var(--txt-2);
    min-height: 100vh;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ---------- 头部（独立页模式；嵌入模式会隐藏） ---------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 14px 20px;
    flex-wrap: wrap;
}

.header h1 {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 22px;
    font-weight: 700;
    color: #8df2ff;
    letter-spacing: 0.4px;
    text-shadow: 0 0 16px rgba(46, 224, 255, 0.55), 0 0 40px rgba(46, 224, 255, 0.22);
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.link-btn {
    color: #9fe9f8;
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.link-btn:hover {
    color: var(--cyan);
    border-color: var(--line-hi);
    background: rgba(46, 224, 255, 0.08);
    box-shadow: 0 0 16px rgba(46, 224, 255, 0.2);
    text-decoration: none;
}

.user-bar .user-name {
    color: #bdf3ff;
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid var(--line-hi);
    border-radius: 20px;
    background: rgba(46, 224, 255, 0.06);
    box-shadow: 0 0 14px rgba(46, 224, 255, 0.14);
}

.user-bar .user-points {
    color: #a6f3ff;
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid rgba(46, 224, 255, 0.45);
    border-radius: 20px;
    background: rgba(46, 224, 255, 0.12);
    box-shadow: 0 0 14px rgba(46, 224, 255, 0.18);
}

/* 语言切换器 */
.lang-switch {
    color: #bcaeff;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.lang-switch:hover {
    background: rgba(139, 92, 246, 0.22);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

.lang-switch option {
    color: var(--txt-1);
    background: #0d1120;
}

/* ---------- 卡片 ---------- */
.card {
    background: linear-gradient(180deg, #0e1322 0%, #0a0e1a 100%);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 26px rgba(0, 0, 0, 0.45);
}

.card h2 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #cfe9ff;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.card .desc {
    font-size: 13px;
    color: var(--txt-3);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ---------- 录入文本域 ---------- */
textarea#content {
    width: 100%;
    min-height: 140px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--txt-1);
    transition: all 0.25s ease;
}

textarea#content::placeholder {
    color: #556080;
}

textarea#content:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(46, 224, 255, 0.10), 0 0 20px rgba(46, 224, 255, 0.18);
}

/* ---------- 条数滑块 ---------- */
.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 18px 0 8px;
}

.slider-row label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--txt-1);
}

.slider-row input[type=range] {
    flex: 1 1 auto;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(90deg, rgba(46, 224, 255, 0.55), rgba(59, 130, 246, 0.25));
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.slider-row input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--cyan) 45%, var(--blue) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #eafcff;
    box-shadow: 0 0 14px rgba(46, 224, 255, 0.85), 0 0 30px rgba(46, 224, 255, 0.45);
    transition: transform 0.2s ease;
}

.slider-row input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-row input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--cyan) 45%, var(--blue) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #eafcff;
    box-shadow: 0 0 14px rgba(46, 224, 255, 0.85), 0 0 30px rgba(46, 224, 255, 0.45);
}

.count-badge {
    min-width: 64px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(46, 224, 255, 0.10);
    border: 1px solid rgba(46, 224, 255, 0.32);
    border-radius: 8px;
    padding: 6px 10px;
    text-shadow: 0 0 12px rgba(46, 224, 255, 0.5);
    box-shadow: 0 0 12px rgba(46, 224, 255, 0.12);
}

/* ---------- 操作区 ---------- */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.gen-cost-hint {
    font-size: 13px;
    color: var(--amber);
    font-weight: 600;
    text-shadow: 0 0 14px rgba(255, 196, 77, 0.4);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
    color: #041620;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(46, 224, 255, 0.35);
    transition: filter 0.15s, box-shadow 0.2s, transform 0.05s;
}

.btn:hover:not(:disabled) {
    filter: brightness(1.12);
    box-shadow: 0 0 28px rgba(46, 224, 255, 0.55);
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--txt-2);
    border: 1px solid var(--line);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--line-hi);
    color: var(--cyan);
    background: rgba(46, 224, 255, 0.08);
    box-shadow: 0 0 16px rgba(46, 224, 255, 0.18);
}

.btn-orange {
    background: linear-gradient(135deg, #ff5aa8 0%, var(--pink) 55%, var(--purple) 100%);
    color: #21040f;
    box-shadow: 0 0 20px rgba(255, 45, 142, 0.42);
}

.btn-orange:hover:not(:disabled) {
    filter: brightness(1.12);
    box-shadow: 0 0 30px rgba(255, 45, 142, 0.65);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
}

/* ---------- 结果区 ---------- */
.result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-head h2 {
    font-size: 16px;
}

.points-info {
    font-size: 13px;
    color: var(--amber);
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 0 14px rgba(255, 196, 77, 0.4);
}

.prompt-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    margin-bottom: 10px;
    background: #0a0e1a;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.prompt-item.checked {
    border-color: var(--cyan);
    background: rgba(46, 224, 255, 0.07);
    box-shadow: 0 0 16px rgba(46, 224, 255, 0.15);
}

.prompt-item input[type=checkbox] {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--cyan);
    cursor: pointer;
}

.prompt-body {
    flex: 1;
    min-width: 0;
}

.prompt-style {
    font-size: 14px;
    font-weight: 700;
    color: #cfe9ff;
    margin-bottom: 4px;
}

.prompt-text {
    font-size: 13.5px;
    color: var(--txt-1);
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

.raw-box {
    background: #0a0e1a;
    color: #d4d4d4;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--line-soft);
    font-family: 'Consolas', 'Monaco', 'SFMono-Regular', monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 360px;
    overflow: auto;
    line-height: 1.55;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 17, 32, 0.92);
    color: #e7ecf9;
    padding: 10px 20px;
    border-radius: 8px;
    display: none;
    z-index: 100;
    font-size: 14px;
    border: 1px solid var(--line-hi);
    box-shadow: 0 0 24px rgba(46, 224, 255, 0.3);
    backdrop-filter: blur(4px);
}

.toast.show {
    display: block;
}

.err {
    color: var(--red);
    font-size: 13px;
    margin-top: 10px;
    white-space: pre-wrap;
    text-shadow: 0 0 12px rgba(255, 92, 120, 0.4);
}

.hidden {
    display: none;
}

/* ---------- 嵌入模式（作为「一键写词」弹窗的批量写词页 iframe）：隐藏独立页头，适配暗色弹窗 ---------- */
body.embed {
    background: transparent;
}

body.embed .container {
    max-width: 100%;
    padding: 0;
}

body.embed .header {
    display: none;
}

body.embed .card {
    box-shadow: none;
    border: 1px solid var(--line-soft);
    margin-bottom: 12px;
    padding: 16px;
}

/* ---------- 滚动条（暗色适配） ---------- */
.container::-webkit-scrollbar,
.raw-box::-webkit-scrollbar {
    width: 10px;
}

.container::-webkit-scrollbar-track,
.raw-box::-webkit-scrollbar-track {
    background: #070a13;
    border-radius: 6px;
}

.container::-webkit-scrollbar-thumb,
.raw-box::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(46, 224, 255, 0.5), rgba(59, 130, 246, 0.5));
    border-radius: 6px;
    border: 2px solid #070a13;
}

@media (max-width: 600px) {
    .container {
        padding: 16px 14px;
    }

    .header {
        padding: 0;
    }

    .header h1 {
        font-size: 19px;
    }

    .actions .btn {
        flex: 1 1 auto;
    }
}

/* ---------- 主题切换器（霓虹） ---------- */
.user-bar .theme-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(10, 14, 26, 0.55);
    box-shadow: 0 0 14px rgba(46, 224, 255, 0.10);
}

.user-bar .theme-opt {
    border: none;
    background: transparent;
    color: var(--txt-3);
    font-size: 12px;
    padding: 4px 11px;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.user-bar .theme-opt:hover {
    color: var(--cyan);
}

.user-bar .theme-opt.active {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
    color: #041620;
    font-weight: 700;
}
