* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg: #0b0a0c;
    --card: #141013;
    --gold: #d9946b;
    --copper: #b77e5e;
    --text: #ebd6c2;
    --text2: #8f7a6b;
    --border: #3f2e2a;
    --purple: #9b59b6;
}
body {
    background: var(--bg);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    padding: 1rem;
    overflow-x: hidden;
}
.container { max-width: 1400px; margin: 0 auto; }
.particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; width: 2px; height: 2px; background: var(--gold); border-radius: 50%; opacity: 0.3; animation: float 15s infinite; }
@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}
.app-container { background: rgba(18, 14, 16, 0.9); border-radius: 1.5rem; padding: 1.5rem; border: 1px solid var(--border); position: relative; z-index: 1; min-height: 90vh; }
.header { text-align: center; padding: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.header h1 { font-size: 1.6rem; font-weight: 300; letter-spacing: 4px; }
.header h1 span { color: var(--gold); }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.btn {
    background: linear-gradient(135deg, #2d1f1d, #1f181b);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
}
.btn:hover, .btn.active {
    border-color: var(--copper);
    color: var(--text);
    box-shadow: 0 0 10px rgba(168, 95, 58, 0.3);
}
.search-box { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-input {
    flex: 1;
    background: rgba(31, 24, 27, 0.8);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--text);
    outline: none;
}
.search-input:focus { border-color: var(--copper); box-shadow: 0 0 10px rgba(168, 95, 58, 0.2); }
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.8rem; }
.card {
    background: var(--card);
    border-radius: 12px 6px 12px 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #2f2324;
    text-align: center;
    position: relative;
}
.card:hover { transform: scale(1.05) translateY(-3px); border-color: var(--copper); box-shadow: 0 5px 20px rgba(168, 95, 58, 0.2); }
.card.favorite::after { content: '★'; position: absolute; top: -5px; right: -5px; color: var(--gold); font-size: 1rem; }
.card-img { width: 100%; aspect-ratio: 2/3; border-radius: 8px 3px 8px 3px; overflow: hidden; background: #1c1618; margin-bottom: 0.3rem; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-emoji { font-size: 2.5rem; }
.card-name { font-size: 0.7rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-section { display: none; }
.view-section.active { display: block; }
.draw-area { text-align: center; padding: 2rem; }
.deck {
    width: 140px;
    height: 200px;
    background: linear-gradient(135deg, #2d1f1d, #1f181b);
    border: 2px solid var(--copper);
    border-radius: 12px;
    margin: 0 auto 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.deck:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(168, 95, 58, 0.3); }
.deck.shuffling { animation: shuffle 0.5s ease-in-out; }
@keyframes shuffle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-3deg); }
    75% { transform: translateX(10px) rotate(3deg); }
}
.deck-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.deck-count { font-size: 0.8rem; color: var(--text2); }
.draw-result { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.draw-card { width: 120px; animation: drawPop 0.5s ease-out; }
@keyframes drawPop {
    0% { opacity: 0; transform: scale(0.5) translateY(-30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.history-list { display: flex; flex-direction: column; gap: 0.8rem; }
.history-item { background: rgba(31, 24, 27, 0.6); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; cursor: pointer; transition: all 0.3s; }
.history-item:hover { border-color: var(--copper); background: rgba(45, 31, 29, 0.8); }
.history-date { font-size: 0.7rem; color: var(--text2); margin-bottom: 0.5rem; }
.history-cards { display: flex; gap: 0.5rem; }
.history-card-mini { width: 50px; height: 75px; border-radius: 6px; overflow: hidden; background: #1c1618; }
.history-card-mini img { width: 100%; height: 100%; object-fit: cover; }
.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 9999; padding: 1rem; overflow-y: auto; }
.modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content {
    background: linear-gradient(135deg, #121011, #1a1318);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: rgba(45, 31, 29, 0.8); border: 1px solid var(--border); color: var(--text2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: all 0.3s; }
.modal-close:hover { background: var(--copper); color: #fff; transform: rotate(90deg); }
.detail-img { width: 100%; max-width: 250px; margin: 0 auto 1rem; border-radius: 12px; overflow: hidden; }
.detail-img img { width: 100%; display: block; }
.detail-title { font-size: 1.4rem; text-align: center; margin-bottom: 1rem; color: var(--gold); }
.detail-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.info-item { background: rgba(27, 21, 23, 0.8); padding: 0.5rem; border-radius: 8px; font-size: 0.8rem; }
.info-label { color: var(--text2); font-size: 0.7rem; }
.desc-box { background: rgba(15, 12, 13, 0.8); padding: 1rem; border-radius: 8px; border-left: 3px solid var(--copper); line-height: 1.6; margin-bottom: 1rem; }
.desc-box.reversed { border-left-color: #9b59b6; background: rgba(155, 89, 182, 0.1); }
.detail-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.detail-btn { flex: 1; background: linear-gradient(135deg, #2d1f1d, #1f181b); border: 1px solid var(--border); color: var(--text2); padding: 0.5rem; border-radius: 20px; cursor: pointer; transition: all 0.3s; }
.detail-btn:hover { border-color: var(--copper); color: var(--text); }
.detail-btn.active { background: var(--copper); color: #fff; }
.note-box { margin-top: 1rem; }
.note-box textarea { width: 100%; background: rgba(31, 24, 27, 0.8); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; color: var(--text); min-height: 80px; resize: vertical; font-family: inherit; }
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(45, 31, 29, 0.95); border: 1px solid var(--copper); color: var(--text); padding: 0.8rem 1.5rem; border-radius: 30px; font-size: 0.85rem; z-index: 10000; opacity: 0; transition: all 0.3s; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
@media (max-width:600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); } .header h1 { font-size: 1.2rem; } }
.element-fire { background: rgba(230, 126, 34, 0.2); border-color: #e67e22; color: #e67e22; }
.element-air { background: rgba(149, 165, 166, 0.2); border-color: #95a5a6; color: #95a5a6; }
.element-water { background: rgba(52, 152, 219, 0.2); border-color: #3498db; color: #3498db; }
.element-earth { background: rgba(212, 165, 116, 0.2); border-color: #d4a574; color: #d4a574; }
.position-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.position-tab { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text2); padding: 0.5rem; border-radius: 20px; cursor: pointer; transition: all 0.3s; }
.position-tab.active { background: var(--copper); color: #fff; border-color: var(--copper); }
.position-tab.reversed-tab.active { background: linear-gradient(135deg, #9b59b6, #8e44ad); border-color: #9b59b6; }
.reversed img { transform: rotate(180deg); }
.reversed-badge { position: absolute; top: 5px; right: 5px; background: linear-gradient(135deg, #9b59b6, #8e44ad); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; z-index: 10; }
.reversed-indicator { display: none; text-align: center; color: #9b59b6; font-size: 0.9rem; margin-bottom: 0.5rem; padding: 0.3rem; background: rgba(155, 89, 182, 0.1); border-radius: 8px; border: 1px solid rgba(155, 89, 182, 0.3); }
.element-display { margin-bottom: 1rem; padding: 1rem; background: rgba(15, 12, 13, 0.5); border-radius: 8px; }
.element-display h4 { color: var(--gold); margin-bottom: 0.5rem; font-size: 0.9rem; }
.element-pair { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.element-box { padding: 0.3rem 0.8rem; border-radius: 15px; border: 1px solid; font-size: 0.8rem; }
.element-mix-desc { color: var(--text2); font-size: 0.75rem; font-style: italic; padding-left: 0.5rem; }
.card-elements { display: flex; gap: 0.2rem; justify-content: center; margin-top: 0.3rem; }
.element-tag { font-size: 0.6rem; padding: 1px 4px; border-radius: 8px; border: 1px solid; }
.library-btn { background: linear-gradient(135deg, #2d1f1d, #1f181b); border: 1px solid var(--border); color: var(--text2); padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; transition: all 0.3s; font-size: 0.8rem; margin-left: 0.5rem; }
.library-btn:hover { border-color: var(--copper); color: var(--text); box-shadow: 0 0 10px rgba(168, 95, 58, 0.3); }
.library-modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.95); z-index: 10001; padding: 1rem; overflow-y: auto; }
.library-modal.active { display: flex; align-items: center; justify-content: center; }
.library-content { background: linear-gradient(135deg, #121011, #1a1318); border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--border); max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.library-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; flex-wrap: wrap; }
.library-tab { background: transparent; border: 1px solid var(--border); color: var(--text2); padding: 0.4rem 0.8rem; border-radius: 15px; cursor: pointer; transition: all 0.3s; font-size: 0.75rem; }
.library-tab:hover, .library-tab.active { border-color: var(--copper); color: var(--text); background: rgba(168, 95, 58, 0.1); }
.library-section { display: none; }
.library-section.active { display: block; }
.number-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.8rem; }
.number-card { background: rgba(31, 24, 27, 0.8); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; text-align: center; transition: all 0.3s; }
.number-card:hover { border-color: var(--copper); transform: translateY(-2px); }
.number-value { font-size: 1.5rem; color: var(--gold); margin-bottom: 0.3rem; }
.number-meaning { font-size: 0.75rem; color: var(--text); }
.number-keywords { font-size: 0.65rem; color: var(--text2); margin-top: 0.3rem; }
.element-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.element-card { background: rgba(31, 24, 27, 0.8); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; transition: all 0.3s; }
.element-card:hover { border-color: var(--copper); }
.element-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.element-icon { font-size: 1.5rem; }
.element-title { color: var(--gold); font-weight: bold; }
.element-assoc { font-size: 0.7rem; color: var(--text2); margin-top: 0.3rem; }
.zodiac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.zodiac-item { background: rgba(31, 24, 27, 0.6); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; text-align: center; font-size: 0.75rem; }
.zodiac-symbol { font-size: 1.2rem; margin-bottom: 0.2rem; }
.zodiac-name { color: var(--text); }
.zodiac-date { font-size: 0.6rem; color: var(--text2); }
.symbol-search { margin-bottom: 1rem; }
.symbol-search input { width: 100%; background: rgba(31, 24, 27, 0.8); border: 1px solid var(--border); border-radius: 20px; padding: 0.5rem 1rem; color: var(--text); outline: none; }
.symbol-search input:focus { border-color: var(--copper); }
.symbol-results { display: flex; flex-direction: column; gap: 0.5rem; }
.symbol-result { background: rgba(31, 24, 27, 0.6); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem; cursor: pointer; transition: all 0.3s; }
.symbol-result:hover { border-color: var(--copper); background: rgba(45, 31, 29, 0.8); }
.symbol-match { color: var(--gold); font-weight: bold; }
.close-scroll-btn { width: 100%; background: linear-gradient(135deg, var(--copper), #8b5a3c); border: none; color: #fff; padding: 1rem; border-radius: 10px; cursor: pointer; font-size: 1rem; margin-top: 1rem; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.close-scroll-btn:hover { background: linear-gradient(135deg, var(--gold), var(--copper)); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(168, 95, 58, 0.3); }
.related-cards { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.related-title { color: var(--gold); font-size: 0.9rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.3rem; }
.related-grid { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.symbol-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border-radius: 10px; cursor: pointer; transition: all 0.3s; border: 1px solid var(--border); margin-bottom: 0.4rem; text-align: left; width: 100%; }
.symbol-chip:hover { transform: translateX(4px); }
.chip-link:hover { border-color: var(--copper); background: rgba(168, 95, 58, 0.1); }
.chip-material:hover { border-color: var(--text2); background: rgba(139, 122, 110, 0.08); }
.chip-icon { font-size: 1.2rem; flex-shrink: 0; }
.chip-text { flex: 1; min-width: 0; }
.chip-name { font-size: 0.8rem; color: var(--text); font-weight: 500; }
.chip-type { font-size: 0.55rem; color: var(--text2); margin-top: 1px; }
.chip-others { font-size: 0.6rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; flex-shrink: 0; }
.chip-link .chip-name { color: var(--copper); }
.symbol-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.symbol-modal-inner { background: linear-gradient(135deg, #121011, #1a1318); border-radius: 1rem; padding: 1.5rem; max-width: 420px; width: 100%; color: var(--text); max-height: 85vh; overflow-y: auto; animation: drawPop 0.3s ease-out; border: 1px solid var(--border); }
.symbol-related { border-color: var(--copper); background: linear-gradient(135deg, rgba(168, 95, 58, 0.08), #121011 40%); }
.symbol-material { border-color: var(--text2); background: linear-gradient(135deg, rgba(139, 122, 110, 0.06), #121011 40%); }
.symbol-modal-header { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; }
.symbol-meaning { color: var(--text); font-size: 0.9rem; line-height: 1.6; margin: 0.5rem 0; }
.symbol-hint { font-size: 0.6rem; color: var(--text2); opacity: 0.8; margin-bottom: 0.8rem; padding: 0.3rem 0.5rem; background: rgba(0, 0, 0, 0.3); border-radius: 6px; border-left: 2px solid var(--border); }
.symbol-related .symbol-hint { border-left-color: var(--copper); }
.symbol-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.symbol-tag { font-size: 0.65rem; background: var(--card); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border); color: var(--text2); }
.symbol-categories { display: flex; gap: 0.3rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.symbol-cat-btn { background: rgba(31, 24, 27, 0.6); border: 1px solid var(--border); color: var(--text2); padding: 0.2rem 0.5rem; border-radius: 10px; cursor: pointer; font-size: 0.65rem; transition: all 0.3s; }
.symbol-cat-btn:hover, .symbol-cat-btn.active { border-color: var(--copper); color: var(--text); }
.symbol-highlight { background: rgba(168, 95, 58, 0.3); padding: 0 2px; border-radius: 2px; }
.spread-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.5rem; }
.spread-selector .btn { min-width: 80px; }
.spread-selector .btn.active { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 15px rgba(217, 148, 107, 0.2); }
.spread-grid { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.spread-slot { text-align: center; min-width: 100px; }
.spread-slot .draw-card { width: 100px; margin: 0 auto; }
.spread-label { color: var(--gold); font-size: 0.75rem; margin-top: 0.3rem; font-weight: 500; letter-spacing: 1px; }
.spread-meaning { color: var(--text2); font-size: 0.6rem; margin-top: 0.2rem; opacity: 0.8; max-width: 100px; }
.ai-panel { margin-top: 1.5rem; padding: 1rem; background: rgba(15, 12, 13, 0.7); border-radius: 12px; border: 1px solid var(--border); display: none; }
.ai-panel.active { display: block; }
.ai-panel h4 { color: var(--gold); font-weight: 300; letter-spacing: 2px; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.ai-panel .ai-content { color: var(--text); font-size: 0.9rem; line-height: 1.8; white-space: pre-wrap; text-align: left; }
.ai-panel .ai-loading { color: var(--text2); font-style: italic; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.ai-setup { background: rgba(31, 24, 27, 0.6); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-top: 1rem; text-align: left; }
.ai-setup label { color: var(--text2); font-size: 0.8rem; display: block; margin-bottom: 0.3rem; }
.ai-setup input, .ai-setup select { width: 100%; background: rgba(20, 16, 19, 0.8); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; color: var(--text); font-size: 0.8rem; margin-bottom: 0.5rem; outline: none; }
.ai-setup input:focus, .ai-setup select:focus { border-color: var(--copper); }
.ai-setup .ai-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ai-setup .ai-actions button { background: linear-gradient(135deg, #2d1f1d, #1f181b); border: 1px solid var(--border); color: var(--text2); padding: 0.4rem 1rem; border-radius: 15px; cursor: pointer; transition: all 0.3s; font-size: 0.75rem; }
.ai-setup .ai-actions button:hover { border-color: var(--copper); color: var(--text); }
.ai-setup .ai-actions button.primary { background: linear-gradient(135deg, var(--copper), #8b5a3c); color: #fff; border-color: var(--copper); }
.ai-setup .ai-actions button.primary:hover { background: linear-gradient(135deg, var(--gold), var(--copper)); }
.ai-setup .ai-status { font-size: 0.7rem; color: var(--text2); margin-top: 0.3rem; }
.ai-setup .ai-status.ok { color: #5cb85c; }
.ai-setup .ai-status.err { color: #d9534f; }
.spread-interp { margin-top: 1rem; padding: 0.8rem; background: rgba(0, 0, 0, 0.3); border-radius: 8px; border-left: 3px solid var(--gold); font-size: 0.85rem; line-height: 1.7; color: var(--text); text-align: left; }
.spread-interp strong { color: var(--gold); }
.spread-interp .pos-tag { display: inline-block; background: rgba(217, 148, 107, 0.15); padding: 0 6px; border-radius: 4px; color: var(--gold); font-weight: 500; }
@media (max-width:600px) { .spread-slot .draw-card { width: 75px; } .spread-grid { gap: 0.8rem; } .element-grid { grid-template-columns: 1fr; } .zodiac-grid { grid-template-columns: repeat(2, 1fr); } }
/* ===== 新增：全局 AI 悬浮精灵样式 ===== */
#ai-spirit { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background: var(--copper); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; z-index: 99999; box-shadow: 0 4px 15px rgba(0,0,0,0.5); border: 1px solid var(--gold); }
#ai-spirit:hover { transform: scale(1.1); }
.spirit-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 100000; align-items: center; justify-content: center; padding: 1rem; }
.spirit-modal.active { display: flex; }
.spirit-content { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; max-width: 500px; width: 100%; max-height: 80vh; overflow-y: auto; }
.spirit-output { background: rgba(0,0,0,0.3); padding: 1rem; border-radius: 8px; margin: 0.8rem 0; line-height: 1.6; border-left: 3px solid var(--gold); white-space: pre-wrap; color: var(--text); }
#spirit-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem; color: var(--text); margin-bottom: 0.8rem; outline: none; font-family: inherit; }
.spirit-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.spirit-actions button { background: var(--copper); border: none; color: #fff; padding: 0.5rem 1rem; border-radius: 12px; cursor: pointer; }
/* ===== 新增：视觉分类大目录 ===== */
.category-gallery { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.5rem 0; }
.cat-item {
    background: linear-gradient(135deg, rgba(45,31,29,0.9), rgba(20,16,19,0.9));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 130px;
}
.cat-item:hover {
    transform: translateY(-5px);
    border-color: var(--copper);
    box-shadow: 0 8px 20px rgba(168, 95, 58, 0.3);
}
.cat-icon { font-size: 2.2rem; }
.cat-name { color: var(--gold); font-size: 1rem; font-weight: bold; letter-spacing: 1px; }
.cat-sub { color: var(--text2); font-size: 0.7rem; }
/* ===== 星空黑洞首页 ===== */
#homeView {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(20,16,19,0.8) 0%, rgba(11,10,12,1) 70%);
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.stars {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 60% 20%, rgba(217, 148, 107, 0.8), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 10% 80%, rgba(217, 148, 107, 0.7), transparent),
        radial-gradient(1px 1px at 90% 90%, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 8s ease-in-out infinite;
}
.black-hole {
    text-align: center;
    position: relative;
    z-index: 10;
    animation: breath 6s ease-in-out infinite;
}
.black-hole h1 {
    font-size: 3rem;
    color: var(--text);
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(217, 148, 107, 0.6), 0 0 60px rgba(217, 148, 107, 0.3);
    margin-bottom: 10px;
}
.black-hole p {
    color: var(--text2);
    letter-spacing: 3px;
    margin-bottom: 50px;
    font-size: 0.9rem;
}
.btn-enter {
    background: transparent;
    border: 1px solid var(--copper);
    color: var(--gold);
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 5px;
    transition: all 0.5s ease;
}
.btn-enter:hover {
    background: var(--copper);
    color: #fff;
    box-shadow: 0 0 30px rgba(168, 95, 58, 0.7);
    transform: scale(1.05);
}
@keyframes breath {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}
@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
