/* ============================
   another-side.css - 另一面
   统一项目黑白简约风格
   ============================ */

.as-page {
    max-width: 640px;
}

/* 页头 */
.as-page .subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* 表单区 */
.as-form {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

/* 单个问题卡片 */
.as-q {
    margin-bottom: 1.3rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px dashed var(--light-border);
}
.as-q:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.as-q-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.as-q-num {
    font-size: 12px;
    font-weight: bold;
    color: var(--bg);
    background: var(--fg);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.as-q-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
}
.as-q-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* 输入元素 */
.as-input,
.as-textarea,
.as-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--light-border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    color: var(--fg);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.as-input:focus,
.as-textarea:focus,
.as-select:focus {
    outline: none;
    border-color: var(--fg);
}
.as-textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

/* 双列行 */
.as-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 标签选项 */
.as-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.as-tag-group-title {
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 6px;
    letter-spacing: 1px;
    border-left: 2px solid var(--fg);
    padding-left: 6px;
}
.as-tag-group-title:first-child {
    margin-top: 0;
}

/* 复合字段（多子字段） */
.as-composite {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.as-composite-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.as-composite-field[data-field-key="desc"] {
    grid-column: 1 / -1;
}
.as-composite-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
}
.as-composite-field .as-tag-group {
    flex-wrap: wrap;
}

/* 条件输入框 */
.as-conditional {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* taginput 自定义输入 */
.as-taginput-custom {
    margin-top: 10px;
}

/* 字数计数 */
.as-char-count {
    text-align: right;
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}
.as-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1.5px solid var(--light-border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    background: var(--bg);
}
.as-tag:hover {
    border-color: var(--fg);
}
.as-tag.on {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

/* 图片上传 */
.as-img-upload {
    border: 1.5px dashed var(--light-border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.as-img-upload:hover {
    border-color: var(--fg);
}
.as-img-upload-tip {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.as-img-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.as-img-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--light-border);
}
.as-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.as-img-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    line-height: 18px;
    padding: 0;
}

/* 11题评分项 */
.as-score-summary {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--hover-bg);
    border-radius: 6px;
    border-left: 3px solid var(--fg);
}
.as-score-summary b {
    color: var(--fg);
    font-size: 15px;
    margin: 0 2px;
}
.as-score-list {
    display: grid;
    gap: 8px;
}
.as-score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--light-border);
    border-radius: 6px;
    font-size: 13px;
}
.as-score-item .as-score-text {
    flex: 1;
    line-height: 1.4;
}
.as-score-item .as-score-mark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--light-border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: var(--bg);
}
.as-score-item .as-score-mark.on {
    background: var(--fg);
    border-color: var(--fg);
}
.as-score-item .as-score-mark.on::after {
    content: '✓';
    position: absolute;
    inset: 0;
    color: var(--bg);
    text-align: center;
    line-height: 22px;
    font-size: 14px;
    font-weight: bold;
}
.as-score-item .as-score-val {
    flex-shrink: 0;
    width: 36px;
    text-align: right;
    color: var(--muted);
    font-size: 12px;
}

/* 提交按钮 */
.as-submit {
    width: 100%;
    padding: 14px;
    background: var(--fg);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.2rem;
    transition: opacity 0.2s;
}
.as-submit:active {
    opacity: 0.8;
}

/* 结果区 */
.as-result {
    display: none;
    background: var(--bg);
    border: 2px solid var(--fg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.as-result.show {
    display: block;
}
.as-result-head {
    text-align: center;
    border-bottom: 2px solid var(--fg);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.as-result-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 4px;
}
.as-result-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}
.as-result-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--light-border, #ddd);
    font-size: 12px;
    color: var(--muted);
}
.as-result-footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--fg);
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0;
}
.as-result-footer-text {
    letter-spacing: 1px;
}
.as-result-section {
    margin-bottom: 1rem;
}
.as-result-section-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--muted);
    margin-bottom: 6px;
    border-left: 3px solid var(--fg);
    padding-left: 8px;
}
.as-result-section-content {
    font-size: 14px;
    line-height: 1.7;
    padding-left: 11px;
    word-break: break-all;
}
.as-result-score-bar {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.as-result-score-bar .score-num {
    font-weight: bold;
}

/* 操作按钮 */
.as-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}
.as-actions button {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--fg);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg);
    color: var(--fg);
    font-weight: bold;
    transition: all 0.2s;
}
.as-actions button.primary {
    background: var(--fg);
    color: var(--bg);
}
.as-actions button:active {
    opacity: 0.8;
}

/* 隐私声明 */
.as-notice {
    background: rgba(0,0,0,0.04);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .as-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .as-composite {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .as-img-thumb {
        width: 70px;
        height: 70px;
    }
    .as-q-title {
        font-size: 13px;
    }
    .as-result-title {
        font-size: 18px;
        letter-spacing: 2px;
    }
}
