/* 宝宝测评 - 全局样式 */

/* 基础重置 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { -webkit-font-smoothing: antialiased; }

/* 卡片通用样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 测试卡片 */
.test-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.test-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.test-card .cover {
    width: 110px;
    min-height: 110px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.test-card .info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.tag-free { background: #dcfce7; color: #16a34a; }
.tag-paid { background: #fef3c7; color: #d97706; }
.tag-hot { background: #fee2e2; color: #dc2626; }

/* 按钮 */
.btn-primary {
    background: linear-gradient(135deg, #ff6b3f, #ff8a6a);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255,107,63,0.3);
}
.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(255,107,63,0.2);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: white;
    color: #ff6b3f;
    border: 1.5px solid #ff6b3f;
    border-radius: 24px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

/* 进度条 */
.progress-bar {
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b3f, #ffa944);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 题目选项 */
.option-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.option-item:active {
    transform: scale(0.98);
}
.option-item.selected {
    border-color: #ff6b3f;
    background: #fff5f2;
}
.option-item .radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.option-item.selected .radio {
    border-color: #ff6b3f;
    background: #ff6b3f;
}
.option-item.selected .radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* 雷达图容器 */
.radar-chart {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* 结果卡片 */
.result-card {
    background: linear-gradient(135deg, #fff5f2 0%, #fffbf5 100%);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
}

/* 分享海报 */
.share-poster {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up {
    animation: slideUp 0.3s ease forwards;
}

/* 分类图标 */
.cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 8px;
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 安全区域 */
.safe-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-content {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 32rem;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    animation: slideUp 0.3s ease;
}
