/* public/assets/css/life/decision-maker.css */

.rdm-workspace { display: flex; flex-direction: column; gap: 24px; width: 100%; margin-bottom: 40px; }

@media (min-width: 900px) {
    .rdm-workspace { flex-direction: row; align-items: stretch; }
    .rdm-setup-panel { flex: 1.2; max-width: 450px; }
    .rdm-display-panel { flex: 1.8; min-width: 0; overflow: hidden; } 
}

.rdm-panel { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); overflow: hidden; display: flex; flex-direction: column; }
.rdm-panel-header { padding: 16px 24px; border-bottom: 1px solid var(--border-color); background: rgba(0,0,0,0.01); }
.rdm-panel-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.rdm-panel-body { padding: 24px; flex: 1; display: flex; flex-direction: column;}

/* =========================================================
   设置面板 (Form)
   ========================================================= */
.rdm-form-grid { display: flex; flex-direction: column; gap: 24px;}

.rdm-presets-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.rdm-preset-chip { 
    background: var(--bg-body); border: 1px solid var(--border-color); padding: 10px 16px; 
    border-radius: 8px; font-size: 0.95rem; font-weight: 600; color: var(--text-main); 
    cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.rdm-preset-chip:hover { border-color: var(--primary-color); background: rgba(var(--primary-rgb, 0,102,204), 0.03); }
.rdm-preset-chip.active { 
    background: var(--primary-color); color: white; border-color: var(--primary-color); 
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 0, 102, 204), 0.25);
    transform: translateY(-2px);
}

.rdm-form-group { display: flex; flex-direction: column; gap: 10px; animation: rdmFadeIn 0.3s ease-out;}
.rdm-form-group label { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }

.rdm-textarea { 
    width: 100%; padding: 14px; border: 1px solid var(--border-color); border-radius: 8px; 
    background: var(--bg-body); color: var(--text-main); font-size: 1rem; font-family: inherit; 
    line-height: 1.6; outline: none; transition: 0.2s; box-sizing: border-box; resize: vertical;
}
.rdm-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 0, 102, 204), 0.1); }

.rdm-form-actions { margin-top: auto; padding-top: 20px;}
.rdm-btn-primary { 
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; 
    border: none; border-radius: 12px; padding: 16px; font-size: 1.1rem; font-weight: 800; 
    cursor: pointer; transition: 0.3s; background: var(--primary-color); color: white; 
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 0, 102, 204), 0.2); 
}
.rdm-btn-primary:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(var(--primary-rgb, 0, 102, 204), 0.3); }
.rdm-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

@keyframes rdmFadeIn { from { opacity: 0; transform: translateY(-10px);} to { opacity: 1; transform: translateY(0);} }

/* =========================================================
   巨幕显示面板 (Slot Machine UI) ★ 核心升级
   ========================================================= */
.rdm-display-panel { 
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-surface) 100%); 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    padding: 40px 20px; position: relative; min-height: 450px;
}

.rdm-result-container {
    position: relative;
    width: 300px; height: 300px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: var(--bg-surface);
    border: 4px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), inset 0 0 40px rgba(0,0,0,0.03);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.rdm-status-text {
    position: absolute; top: 18%; left: 0; right: 0; text-align: center;
    font-size: 0.95rem; font-weight: 700; color: var(--primary-color); 
    opacity: 0; transition: 0.3s; z-index: 10;
}

/* 老虎机视窗屏蔽区 (限定展示高度，实现上下淡出) */
.rdm-slot-window {
    position: relative;
    width: 80%;
    height: 100px; /* 只够完整显示一行文字 */
    overflow: hidden;
    z-index: 3;
}
/* 视窗上下渐变消隐遮罩，模拟圆柱体边缘 */
.rdm-slot-window::before, .rdm-slot-window::after {
    content: ''; position: absolute; left: 0; right: 0; height: 30px; z-index: 5; pointer-events: none;
}
.rdm-slot-window::before { top: 0; background: linear-gradient(to bottom, var(--bg-surface) 0%, transparent 100%); }
.rdm-slot-window::after { bottom: 0; background: linear-gradient(to top, var(--bg-surface) 0%, transparent 100%); }

