/* title.css - 视频爆款标题生成器样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(145deg, #f9f5ff 0%, #eef2ff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    padding: 16px;
}

.app-card {
    max-width: 1100px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 36px;
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.2), 0 4px 18px rgba(99, 102, 241, 0.1);
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0c0a2a;
}

.subhead {
    color: #4b5563;
    margin-bottom: 24px;
    font-size: 1rem;
    border-bottom: 1px dashed #c7d2fe;
    padding-bottom: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
    margin-bottom: 28px;
}

.full-width {
    grid-column: span 2;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-hint {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.75rem;
    margin-left: 4px;
}

input,
select {
    padding: 14px 18px;
    border: 2px solid #e0e7ff;
    border-radius: 22px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
    /* 强制下拉箭头向下 */
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="%236b7280" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 40px;
}

input:focus,
select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.generate-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 12px 20px -8px #4f46e5;
    width: 100%;
    transition: 0.15s;
}

.generate-btn:hover {
    background: #4338ca;
    transform: scale(1.01);
}

.generate-btn:disabled {
    opacity: 0.6;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.results-section {
    margin-top: 28px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.result-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.title-badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
}

.title-list {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.title-item {
    background: white;
    border-radius: 28px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d9d9ff;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.title-text {
    font-size: 1rem;
    font-weight: 500;
    color: #1e1b4b;
    word-break: break-word;
    line-height: 1.4;
}

.title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.feedback-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
}

.feedback-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.feedback-btn.liked {
    background: #dcfce7;
    border-color: #10b981;
    color: #10b981;
}

.feedback-btn.disliked {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

.copy-btn {
    background: #f3f4f6;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 10px 18px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #4f46e5;
    color: white;
}

.empty-state {
    background: #f1f5f9;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    color: #64748b;
}

.error-message {
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 30px;
    padding: 12px 22px;
    margin-top: 16px;
}

/* 语言切换按钮样式 */
.lang-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.lang-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}
.lang-btn:hover { background: #eef2ff; }
.lang-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* 炫酷展示区（网格布局，无滚动） */
.showcase-wall {
    margin-top: 30px;
    background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 50%, #4c1d95 100%);
    border-radius: 24px;
    padding: 20px 16px 16px;
    border: 1px solid #a78bfa;
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.5);
    position: relative;
    overflow: hidden;
}

.showcase-wall::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.wall-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 0 4px;
    position: relative;
    z-index: 1;
}

.wall-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 2px 6px rgba(251, 191, 36, 0.4);
}

.wall-badge {
    background: #ef4444;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.7rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    position: relative;
    z-index: 1;
}

.case-item {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 14px 16px;
    border-left: 3px solid #fbbf24;
}

