/* Share Card Modal Styles */
#share-modal {
    z-index: 100;
}

.share-card-container {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* 允许容器在小屏幕上滚动或缩放，防止溢出 */
    max-width: 100%;
    overflow-x: auto;
}

/* 预览区 - 拍立得风格 */
#card-preview {
    background-color: #ffffff;
    width: 600px; /* 扩大尺寸 */
    padding: 32px 32px 40px 32px; /* 增加内边距 */
    display: flex;
    flex-direction: column;
    gap: 24px; /* 增加间距 */
    box-sizing: border-box;
    position: relative;
    /* 确保截图时背景色正确 */
    background-image: radial-gradient(#f1f5f9 1px, transparent 1px);
    background-size: 24px 24px;
}

.card-image-wrapper {
    width: 100%;
    border-radius: 16px; /* 圆角增加 */
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: #f1f5f9;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-section-ref {
    gap: 12px; /* 参考图标题与缩略图间距更大 */
}

.card-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
}

.card-ref-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-ref-images img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.card-prompt {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
    font-size: 14px; /* 字体加大 */
    line-height: 1.8; /* 增加行高，避免底部被切 */
    color: #1e293b; /* 加深颜色，从 slate-600 到 slate-800 */
    background: transparent; /* 移除背景 */
    padding: 2px 0; /* 微小内边距，避免文字贴边被裁剪 */
    border: none; /* 移除边框 */
    white-space: pre-line; /* 使用 pre-line 而不是 pre-wrap，忽略开头结尾的空行 */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    /* border-top: 2px dashed #e2e8f0; */
    margin-top: auto; /* Push to bottom if container has height */
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-author {
    font-weight: 700;
    font-size: 20px; /* 字体加大 */
    color: #1e293b;
    display: flex;
    align-items: baseline; /* 改为 baseline 对齐，更自然 */
    gap: 8px; /* 增加间距 */
}

.card-brand {
    font-size: 12px; /* 字体加大 */
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-brand img {
    height: 16px;
    width: auto;
}

.card-qr {
    background: white;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    width: 80px; /* 二维码加大 */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-qr img {
    width: 100%;
    height: 100%;
    display: block;
}

/* 移动端适配：缩小预览以适应屏幕，但保持比例 */
@media (max-width: 640px) {
    .share-card-container {
        transform-origin: top center;
        transform: scale(0.55); /* 强制缩小显示 */
        margin-bottom: -200px; /* 补偿缩放后的空白 */
    }
    
    /* 或者使用 max-width 方案，但这会改变排版 */
    /* 
    #card-preview {
        width: 100%;
        max-width: 340px;
        padding: 20px;
    } 
    */
}
