/* AiPy case detail standard, derived from case3/index.html. */
:root {
    --bg-cream: #FFF8F0;
    --bg-white: #FFFFFF;
    --bg-card: #F8F9FA;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --accent-orange: #E8784A;
    --accent-teal: #2A9D8F;
    --accent-blue: #4F6EF7;
    --accent-red: #E76F51;
    --accent-green: #2ECC71;
    --border-light: #E8E8E8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-display: 'Microsoft YaHei', '微软雅黑', sans-serif;
    --font-body: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    background: #FFFFFF;
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }

.top-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: 66px;
    padding: 14px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.top-bar .nav-title,
.nav-title {
    flex: 1;
    min-width: 0;
    color: #1A1A2E;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: center;
}

.top-bar .right-group,
.right-group {
    position: absolute;
    right: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-nav-btn,
.back-home-btn {
    min-height: 36px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 20px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.share-nav-btn {
    background: var(--accent-teal);
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.30);
}

.back-home-btn {
    background: var(--accent-blue);
    box-shadow: 0 2px 10px rgba(79, 110, 247, 0.30);
}

.share-nav-btn:hover,
.back-home-btn:hover {
    color: #FFFFFF;
    transform: translateY(-1px);
}

.share-nav-btn:hover { box-shadow: 0 4px 12px rgba(42, 157, 143, 0.40); }
.back-home-btn:hover { box-shadow: 0 4px 12px rgba(79, 110, 247, 0.40); }

.share-nav-btn:focus-visible,
.back-home-btn:focus-visible,
.preview-tab:focus-visible,
.copy-prompt-btn:focus-visible,
.copy-area-btn:focus-visible,
.share-modal-close:focus-visible {
    outline: 3px solid rgba(79, 110, 247, 0.28);
    outline-offset: 2px;
}

.main-layout {
    display: flex;
    gap: 0;
    min-height: 100vh;
    padding-top: 66px;
}

.preview-panel,
.preview-area {
    flex: 1 1 65%;
    min-width: 0;
    height: calc(100vh - 66px);
    padding: 32px 24px 32px 48px;
    position: sticky;
    top: 66px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-panel-inner,
.preview-area > .preview-frame {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.preview-tabs {
    flex-shrink: 0;
    min-height: 50px;
    padding: 0 20px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: #FAFAFA;
    border-bottom: 1px solid var(--border-light);
}

.preview-tab {
    min-height: 48px;
    padding: 12px 20px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.preview-tab:hover { color: var(--text-dark); }
.preview-tab.active { color: var(--accent-teal); border-bottom-color: var(--accent-teal); }

.preview-body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FAFBFC;
}

iframe.preview-frame,
.preview-frame iframe {
    width: 100%;
    flex: 1;
    min-height: 500px;
    display: block;
    border: none;
}

.preview-image-wrap,
.preview-image-view,
.preview-video-wrapper,
.preview-screenshots-grid {
    min-width: 0;
}

.preview-image-footer,
.preview-footer {
    flex-shrink: 0;
    min-height: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-filename,
.preview-footer .file-name {
    min-width: 0;
    overflow: hidden;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-panel {
    flex: 0 0 440px;
    width: 440px;
    max-height: calc(100vh - 66px);
    padding: 32px 48px 48px 24px;
    position: sticky;
    top: 66px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.info-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-title-block { margin: 0 0 4px; text-align: left; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 12px;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent-blue); text-decoration: none; font-weight: 600; }

.info-title-block .case-tag,
.case-tag {
    margin-bottom: 14px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(232, 120, 74, 0.08);
    border: 1px solid rgba(232, 120, 74, 0.18);
    border-radius: 20px;
    color: var(--accent-orange);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.case-tag-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--accent-orange); }

.info-title-block h1,
.info-title-block h2 {
    margin: 0 0 8px;
    color: var(--text-dark);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.info-title-block .subtitle,
.case-desc,
.user-identity {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.prompt-card,
.info-card {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.prompt-card { position: relative; overflow: hidden; }

.info-card {
    padding: 22px 24px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.info-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.prompt-card-header {
    min-height: 50px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #F8F9FA;
    border-bottom: 1px solid var(--border-light);
}

.prompt-card-header h3,
.info-card h3 {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
}

.prompt-card-header h3 { margin-bottom: 0; font-size: 14px; }

.icon-dot,
.prompt-card-header .icon-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    display: inline-block;
    border-radius: 50%;
    background: var(--accent-blue);
}

.icon-dot.orange { background: var(--accent-orange); }
.icon-dot.teal { background: var(--accent-teal); }
.icon-dot.blue { background: var(--accent-blue); }
.icon-dot.green { background: var(--accent-green); }
.icon-dot.purple { background: #9B59B6; }
.icon-dot.yellow { background: #F1C40F; }

.prompt-scroll-area,
.prompt-content {
    max-height: 220px;
    padding: 16px 18px;
    overflow-y: auto;
    background: #FAFBFC;
    color: #333333;
    font-family: 'Consolas', 'Courier New', 'Microsoft YaHei', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    scroll-behavior: smooth;
}

.prompt-content { margin: 0; }

.prompt-card-footer {
    padding: 12px 18px;
    background: #FFFFFF;
    border-top: 1px solid var(--border-light);
}

.copy-prompt-btn,
.copy-btn {
    width: 100%;
    min-height: 40px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: var(--accent-teal);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(42, 157, 143, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.copy-prompt-btn:hover,
.copy-btn:hover { background: #238B7E; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(42, 157, 143, 0.32); }

.pain-list,
.insight-list { margin: 0; padding: 0; list-style: none; }

.pain-list li,
.insight-list li {
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    color: var(--text-gray);
    font-size: 13px;
    line-height: 1.6;
}

.pain-list li { background: #FFF5F0; border-left: 3px solid var(--accent-orange); }
.insight-list li { background: #F0FFF5; border-left: 3px solid var(--accent-green); }
.pain-list li:last-child,
.insight-list li:last-child { margin-bottom: 0; }

.process-steps,
.process-list { display: flex; flex-direction: column; gap: 12px; }

.process-step,
.process-item {
    position: relative;
    min-width: 0;
    padding: 0 0 12px;
    display: flex;
    gap: 14px;
    border-bottom: 1px dashed var(--border-light);
}

.process-step:last-child,
.process-item:last-child { padding-bottom: 0; border-bottom: none; }

.step-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-teal);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
}

.step-content,
.process-item > div { min-width: 0; }
.step-content strong,
.step-title { color: var(--text-dark); font-size: 13px; font-weight: 700; }
.step-desc { margin-top: 3px; color: var(--text-gray); font-size: 12px; line-height: 1.55; }

.analysis-list { display: flex; flex-direction: column; gap: 10px; }
.analysis-item { display: flex; align-items: flex-start; gap: 10px; }
.analysis-tag { flex-shrink: 0; padding: 3px 9px; border-radius: 12px; background: var(--accent-blue); color: #FFFFFF; font-size: 11px; font-weight: 600; }
.analysis-text { color: var(--text-gray); font-size: 13px; line-height: 1.6; }

.efficiency-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eff-col,
.eff-before,
.eff-after { min-width: 0; padding: 14px 12px; border-radius: var(--radius-md); text-align: center; }
.eff-col.old,
.eff-before { background: rgba(231, 111, 81, 0.08); color: var(--accent-red); }
.eff-col.new,
.eff-after { background: rgba(46, 204, 113, 0.08); color: #27AE60; }
.eff-label { margin-bottom: 4px; font-size: 11px; font-weight: 700; }
.eff-time { font-size: 22px; font-weight: 800; }
.eff-detail { color: var(--text-gray); font-size: 11px; line-height: 1.5; }
.efficiency-boost,
.eff-multiplier { margin-top: 10px; color: var(--accent-teal); font-size: 22px; font-weight: 800; text-align: center; }

.conclusion-list { display: flex; flex-wrap: wrap; gap: 8px; }
.conclusion-tag { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.conclusion-tag.green { background: rgba(46, 204, 113, 0.10); color: #27AE60; }
.conclusion-tag.blue { background: rgba(79, 110, 247, 0.10); color: var(--accent-blue); }
.conclusion-tag.orange { background: rgba(232, 120, 74, 0.10); color: var(--accent-orange); }

.testimonial-card { border-radius: var(--radius-lg); }

.info-footer,
.panel-footer {
    margin-top: 8px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    font-size: 11px;
    text-align: center;
}

.info-footer a,
.panel-footer a { color: var(--accent-blue); text-decoration: none; font-weight: 600; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 9999;
    max-width: min(90vw, 680px);
    padding: 12px 22px;
    border-radius: 24px;
    background: #1A1A2E;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(100px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.image-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.90);
    cursor: zoom-out;
}

.image-overlay.show { display: flex; }
.image-overlay img { max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }

.share-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 3000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    background: rgba(0, 0, 0, 0.50) !important;
    backdrop-filter: blur(4px);
}

.share-modal.show { display: flex !important; }

.share-modal-content {
    width: min(92vw, 640px) !important;
    max-height: 90vh;
    padding: 28px !important;
    overflow-y: auto;
    background: #FFFFFF !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
}

.share-modal-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
}

.share-modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; }

.share-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #F5F5F5;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
}

.platform-tabs { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

.platform-tab {
    min-height: 36px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    background: #FFFFFF;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.platform-tab.active { border-color: var(--accent-teal); background: var(--accent-teal); color: #FFFFFF; }
.platform-icon-svg { width: 18px; height: 18px; flex-shrink: 0; }
.share-modal-section { margin-bottom: 18px; }
.share-modal-section:last-child { margin-bottom: 0; }
.share-modal-section h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; font-size: 14px; }

.share-modal-section textarea,
#shareTextArea {
    width: 100%;
    min-height: 220px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #FAFBFC;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
}

.copy-area-btn {
    min-height: 38px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: var(--accent-teal);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.copy-area-btn.secondary { border: 1px solid var(--accent-teal); background: #FFFFFF; color: var(--accent-teal); }

@media (max-width: 1024px) {
    .main-layout { flex-direction: column; }
    .preview-panel,
    .preview-area { position: static; flex: none; width: 100%; height: auto; min-height: 560px; padding: 24px; }
    .preview-panel-inner,
    .preview-area > .preview-frame { min-height: 520px; }
    .info-panel { position: static; flex: none; width: 100%; max-height: none; padding: 0 24px 40px; }
    .top-bar { padding: 12px 20px; }
    .top-bar .right-group,
    .right-group { right: 20px; }
}

@media (max-width: 640px) {
    .top-bar { height: 60px; padding: 10px 12px; justify-content: flex-start; }
    .top-bar .nav-title,
    .nav-title {
        padding-right: 174px;
        overflow: hidden;
        font-size: 15px;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .top-bar .right-group,
    .right-group { right: 12px; gap: 6px; }
    .share-nav-btn,
    .back-home-btn { min-height: 34px; padding: 6px 10px; font-size: 11px; }
    .main-layout { padding-top: 60px; }
    .preview-panel,
    .preview-area { min-height: 480px; padding: 12px; }
    .preview-panel-inner,
    .preview-area > .preview-frame { min-height: 456px; border-radius: var(--radius-md); }
    .preview-tabs { padding: 0 8px; }
    .preview-tab { padding: 10px 12px; font-size: 12px; }
    .info-panel { padding: 4px 12px 30px; }
    .info-panel-inner { gap: 16px; }
    .info-title-block h1,
    .info-title-block h2 { font-size: 22px; }
    .info-card { padding: 18px; }
    .efficiency-compare { grid-template-columns: 1fr; }
    .share-modal { padding: 12px; }
    .share-modal-content { width: 100% !important; max-height: 92vh; padding: 20px !important; border-radius: var(--radius-md) !important; }
    .platform-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .platform-tab { flex-shrink: 0; }
    .share-modal-section textarea,
    #shareTextArea { min-height: 180px; }
}
