/* ========= 基础布局 & 背景 ========= */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top, #ffeef7 0, #fff9fd 40%, #fdf2f8 100%);
    color: #311627;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* ========= 顶部 Hero + 品牌 ========= */

.hero {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 20%, #fff7fc 0, #f9a8d4 45%, #f472b6 100%);
    box-shadow:
        0 10px 24px rgba(248, 113, 166, 0.22),
        0 0 0 1px rgba(252, 231, 243, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff5fa;
    font-weight: 700;
    font-size: 18px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #be185d;
}

.brand-tagline {
    font-size: 11px;
    color: #db2777;
}

.hero-left h1 {
    margin: 4px 0 8px;
    font-size: 28px;
    letter-spacing: 0.02em;
}

.hero-left p {
    margin: 0;
    color: #9d174d;
    font-size: 14px;
    opacity: 0.9;
}

/* ========= 卡片 ========= */

.card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 22px 22px 20px;
    margin-bottom: 20px;
    box-shadow:
        0 16px 38px rgba(244, 114, 182, 0.08),
        0 0 0 1px rgba(252, 231, 243, 0.9);
}

.card-main {
    margin-top: 4px;
}

.card h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.card-subtitle {
    margin: 0 0 16px;
    font-size: 13px;
    color: #be185d;
    opacity: 0.88;
}

/* ========= 上传表单 ========= */

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 260px;
    flex: 1;
}

.field label {
    font-size: 12px;
    color: #9d174d;
    margin-bottom: 4px;
}

/* 文件输入 */

.file-input {
    position: relative;
    border-radius: 999px;
    border: 1px solid #fbcfe8;
    background: #fffafc;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.file-input:hover {
    border-color: #f9a8d4;
    box-shadow: 0 0 0 1px rgba(249, 168, 212, 0.18);
}

.file-input input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-name {
    font-size: 13px;
    color: #d946ef;
}

.file-name-set {
    color: #4c0519;
}

/* 城市输入 */

.field input[type="text"] {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #fbcfe8;
    font-size: 13px;
    outline: none;
    background: #fffafc;
    color: #4c0519;
}

.field input[type="text"]::placeholder {
    color: #f472b6;
}

.field input[type="text"]:focus {
    border-color: #f9a8d4;
    box-shadow: 0 0 0 1px rgba(249, 168, 212, 0.3);
    background: #ffffff;
}

/* ========= 按钮 & 提示 ========= */

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

button,
.btn {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #fee2e2, #fbcfe8);
    color: #9d174d;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 24px rgba(248, 113, 166, 0.18);
}

button:hover,
.btn:hover {
    background: linear-gradient(135deg, #fecaca, #f9a8d4);
}

button:disabled {
    opacity: 0.7;
    cursor: default;
    box-shadow: none;
}

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

.hint {
    font-size: 12px;
    color: #9f1239;
    opacity: 0.8;
}

/* ========= 进度条 ========= */

.hidden {
    display: none;
}

.progress-block {
    margin-top: 16px;
    padding: 12px 14px 10px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff1f2;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #9f1239;
}

.progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #ffe4e6;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fecaca, #f9a8d4);
    transition: width 0.25s ease-out;
}

.progress-footer {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.progress-text {
    margin: 0;
    font-size: 11px;
    color: #9f1239;
    opacity: 0.9;
}

.progress-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vis-image-block {
    margin-top: 16px;
    margin-bottom: 16px;
    text-align: center;
}
.vis-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 取消生成按钮 */

.btn.btn-progress-cancel {
    padding: 4px 10px;
    font-size: 11px;
    box-shadow: none;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn.btn-progress-cancel:hover {
    background: #fee2e2;
}

/* ========= 结果区域 ========= */

.card-results {
    margin-top: 6px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.panel h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 15px;
}

.panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 13px;
}

.panel li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

.panel a {
    color: #db2777;
    text-decoration: none;
}

.panel a:hover {
    text-decoration: underline;
}

.file-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fce7f3;
    color: #be185d;
}

.empty {
    font-size: 13px;
    color: #f9a8d4;
}

/* 清空当前结果按钮 */

.btn.clear {
    background: #ffffff;
    color: #9d174d;
    box-shadow: 0 0 0 1px rgba(248, 113, 166, 0.25);
}

.btn.clear:hover {
    background: #fff7fb;
}

/* ========= 报告区域 ========= */

.card-report {
    margin-top: 6px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
/* 外层白色卡片：只改可视化这张 */
.card-visual {
  width: 100%;          /* 占满容器宽度 */
  max-width: 100%;
  min-height: 950px;    /* 卡片本身至少这么高 */
}

/* 卡片内部内容区域：跟着卡片拉长，不裁剪 */
.card-visual .report-content {
  min-height: 900px;
  height: auto;
  overflow: visible;
}

/* iframe 外面那层粉色小板板容器 */
.card-visual .vis-image-block {
  width: 100%;
  min-height: 900px;
}

/* iframe 自己：填满这块区域 */
.card-visual .vis-image-block iframe {
  display: block;
  width: 100%;
  height: 900px;   /* 真正画布高度 */
}

.report-content {
    border-radius: 12px;
    border: 1px solid #f9a8d4;
    padding: 12px 14px;
    max-height: 460px;
    overflow: auto;
    background: #fff7fb;
    font-size: 14px;
}

/* Markdown 内容 */

.report-content h1,
.report-content h2,
.report-content h3 {
    margin-top: 12px;
    margin-bottom: 6px;
}

.report-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
    font-size: 13px;
}

.report-content th,
.report-content td {
    border: 1px solid #f9a8d4;
    padding: 4px 6px;
    text-align: left;
}

.report-content th {
    background: #fce7f3;
}

/* ========= 响应式 ========= */

@media (max-width: 720px) {
    .hero {
        flex-direction: column;
    }
    .results-header,
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
