/**
 * 人生红点卡牌样式
 * 为专家辅助诊断系统提供精美的卡牌视觉效果
 */

/* 卡牌基础样式 */
.redpoint-card-container {
    perspective: 1000px;
    margin: 1.5rem;
    width: 300px;
    height: 420px;
}

.redpoint-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.redpoint-card.flipped {
    transform: rotateY(180deg);
}

.redpoint-card-front, .redpoint-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.redpoint-card-front {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.redpoint-card-back {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    transform: rotateY(180deg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

/* 卡牌正面样式 */
.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    background-color: #d32f2f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 2.5rem;
    color: #d32f2f;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.card-prompt {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
}

/* 卡牌背面样式 */
.card-back-header {
    margin-bottom: 1.5rem;
}

.card-back-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-back-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.card-back-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-guidance {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.guidance-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.guidance-content {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.card-examples {
    background-color: #e8f5e9;
    padding: 1rem;
    border-radius: 8px;
}

.examples-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.examples-content {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.card-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

/* 卡牌集合样式 */
.redpoint-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* 卡牌动画效果 */
.redpoint-card-container:hover .redpoint-card:not(.flipped) {
    box-shadow: 0 15px 40px rgba(211, 47, 47, 0.2);
    transform: translateY(-10px);
}

/* 结果卡牌样式 */
.result-redpoint-card {
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.result-redpoint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #d32f2f 0%, #ff6659 100%);
}

.result-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.result-card-badge {
    position: absolute;
    top: -10px;
    right: 0;
    background-color: #d32f2f;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.result-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.result-card-subtitle {
    font-size: 1rem;
    color: #666;
}

.result-card-content {
    margin-bottom: 1.5rem;
}

.result-card-description {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.result-card-characteristics {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
}

.result-characteristic {
    margin-bottom: 1.5rem;
}

.result-characteristic:last-child {
    margin-bottom: 0;
}

.characteristic-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.characteristic-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
}

.characteristic-icon i {
    font-size: 1rem;
    color: #d32f2f;
}

.characteristic-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.characteristic-content {
    padding-left: 2.3rem;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

/* 分析结果样式 */
.analysis-section {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.analysis-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1a237e 0%, #534bae 100%);
}

.analysis-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.analysis-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 0.5rem;
}

.analysis-subtitle {
    font-size: 1rem;
    color: #666;
}

.analysis-content {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.keywords-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.keyword-tag {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.keyword-tag i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* 文本框样式 */
.answer-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #d32f2f;
    border-radius: 8px;
    margin-top: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    resize: vertical;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 10;
    position: relative;
}

.answer-input:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.answer-input::placeholder {
    color: #999;
    font-style: italic;
}

/* 打印样式 */
@media print {
    body * {
        visibility: hidden;
    }
    
    .result-container, .result-container * {
        visibility: visible;
    }
    
    .result-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 2rem;
    }
    
    .action-buttons {
        display: none;
    }
    
    .navbar, .footer {
        display: none;
    }
    
    .result-redpoint-card, .analysis-section {
        box-shadow: none;
        margin: 2rem 0;
        break-inside: avoid;
    }
}
