/* ==========================================================================
   🔮 随心解忧铺 · 专属样式
   文件：css/suixin.css
   主题色：天水碧 (#0D9488) + 流光金 (#F59E0B)
   ========================================================================== */

/* ===== 页面容器 & 天水碧主题变量 ===== */
.suixin-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;

    /* 天水碧 + 流光金 主题变量 */
    --primary: #0D9488;
    --primary-dark: #0F766E;
    --primary-light: #14B8A6;
    --accent: #F59E0B;
    --text: #134E4A;
    --muted: #64748B;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(13, 148, 136, 0.15);
    --transition: 0.25s ease;

    color: var(--text);
    font-family: 'Noto Sans TC', "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== 局部重置 (仅限抽签器内部，不影响底部导航) ===== */
.app-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 主容器 (毛玻璃效果) ===== */
.app-container {
    width: 100%;
    max-width: 720px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 32px;
    padding: 40px 36px 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255,255,255,0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
}

[data-theme="dark"] .app-container {
    background: rgba(35, 30, 26, 0.85);
    border: 1px solid rgba(13, 148, 136, 0.2);
}

/* ===== 头部 ===== */
.header { text-align: center; margin-bottom: 32px; }

/* ===== 头部图标 (修复 Emoji 降级问题) ===== */
.header-icon {
    font-size: 3.4rem;
    display: block;
    margin-bottom: 6px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header h1 { font-size: 2rem; font-weight: 900; color: var(--text); letter-spacing: 1px; }
.header h1 span { color: var(--primary); }
.header p { color: var(--muted); font-size: 1rem; font-weight: 500; margin-top: 6px; opacity: 0.9; }

[data-theme="dark"] .header h1 { color: var(--text-primary); }
[data-theme="dark"] .header p { color: var(--text-secondary); }

/* ===== 步骤指示器 ===== */
.steps-indicator { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 32px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.steps-indicator .step { display: flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 999px; background: rgba(13, 148, 136, 0.05); border: 1px solid rgba(13, 148, 136, 0.1); transition: var(--transition); }
.steps-indicator .step.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3); }
.steps-indicator .step .num { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: rgba(0, 0, 0, 0.06); font-size: 0.75rem; font-weight: 700; }
.steps-indicator .step.active .num { background: rgba(255, 255, 255, 0.25); }
.steps-indicator .arrow { color: #cbd5e1; font-size: 1rem; }

/* ===== 步骤面板 ===== */
.step-panel { display: none; animation: fadeSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.step-panel.active { display: block; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.panel-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.panel-desc { font-size: 0.95rem; color: var(--muted); margin-bottom: 20px; font-weight: 500; }

[data-theme="dark"] .panel-title { color: var(--text-primary); }
[data-theme="dark"] .panel-desc { color: var(--text-secondary); }

/* ===== 数量选择按钮组 ===== */
.count-picker { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.count-btn { flex: 1; min-width: 56px; padding: 14px 0; border-radius: 14px; border: 2px solid rgba(13, 148, 136, 0.1); background: rgba(255, 255, 255, 0.6); font-size: 1.2rem; font-weight: 700; color: var(--text); transition: var(--transition); cursor: pointer; text-align: center; font-family: inherit; }
.count-btn:hover { background: rgba(255, 255, 255, 0.9); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(13, 148, 136, 0.08); }
.count-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3); transform: translateY(-2px); }

[data-theme="dark"] .count-btn { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); border-color: rgba(13, 148, 136, 0.25); }
[data-theme="dark"] .count-btn:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .count-btn.selected { background: var(--primary); color: #fff; }

/* ===== 选项输入区 ===== */
.options-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.option-item { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(13, 148, 136, 0.1); transition: var(--transition); }
.option-item:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12); }
.option-number { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.option-input { flex: 1; border: none; background: transparent; padding: 12px 4px; font-size: 1rem; outline: none; color: var(--text); font-weight: 500; min-width: 0; font-family: inherit; }
.option-input::placeholder { color: #94a3b8; font-weight: 400; }

[data-theme="dark"] .option-item { background: rgba(255, 255, 255, 0.05); border-color: rgba(13, 148, 136, 0.2); }
[data-theme="dark"] .option-item:focus-within { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .option-input { color: var(--text-primary); }

/* ===== 按钮区 ===== */
.actions { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border: none; padding: 18px 32px; border-radius: 999px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: var(--transition); box-shadow: 0 8px 28px rgba(13, 148, 136, 0.25); display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-family: inherit;
}
.btn-primary:hover:not(:disabled) { transform: scale(1.02); box-shadow: 0 12px 36px rgba(13, 148, 136, 0.35); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(13, 148, 136, 0.15); padding: 12px 24px; border-radius: 999px; font-size: 0.95rem; font-weight: 600; color: var(--primary-dark); cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; font-family: inherit; }
.btn-secondary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05); }

[data-theme="dark"] .btn-secondary { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border-color: rgba(13, 148, 136, 0.25); }
[data-theme="dark"] .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

/* 保存结果按钮 (流光金) */
.btn-save-result { background: var(--accent); color: #fff; border: none; padding: 12px 24px; border-radius: 999px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-family: inherit; }
.btn-save-result:hover:not(:disabled) { transform: scale(1.04); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }
.btn-save-result:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

/* ===== 结果区域 ===== */
.result-area { min-height: 120px; margin-top: 24px; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 20px; background: rgba(13, 148, 136, 0.05); padding: 20px; transition: var(--transition); }
.result-placeholder { color: #94a3b8; font-weight: 500; font-size: 1rem; text-align: center; }
.result-shuffle { font-size: 2rem; font-weight: 900; color: var(--primary); animation: shake 0.10s infinite; text-align: center; word-break: break-word; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.result-card { width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border: 3px dashed var(--accent); border-radius: 22px; padding: 28px 20px; text-align: center; animation: popIn 0.40s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; flex-direction: column; align-items: center; }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.result-label { font-size: 0.9rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.result-name { font-size: 2.4rem; font-weight: 900; color: var(--accent); word-break: break-word; line-height: 1.3; text-shadow: 0 2px 10px rgba(245,158,11,0.2); }
.result-sub { font-size: 1rem; color: var(--primary); font-weight: 600; margin-top: 10px; opacity: 0.9; }

[data-theme="dark"] .result-area { background: rgba(13, 148, 136, 0.08); }
[data-theme="dark"] .result-card { background: rgba(35, 30, 26, 0.9); }
[data-theme="dark"] .result-label { color: var(--text-secondary); }

/* ===== 历史记录 ===== */
.history-section { margin-top: 28px; border-top: 1px dashed rgba(13, 148, 136, 0.2); padding-top: 20px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-header h3 { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.history-header .clear-btn { background: none; border: none; color: #94a3b8; font-size: 0.8rem; cursor: pointer; font-weight: 500; padding: 4px 12px; border-radius: 999px; transition: var(--transition); font-family: inherit; }
.history-header .clear-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.06); }
.history-tags { display: flex; flex-wrap: wrap; gap: 10px; min-height: 36px; }
.history-tag { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(13, 148, 136, 0.15); border-radius: 999px; padding: 6px 18px; font-size: 0.9rem; font-weight: 500; color: var(--text); transition: var(--transition); }
.history-tag:first-child { background: var(--primary); color: #fff; border-color: var(--primary); }
.history-empty { color: #cbd5e1; font-size: 0.9rem; font-weight: 400; }

[data-theme="dark"] .history-tag { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); border-color: rgba(13, 148, 136, 0.2); }
[data-theme="dark"] .history-tag:first-child { background: var(--primary); color: #fff; }
[data-theme="dark"] .history-empty { color: var(--text-light); }

/* ===== 底部导航 (与隐姓埋名解忧铺格式一致，悬停色为天水碧) ===== */
.bottom-nav {
    display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
    margin-top: 50px; padding: 20px 0; border-top: 1px dashed var(--border-glass);
}
.bottom-nav a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 600;
    display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; padding: 8px 16px; border-radius: 8px;
}
.bottom-nav a:hover { color: #0D9488; background: rgba(13, 148, 136, 0.08); }
.bottom-nav a i { font-size: 1.1rem; }

/* ===== 页脚注释 ===== */
.footer-note { margin-top: 40px; color: var(--text-secondary); font-size: 0.85rem; opacity: 0.7; text-align: center; }

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .app-container { padding: 28px 18px 36px; border-radius: 24px; }
    .header h1 { font-size: 1.6rem; }
    .header-icon { font-size: 2.8rem; }
    .count-btn { font-size: 1rem; padding: 12px 0; min-width: 44px; }
    .option-item { padding: 6px 10px 6px 14px; }
    .option-number { width: 28px; height: 28px; font-size: 0.75rem; }
    .option-input { font-size: 0.9rem; padding: 10px 2px; }
    .result-name { font-size: 1.8rem; }
    .btn-primary { font-size: 1rem; padding: 16px 24px; }
    .steps-indicator .step { font-size: 0.7rem; padding: 4px 10px; }
    .bottom-nav { gap: 16px; margin-top: 35px; }
    .bottom-nav a { font-size: 0.85rem; padding: 6px 12px; }
}