.case-category {
    display: inline-block;
    background: #7e22ce;
    color: #fef9c3;
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.case-compare {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.case-normal {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.case-boom {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #f0e9ff;
    font-size: 0.95rem;
    font-weight: 600;
}

.badge-normal {
    background: #475569;
    padding: 2px 6px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #cbd5e1;
}

.badge-boom {
    background: #ef4444;
    padding: 2px 6px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    animation: glow 2s infinite;
    white-space: nowrap;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px #ef4444;
    }
    50% {
        box-shadow: 0 0 10px #ef4444;
    }
}

.case-why {
    color: #fbbf24;
    font-size: 0.8rem;
    margin: 8px 0 6px;
    padding-left: 6px;
    border-left: 2px solid #fbbf24;
}

.case-data {
    color: #10b981;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 10px;
    border-radius: 12px;
    display: inline-block;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin: 20px 0 10px;
    padding: 14px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fbbf24;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.art-quote {
    margin-top: 20px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    background: linear-gradient(120deg, #fde68a, #fbbf24, #fcd34d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    padding: 8px 0;
    position: relative;
    z-index: 1;
}

.footer-note {
    margin-top: 32px;
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
}

.footer-note a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted #818cf8;
}

/* Toast 轻提示 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.toast-message.show {
    opacity: 1;
}

/* 移动端适配 */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }
    .app-card {
        padding: 20px 16px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .full-width {
        grid-column: span 1;
    }
    h1 {
        text-align: center;
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        word-break: break-word;
    }
    .subhead {
        font-size: 0.9rem;
    }
    input,
    select {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    .generate-btn {
        padding: 16px 24px;
        font-size: 1.2rem;
    }

    /* === 结果头部：第一行居左，第二行居右 === */
    .result-header {
        flex-direction: column;
        align-items: stretch;          /* 让子元素可以独立对齐 */
        gap: 8px;
    }
    .result-header h2 {
        font-size: 1.4rem;
        white-space: nowrap;
        text-align: left;             /* 居左 */
    }
    .title-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
        align-self: flex-end;         /* 居右 */
    }

    /* === 标题卡片垂直布局 === */
    .title-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }
    .title-left {
        margin-bottom: 12px;
    }
    .title-actions {
        margin-left: 0;
        justify-content: flex-end;
    }
    .title-text {
        font-size: 0.95rem;
    }

    .feedback-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .copy-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    .wall-header h2 {
        font-size: 1.3rem;
    }
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .case-item {
        padding: 12px 14px;
    }
    .case-boom {
        font-size: 0.9rem;
    }
    .stat-num {
        font-size: 1.3rem;
    }
    .art-quote {
        font-size: 1.3rem;
    }
    
    .toast-message {
        padding: 10px 16px;
        font-size: 0.9rem;
        max-width: 90%;
        bottom: 20px;
    }
}

[v-cloak] {
    display: none !important;
}

/* 温度控件容器 */
.temperature-wrapper-compact {
    display: flex; align-items: center; height: 52px; padding: 0 16px;
    background: #f8fafc; border: 2px solid #e0e7ff; border-radius: 22px;
}
.temperature-wrapper-compact input[type=range] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
    background: linear-gradient(to right, #10b981, #fbbf24, #ef4444);
    border-radius: 4px; outline: none; margin: 0; padding: 0; border: none;
}
.temperature-wrapper-compact input[type=range]:focus { outline: none; }
.temperature-wrapper-compact input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 28px; height: 16px;
    background: #4f46e5; border-radius: 30px; border: none; cursor: pointer;
    outline: none; box-shadow: none;
}
.temperature-wrapper-compact input[type=range]::-moz-range-thumb {
    width: 28px; height: 16px; background: #4f46e5; border-radius: 30px;
    border: none; cursor: pointer; outline: none;
}
.temperature-wrapper-compact input[type=range]::-moz-range-track {
    height: 4px; background: linear-gradient(to right, #10b981, #fbbf24, #ef4444);
    border-radius: 4px;
}
.temperature-wrapper-compact input[type=range]::-moz-focus-outer { border: 0; }

/* 分析按钮 */
.analyze-btn {
    background: #f3f4f6; border: 1px solid #e2e8f0; border-radius: 40px;
    padding: 10px 14px; font-weight: 600; color: #374151; cursor: pointer;
    white-space: nowrap; margin-left: 4px;
}
.analyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.analyze-btn.loading { background: #e0e7ff; }

/* 模态框 */
body.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; padding: 16px;
}
.modal-card {
    max-width: 700px; width: 100%; max-height: 85vh; background: white;
    border-radius: 32px; box-shadow: 0 30px 50px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
}
.modal-header {
    flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;
    padding: 24px 22px 12px; border-bottom: 1px solid #e2e8f0;
}
.modal-header h3 { font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.modal-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #64748b; }
.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 24px 22px;   /* 右侧留出空间给滚动条 */
    scrollbar-gutter: stable;       /* 预留滚动条位置，防止内容抖动 */
}
.modal-content::-webkit-scrollbar {
    width: 5px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent;        /* 轨道透明，不抢视觉 */
    margin-block: 12px;             /* 上下留白，不顶到圆角边缘 */
}
.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.analysis-section { margin-bottom: 24px; }
.analysis-section h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: #1e1b4b; display: flex; align-items: center; gap: 8px; }
.score-row { display: flex; gap: 16px; flex-wrap: wrap; }
.score-item { background: #f1f5f9; border-radius: 24px; padding: 10px 18px; }
.similar-case { background: #fef9c3; border-radius: 20px; padding: 14px 18px; border-left: 4px solid #fbbf24; }
.comment-item { background: #f8fafc; border-radius: 16px; padding: 10px 16px; margin-bottom: 8px; border: 1px solid #e2e8f0; }
.risk-badge { display: inline-block; padding: 4px 14px; border-radius: 30px; font-weight: 700; font-size: 0.9rem; }
.risk-high { background: #fee2e2; color: #b91c1c; }
.risk-low { background: #dcfce7; color: #166534; }
.script-item { background: #f1f5f9; border-radius: 16px; padding: 12px 16px; margin-bottom: 8px; }
.btn-apply { background: #4f46e5; color: white; border: none; padding: 12px 24px; border-radius: 40px; font-weight: 600; margin-top: 12px; width: 100%; cursor: pointer; }


.settings-row { display: flex; gap: 10px; flex-wrap: wrap; }
.setting-badge { background: #e0e7ff; color: #3730a3; padding: 8px 16px; border-radius: 40px; font-weight: 600; font-size: 0.9rem; }
.risk-reward-card { background: #f8fafc; border-radius: 20px; padding: 16px; }
.suggestion-list { list-style: disc; padding-left: 20px; }
.suggestion-list li { margin-bottom: 8px; color: #1e1b4b; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-badge { background: #f1f5f9; display: inline-block; padding: 8px 20px; border-radius: 40px; font-weight: 600; }
.line-item { background: #fef9c3; border-radius: 20px; padding: 12px 18px; margin-bottom: 10px; border-left: 4px solid #fbbf24; }

.analysis-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    margin-bottom: 16px;
}

/* 底部斜切行动条 */
.action-bar {
    max-width: 1000px;
    width: 100%;
    margin: 24px auto 0;
    display: flex;
    border-radius: 70px;
    overflow: hidden;
    box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255,215,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}
.action-bar:hover {
    transform: scale(1.01);
    box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255,215,0,0.5);
}

.action-left {
    flex: 1;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 100%);
    padding: 22px 20px 22px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    clip-path: polygon(0 0, 100% 0, 94% 100%, 0% 100%);
    margin-right: -8px;
    border-right: 3px solid #fbbf24;
}
.action-right {
    flex: 1;
    background: linear-gradient(145deg, #b45309 0%, #d97706 100%);
    padding: 22px 28px 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    clip-path: polygon(6% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -8px;
    border-left: 3px solid #fbbf24;
}

.action-icon {
    font-size: 2.8rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    flex-shrink: 0;
}
.action-left .action-icon {
    color: #fbbf24;
}
.action-right .action-icon {
    color: #fef3c7;
}

.action-text {
    display: flex;
    flex-direction: column;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.4;
}
.line1 {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}
.line2 {
    font-size: 1.0rem;
    opacity: 0.95;
}
.action-left .line1 { color: #fbbf24; }
.action-right .line1 { color: #fef3c7; }

.analyze-btn {
    background: #f97316 !important;
    color: white !important;
    border-color: #f97316 !important;
    animation: pulse-glow 2s infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(249, 115, 22, 0);
    }
}

/* 移动端适配 */
@media (max-width: 640px) {
    .action-bar {
        flex-direction: column;
        border-radius: 50px;
        box-shadow: 0 20px 30px -8px rgba(0,0,0,0.2);
    }
    .action-left, .action-right {
        clip-path: none;
        margin: 0;
        padding: 18px 22px;
        border: none;
        justify-content: center;
    }
    .action-left {
        border-radius: 50px 50px 20px 20px;
        border-bottom: 3px solid #fbbf24;
    }
    .action-right {
        border-radius: 20px 20px 50px 50px;
        border-top: 3px solid #fbbf24;
    }
    .action-icon {
        font-size: 2.2rem;
    }
    .line1 {
        font-size: 1rem;
    }
    .line2 {
        font-size: 0.9rem;
    }
}