/* 老虎机长轨道 */
.rdm-slot-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.rdm-slot-item {
    height: 100px; /* 必须和视窗高度一致，保证每次定格完全居中 */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 5vw, 3.2rem); 
    font-weight: 800; color: var(--text-main); 
    text-align: center; line-height: 1.1; 
    word-break: break-word; padding: 0 10px;
    box-sizing: border-box;
    transition: color 0.3s;
}

/* 两侧红色的物理瞄准线/指针 */
.rdm-slot-pointer {
    position: absolute; top: 50%; width: 12px; height: 4px;
    background: #ef4444; border-radius: 2px; z-index: 10;
    transform: translateY(-50%); opacity: 0; transition: opacity 0.3s;
}
.rdm-pointer-left { left: -10px; border-radius: 2px 0 0 2px; }
.rdm-pointer-right { right: -10px; border-radius: 0 2px 2px 0; }

/* 状态变化：抽奖中 */
.rdm-result-container.is-spinning {
    transform: scale(0.96);
    border-color: rgba(var(--primary-rgb, 0,102,204), 0.5);
    box-shadow: 0 0 30px rgba(var(--primary-rgb, 0,102,204), 0.2);
}
.rdm-slot-window.is-spinning .rdm-slot-item {
    color: var(--text-muted); /* 滚动时文字变灰制造速度感 */
}
.rdm-result-container.is-spinning .rdm-slot-pointer { opacity: 1; }

/* 状态变化：抽中结果 */
.rdm-result-container.is-active {
    transform: scale(1.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 8px rgba(var(--primary-rgb, 0,102,204), 0.1), 0 20px 50px rgba(var(--primary-rgb, 0,102,204), 0.3);
}
.rdm-result-container.is-active .winner-item {
    color: var(--primary-color);
}
.rdm-result-container.is-active .rdm-glow-ring {
    opacity: 1; transform: scale(1.25);
}

.rdm-glow-ring {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid var(--primary-color); border-radius: 50%;
    opacity: 0; transform: scale(1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1; pointer-events: none;
}

@media (max-width: 900px) {
    .rdm-result-container { width: 260px; height: 260px; border-width: 3px; }
    .rdm-slot-window { height: 80px; }
    .rdm-slot-item { height: 80px; font-size: 2.2rem; }
}

/* =========================================================
   SEO & 暗黑模式适配 (保持不变)
   ========================================================= */
.tool-seo-content { margin-top: 50px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; overflow: hidden; }
.tool-seo-content h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; margin-bottom: 20px; color: var(--text-main); line-height: 1.3;}
.seo-intro-section { margin-bottom: 40px; }
.seo-lead-text { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 15px;}
.seo-sub-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); border-left: 4px solid var(--primary-color); padding-left: 12px;}

.seo-feature-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.seo-feature-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 24px; border-radius: 12px; transition: all 0.3s ease; }
.seo-feature-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 102, 204, 0.08); }
.seo-feature-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seo-icon { width: 40px; height: 40px; min-width: 40px; color: var(--primary-color); background: rgba(var(--primary-rgb, 0, 102, 204), 0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.seo-icon svg { width: 20px; height: 20px; }
.seo-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text-main); line-height: 1.4;}
.seo-feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

@media (max-width: 900px) {
    .seo-feature-grid-3 { grid-template-columns: 1fr; gap: 16px; }
    .tool-seo-content { padding: 24px; }
}

[data-theme="dark"] .tool-seo-content { background: var(--bg-surface); }
[data-theme="dark"] .seo-feature-card { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .rdm-textarea, [data-theme="dark"] .rdm-preset-chip:not(.active) { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .rdm-result-container { background: #0f172a; border-color: #334155; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); }
/* 修正暗黑模式下的遮罩颜色 */
[data-theme="dark"] .rdm-slot-window::before { background: linear-gradient(to bottom, #0f172a 0%, transparent 100%); }
[data-theme="dark"] .rdm-slot-window::after { background: linear-gradient(to top, #0f172a 0%, transparent 100%); }