body { 
    font-family: 'Inter', sans-serif; 
    background-color: #111827; 
    color: #d1d5db; 
}
.card { 
    background-color: #1f2937; 
    border-radius: 1rem; 
    padding: 1.5rem; 
    border: 1px solid #374151; 
    transition: box-shadow 0.4s ease-in-out, border-color 0.4s ease-in-out;
}
.roll-btn, .resource-btn { 
    background-color: #3b82f6; 
    color: white; 
    border-radius: 9999px; 
    font-size: 0.875rem; 
    font-weight: 600; 
    padding: 0.25rem 1rem; 
    transition: background-color 0.2s; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem; 
    border: none;
    cursor: pointer;
}
.roll-btn:hover, .resource-btn:hover { background-color: #2563eb; }
.roll-btn:active, .resource-btn:active { background-color: #1d4ed8; }
.infusion-btn { background-color: #f97316; }
.infusion-btn:hover { background-color: #ea580c; }
.infusion-btn:active { background-color: #c2410c; }

.resource-input { 
    background-color: #374151; 
    color: #d1d5db; 
    border: 1px solid #4b5563; 
    border-radius: 0.5rem; 
    text-align: center; 
    width: 4rem; 
}
.resource-input::-webkit-outer-spin-button, .resource-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.resource-input[type=number] { -moz-appearance: textfield; }

.section-title { 
    font-weight: 700; font-size: 1.5rem; color: #ffffff; 
    margin-bottom: 1rem; border-bottom: 2px solid #374151; padding-bottom: 0.5rem; 
}
.section-subtitle {
    font-weight: 600; font-size: 1.125rem; color: #e5e7eb;
    margin-bottom: 0.75rem;
}
.roll-result { 
    font-size: 1rem; font-weight: 600; color: #60a5fa; 
    margin-left: 0.5rem; display: inline-block; vertical-align: middle; 
}
.section-content { font-size: 0.875rem; line-height: 1.5; color: #9ca3af; }
.stat-modifier { color: #9ca3af; }
.conditions-textarea { 
    background-color: #374151; color: #d1d5db; border: 1px solid #4b5563; 
    border-radius: 0.5rem; width: 100%; min-height: 80px; padding: 0.5rem; 
}
.spell-slot { 
    display: inline-block; width: 1.2rem; height: 1.2rem; 
    background-color: #374151; border: 1px solid #4b5563; border-radius: 0.25rem; 
    cursor: pointer; margin-right: 0.5rem; vertical-align: middle; transition: background-color 0.2s; 
}
.spell-slot.used { background-color: #ef4444; }

/* Toggles */
.toggle-switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #4b5563; transition: .4s; border-radius: 28px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #ef4444; }
input:checked + .slider.blue { background-color: #3b82f6; }
input:checked + .slider.yellow { background-color: #eab308; }
input:checked + .slider.green { background-color: #22c55e; }
input:checked + .slider.red { background-color: #ef4444; }
input:checked + .slider:before { transform: translateX(22px); }

/* Edit Mode & Dynamic Lists */
.editable-input, .editable-textarea { background-color: #374151; border: 1px solid #4b5563; border-radius: 0.25rem; color: white; padding: 0 0.25rem; }
.editable-input { max-width: 60px; }
.editable-input.full-width, .editable-input.flex-grow { max-width: 100%; }
.editable-textarea { padding: 0.25rem; width: 100%; min-height: 60px; }
.edit-mode .display-value { display: none; }
.edit-mode .editable-input, .edit-mode .editable-textarea, .edit-mode .add-btn, .edit-mode .remove-btn { display: inline-block; }
.hidden { display: none; }
.edit-mode-only { display: none; }
.edit-mode .edit-mode-only { display: block; }
.add-btn, .remove-btn {
    font-family: monospace; font-weight: bold; color: white; border: none;
    border-radius: 50%; width: 24px; height: 24px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s;
}
.add-btn { background-color: #22c55e; } .add-btn:hover { background-color: #16a34a; }
.remove-btn { background-color: #ef4444; } .remove-btn:hover { background-color: #dc2626; }
.dynamic-list-item { padding-top: 0.5rem; border-top: 1px solid #374151; }
.dynamic-list-item:first-child { border-top: none; padding-top: 0;}

/* Home Page */
.character-card { transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; }
.character-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2), 0 4px 6px -2px rgba(59, 130, 246, 0.1); }

/* Toast */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background-color: #22c55e; color: white; padding: 1rem 2rem; border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 1000; opacity: 0;
    transition: opacity 0.5s, bottom 0.5s; pointer-events: none;
}
.toast.show { opacity: 1; bottom: 30px; pointer-events: auto; }
.toast.error { background-color: #ef4444; }

/* Glow Effects */
@keyframes glow {
    from { box-shadow: 0 0 5px 2px var(--glow-color); }
    to { box-shadow: 0 0 15px 6px var(--glow-color); }
}
.burn-active { --glow-color: rgba(234, 100, 8, 0.5); border-color: rgba(234, 100, 8, 0.7) !important; animation: glow 1.5s infinite alternate ease-in-out; }
.rage-active { --glow-color: rgba(239, 68, 68, 0.5); border-color: rgba(239, 68, 68, 0.7) !important; animation: glow 1.5s infinite alternate ease-in-out; }
.inspire-active { --glow-color: rgba(234, 179, 8, 0.5); border-color: rgba(234, 179, 8, 0.7) !important; animation: glow 1.5s infinite alternate ease-in-out; }
.challenge-active { --glow-color: rgba(168, 85, 247, 0.5); border-color: rgba(168, 85, 247, 0.7) !important; animation: glow 1.5s infinite alternate ease-in-out; }


/* Equipment */
.equipment-slot { display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; font-size: 0.875rem; }
.equipment-slot label { font-weight: 600; color: #9ca3af; flex-shrink: 0; margin-right: 1rem; }
.equipment-slot .equipment-item-name { text-align: right; color: #d1d5db; flex-grow: 1; }
