/* 风险回报比计算器样式 */
.risk-reward-section {
    min-height: 100vh;
    padding: 120px 0 80px;
}

.risk-reward-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
    backdrop-filter: blur(10px);
}

.risk-reward-container h2 {
    text-align: center;
    margin-bottom: .5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
}

.risk-reward-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
}

/* 计算器表单 */
.calculator-form {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.form-header h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* 输入区域 */
.input-section {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: .8rem;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 1.1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--accent-color);
    font-size: 1.1rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    background: var(--dark-bg);
    color: var(--text-light);
    border-radius: 12px;
    outline: none;
    transition: all .3s ease;
    font-size: 1.1rem;
    font-weight: 600;
}

.input-wrapper input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0,198,255,.2);
}

.input-wrapper .unit {
    position: absolute;
    right: 1rem;
    color: var(--text-gray);
    font-weight: 500;
    font-size: .9rem;
}

.input-hint {
    margin-top: .5rem;
    color: var(--text-gray);
    font-size: .85rem;
}

.input-group.optional label {
    color: var(--text-gray);
    opacity: .8;
}

.input-group.optional input {
    opacity: .9;
}

/* 计算按钮 */
.calculation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.calculate-btn {
    padding: 1.2rem 2rem;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .4s ease;
    box-shadow: 0 8px 25px rgba(0,198,255,.4);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,198,255,.5);
}

.reset-btn {
    padding: 1.2rem 2rem;
    background: transparent;
    color: var(--text-gray);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.reset-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.sample-btn {
    padding: 1.2rem 2rem;
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.sample-btn:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-2px);
}

/* 结果区域 */
.result-section {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    animation: fadeIn .5s ease;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.result-header h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* 结果网格 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: rgba(0,0,0,.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.risk-card::before {
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
}

.reward-card::before {
    background: linear-gradient(90deg, #28a745, #4caf50);
}

.ratio-card::before {
    background: linear-gradient(90deg, #ffc107, #ffeb3b);
}

.evaluation-card::before {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
}

.result-icon {
    margin-bottom: 1rem;
}

.result-icon i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.result-content {
    position: relative;
    z-index: 1;
}

.result-label {
    color: var(--text-gray);
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: .5rem;
}

.result-value {
    color: var(--text-light);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    margin-bottom: .5rem;
}

.result-unit {
    color: var(--text-gray);
    font-size: .85rem;
    font-weight: 500;
}

/* 详细分析 */
.detailed-analysis {
    background: rgba(0,0,0,.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.detailed-analysis h4 {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0,0,0,.3);
    border-radius: 8px;
}

.analysis-label {
    color: var(--text-gray);
    font-weight: 500;
}

.analysis-value {
    color: var(--text-light);
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 风险等级指示器 */
.risk-level-indicator {
    background: rgba(0,0,0,.2);
    border-radius: 12px;
    padding: 2rem;
}

.risk-level-indicator h4 {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.risk-bars {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.risk-bar {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    transition: all .3s ease;
    opacity: .3;
}

.risk-bar.active {
    opacity: 1;
    transform: scale(1.05);
}

.risk-bar.low {
    background: linear-gradient(135deg, rgba(40, 167, 69, .2), rgba(40, 167, 69, .1));
    border: 1px solid rgba(40, 167, 69, .3);
}

.risk-bar.medium {
    background: linear-gradient(135deg, rgba(255, 193, 7, .2), rgba(255, 193, 7, .1));
    border: 1px solid rgba(255, 193, 7, .3);
}

.risk-bar.high {
    background: linear-gradient(135deg, rgba(220, 53, 69, .2), rgba(220, 53, 69, .1));
    border: 1px solid rgba(220, 53, 69, .3);
}

.risk-bar span {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: .8rem;
    font-size: .9rem;
}

.risk-bar .bar {
    height: 6px;
    background: rgba(255,255,255,.2);
    border-radius: 3px;
    overflow: hidden;
}

.risk-bar .bar::after {
    content: '';
    display: block;
    height: 100%;
    background: currentColor;
    border-radius: 3px;
    transition: width .3s ease;
}

.risk-bar.low .bar::after {
    width: 30%;
    background: #28a745;
}

.risk-bar.medium .bar::after {
    width: 60%;
    background: #ffc107;
}

.risk-bar.high .bar::after {
    width: 90%;
    background: #dc3545;
}

/* 建议指南 */
.guidelines-section {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.guidelines-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guideline-item {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all .3s ease;
}

.guideline-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,.2);
}

.guideline-item.excellent {
    background: linear-gradient(135deg, rgba(40, 167, 69, .1), rgba(40, 167, 69, .05));
    border-color: rgba(40, 167, 69, .3);
}

.guideline-item.good {
    background: linear-gradient(135deg, rgba(0, 198, 255, .1), rgba(0, 198, 255, .05));
    border-color: rgba(0, 198, 255, .3);
}

.guideline-item.average {
    background: linear-gradient(135deg, rgba(255, 193, 7, .1), rgba(255, 193, 7, .05));
    border-color: rgba(255, 193, 7, .3);
}

.guideline-item.poor {
    background: linear-gradient(135deg, rgba(220, 53, 69, .1), rgba(220, 53, 69, .05));
    border-color: rgba(220, 53, 69, .3);
}

.guideline-header {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}

.guideline-header i {
    font-size: 1.5rem;
}

.excellent .guideline-header i {
    color: #28a745;
}

.good .guideline-header i {
    color: #00c6ff;
}

.average .guideline-header i {
    color: #ffc107;
}

.poor .guideline-header i {
    color: #dc3545;
}

.guideline-header h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.guideline-item p {
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* 使用提示 */
.tips-section {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tips-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0,0,0,.2);
    border-radius: 8px;
}

.tip-item i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: .2rem;
}

.tip-item h4 {
    color: var(--text-light);
    margin-bottom: .5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tip-item p {
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0;
}

/* 返回链接 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all .3s ease;
}

.back-link:hover {
    gap: .8rem;
    color: #00a8e8;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .risk-reward-container {
        padding: 2rem;
        margin: 0 1rem;
    }

    .calculator-form {
        padding: 2rem;
    }

    .calculation-actions {
        flex-direction: column;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .risk-bars {
        flex-direction: column;
    }

    .guidelines-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }
}