* {
    scrollbar-width: thin !important;
    scrollbar-color: #d4af37 #1a1a2e !important;
}

*::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

*::-webkit-scrollbar-track {
    background: #1a1a2e !important;
}

*::-webkit-scrollbar-thumb {
    background: #d4af37 !important;
    border-radius: 4px !important;
}

*::-webkit-scrollbar-thumb:hover {
    background: #f4e4c1 !important;
}

body {
    background: #1a1a2e !important;
    color: #e8e8e8 !important;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif !important;
    line-height: 1.8 !important;
}

.rev-main {
    background: rgba(26, 26, 46, 0.6) !important;
    border: 1px solid #d4af37 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 30px rgba(212, 175, 55, 0.05) !important;
    border-radius: 8px !important;
    padding: 24px !important;
    margin: 16px 0 !important;
    color: #e8e8e8 !important;
    font-size: 14px !important;
    backdrop-filter: blur(10px) !important;
}

.char-dialogue {
    color: #d4af37 !important;
    font-weight: 500 !important;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4) !important;
}

.inner-thought {
    color: #8b0000 !important;
    font-style: italic !important;
    opacity: 0.95 !important;
}

.system-alert {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(139, 0, 0, 0.15)) !important;
    border-left: 4px solid #d4af37 !important;
    border-right: 4px solid #8b0000 !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    border-radius: 8px !important;
    color: #f4e4c1 !important;
    font-size: 14px !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2) !important;
}

.coser-panel {
    background: rgba(26, 26, 46, 0.8) !important;
    border: 2px solid #d4af37 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 1px rgba(232, 232, 232, 0.3) !important;
    border-radius: 8px !important;
    margin: 12px 0 !important;
    padding: 0 !important;
    backdrop-filter: blur(8px) !important;
}

.coser-panel summary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1)) !important;
    color: #d4af37 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 14px 20px !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
}

.coser-panel summary:hover {
    background: linear-gradient(135deg, rgba(244, 228, 193, 0.3), rgba(212, 175, 55, 0.2)) !important;
    color: #f4e4c1 !important;
    text-shadow: 0 0 15px rgba(244, 228, 193, 0.6) !important;
}

.coser-panel[open] summary {
    border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
    margin-bottom: 12px !important;
    border-radius: 6px 6px 0 0 !important;
}

.coser-panel > *:not(summary) {
    padding: 16px 20px !important;
    color: #e8e8e8 !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
}

.thinking-panel summary::before {
    content: "🧠 " !important;
}

.scene-panel summary::before {
    content: "📍 " !important;
}

.memory-panel summary::before {
    content: "🧠 " !important;
}

.redemption-panel summary::before {
    content: "⛩️ " !important;
}

.player-panel summary::before {
    content: "📋 " !important;
}

.npc-panel summary::before {
    content: "👤 " !important;
}

.realm-panel summary::before {
    content: "🌐 " !important;
}

.coser-panel table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 12px 0 !important;
}

.coser-panel table th {
    background: rgba(212, 175, 55, 0.2) !important;
    color: #d4af37 !important;
    padding: 10px !important;
    text-align: left !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    font-weight: 600 !important;
}

.coser-panel table td {
    padding: 10px !important;
    border: 1px solid rgba(232, 232, 232, 0.1) !important;
    color: #e8e8e8 !important;
}

.coser-panel table tr:hover {
    background: rgba(212, 175, 55, 0.05) !important;
}

.coser-panel ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 8px 0 !important;
}

.coser-panel ul li {
    padding: 8px 0 8px 24px !important;
    position: relative !important;
    color: #e8e8e8 !important;
}

.coser-panel ul li::before {
    content: "◆" !important;
    position: absolute !important;
    left: 0 !important;
    color: #d4af37 !important;
    font-size: 12px !important;
}

.coser-panel hr {
    border: none !important;
    border-top: 1px solid rgba(212, 175, 55, 0.3) !important;
    margin: 16px 0 !important;
}

.redemption-panel ul li[data-status="已完成"]::before,
.redemption-panel ul li:contains("已完成")::before {
    color: #8b0000 !important;
}

hr {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #d4af37, transparent) !important;
    margin: 24px 0 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

button, .option-button, [role="button"] {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1)) !important;
    border: 1px solid #d4af37 !important;
    color: #d4af37 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
}

button:hover, .option-button:hover, [role="button"]:hover {
    background: linear-gradient(135deg, rgba(244, 228, 193, 0.3), rgba(212, 175, 55, 0.2)) !important;
    color: #f4e4c1 !important;
    border-color: #f4e4c1 !important;
    box-shadow: 0 0 20px rgba(244, 228, 193, 0.4) !important;
    transform: translateY(-2px) !important;
}

input[type="text"], input[type="number"], textarea, select {
    background: rgba(26, 26, 46, 0.6) !important;
    border: 1px solid #d4af37 !important;
    color: #e8e8e8 !important;
    padding: 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    outline: none !important;
    border-color: #f4e4c1 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4) !important;
}

a {
    color: #d4af37 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

a:hover {
    color: #f4e4c1 !important;
    text-shadow: 0 0 8px rgba(244, 228, 193, 0.5) !important;
}

::selection {
    background: rgba(212, 175, 55, 0.4) !important;
    color: #ffffff !important;
}

::-moz-selection {
    background: rgba(212, 175, 55, 0.4) !important;
    color: #ffffff !important;
}

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

.coser-panel[open] > *:not(summary) {
    animation: fadeIn 0.4s ease !important;
}

.scene-panel div {
    padding: 6px 0 !important;
}

.memory-panel table {
    font-size: 13px !important;
}

.redemption-panel > div {
    margin: 16px 0 !important;
}

.redemption-panel > div:first-of-type {
    margin-top: 0 !important;
}

.npc-panel h3, .npc-panel h4 {
    color: #d4af37 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 16px 0 8px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
}

code, pre {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    color: #f4e4c1 !important;
    font-family: "Consolas", "Monaco", monospace !important;
}

pre {
    padding: 12px !important;
    overflow-x: auto !important;
}

blockquote {
    border-left: 4px solid #d4af37 !important;
    padding-left: 16px !important;
    margin: 16px 0 !important;
    color: #e8e8e8 !important;
    font-style: italic !important;
    opacity: 0.9 !important;
}
