/* Brimstone - Dragonic Gaming Theme CSS */
/* Inspired by dark fantasy gaming aesthetics */

/* CSS Variables */
:root {
    /* Dragonic Color Palette - Dark Fantasy */
    --dragon-black: #0a0a0f;
    --dragon-dark: #12121a;
    --dragon-gray: #1a1a2e;
    --dragon-medium: #252538;
    --dragon-light: #3d3d5c;

    /* Fire/Lava Accents */
    --fire-orange: #ff6b35;
    --fire-red: #e94560;
    --fire-crimson: #9a0707;
    --ember-glow: #ff4500;
    --lava: #cf1020;

    /* Gold/Treasure */
    --gold-bright: #ffd700;
    --gold-dark: #b8860b;
    --gold-pale: #daa520;
    --bronze: #cd7f32;

    /* Magic/Mystical */
    --magic-purple: #7b2d8e;
    --magic-blue: #1e90ff;
    --arcane: #9932cc;
    --ethereal: #00ced1;

    /* Parchment/Paper */
    --parchment: #f5e6d3;
    --parchment-dark: #d4c4a8;
    --aged-paper: #e8dcc4;

    /* Class colors (D&D Beyond inspired) */
    --class-barbarian: #e7623e;
    --class-bard: #ab6dac;
    --class-cleric: #91a1b2;
    --class-druid: #7a853b;
    --class-fighter: #7f513e;
    --class-monk: #51a5c5;
    --class-paladin: #b59e54;
    --class-ranger: #507f62;
    --class-rogue: #555752;
    --class-sorcerer: #992e2e;
    --class-warlock: #7b469b;
    --class-wizard: #2a50a1;

    /* Rarity colors */
    --rarity-common: #9d9d9d;
    --rarity-uncommon: #1eff00;
    --rarity-rare: #0070dd;
    --rarity-very-rare: #a335ee;
    --rarity-legendary: #ff8000;
    --rarity-artifact: #e6cc80;

    /* UI Semantic */
    --bg-primary: var(--dragon-black);
    --bg-secondary: var(--dragon-dark);
    --bg-card: var(--dragon-gray);
    --bg-elevated: var(--dragon-medium);
    --text-primary: #e8e8e8;
    --text-secondary: #8888a0;
    --text-muted: #666680;
    --accent-primary: var(--fire-red);
    --accent-secondary: var(--gold-bright);
    --border-color: rgba(255, 215, 0, 0.2);
    --border-glow: rgba(255, 107, 53, 0.5);

    /* Typography */
    --font-heading: 'Cinzel', 'Georgia', serif;
    --font-body: 'Crimson Text', 'Georgia', serif;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-glow-fire: 0 0 20px rgba(233, 69, 96, 0.4);
    --shadow-glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at top, rgba(233, 69, 96, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 2.75rem;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--fire-orange) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    color: var(--gold-pale);
}

h3 {
    font-size: 1.5rem;
    color: var(--gold-dark);
}

h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--gold-bright);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--fire-orange);
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

/* Selection */
::selection {
    background: var(--fire-red);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dragon-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--dragon-light) 0%, var(--dragon-medium) 100%);
    border-radius: 5px;
    border: 2px solid var(--dragon-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-dark) 0%, var(--dragon-light) 100%);
}

/* ===================== */
/* NAVIGATION            */
/* ===================== */
.main-nav {
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.98) 0%, rgba(10, 10, 15, 0.95) 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--gold-dark), var(--fire-orange), var(--gold-dark), transparent) 1;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--fire-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.brand-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
    animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6)); }
    50% { opacity: 0.9; filter: drop-shadow(0 0 12px rgba(233, 69, 96, 0.8)); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--fire-orange), var(--gold-bright));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--gold-bright);
    background: rgba(255, 215, 0, 0.05);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-left: 1.5rem;
    margin-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.user-name {
    color: var(--gold-bright);
    font-weight: 700;
    font-family: var(--font-heading);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.nav-link-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link-small:hover {
    color: var(--fire-orange);
    background: rgba(233, 69, 96, 0.1);
}

/* ===================== */
/* MAIN CONTENT          */
/* ===================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    width: 100%;
}

/* ===================== */
/* CARDS - Dragonic      */
/* ===================== */
.dnd-card {
    background: linear-gradient(145deg, var(--dragon-gray) 0%, var(--dragon-dark) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dnd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), var(--fire-orange), var(--gold-dark), transparent);
    opacity: 0.6;
}

.dnd-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-fire);
    border-color: rgba(255, 107, 53, 0.3);
}

.dnd-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dnd-card-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: none;
}

/* Monster/Character Cards */
.creature-card {
    background: linear-gradient(145deg, var(--dragon-medium) 0%, var(--dragon-gray) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.creature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

.creature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(233, 69, 96, 0.2);
    border-color: var(--fire-orange);
}

.creature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.creature-card:hover img {
    transform: scale(1.1);
}

.creature-card-content {
    position: relative;
    z-index: 1;
    padding: 1.25rem;
}

/* ===================== */
/* BUTTONS - Dragonic    */
/* ===================== */
.btn-dnd {
    background: linear-gradient(135deg, var(--fire-red) 0%, var(--fire-crimson) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-dnd::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-dnd:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow-fire);
    color: white;
}

.btn-dnd:hover::before {
    left: 100%;
}

.btn-dnd:active {
    transform: translateY(-1px);
}

.btn-dnd-secondary {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-dark) 100%);
    color: var(--dragon-black);
}

.btn-dnd-secondary:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow-gold);
    color: var(--dragon-black);
}

.btn-dnd-outline {
    background: transparent;
    border: 2px solid var(--gold-dark);
    color: var(--gold-bright);
    box-shadow: none;
}

.btn-dnd-outline:hover {
    background: var(--gold-bright);
    color: var(--dragon-black);
    border-color: var(--gold-bright);
}

.btn-dnd-danger {
    background: linear-gradient(135deg, var(--lava) 0%, #8b0000 100%);
}

.btn-dnd-danger:hover {
    box-shadow: var(--shadow-md), 0 0 20px rgba(207, 16, 32, 0.5);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* ===================== */
/* FORMS                 */
/* ===================== */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--dragon-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-inner);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--gold-bright);
    box-shadow: var(--shadow-inner), 0 0 0 3px rgba(255, 215, 0, 0.15), var(--shadow-glow-gold);
    background: var(--dragon-gray);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===================== */
/* CHARACTER SHEET       */
/* ===================== */
.character-sheet {
    background: linear-gradient(135deg, var(--parchment) 0%, var(--aged-paper) 50%, var(--parchment-dark) 100%);
    color: var(--dragon-black);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg), inset 0 0 60px rgba(139, 69, 19, 0.15);
    position: relative;
}

.character-sheet::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid var(--gold-dark);
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.3;
}

.stat-block {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    text-align: center;
}

.stat-box {
    background: rgba(0, 0, 0, 0.04);
    border: 2px solid var(--gold-dark);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
    border-color: var(--fire-orange);
}

.stat-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--gold-dark);
    border-radius: 0 0 4px 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--dragon-black);
}

.stat-modifier {
    font-size: 1.35rem;
    color: var(--fire-crimson);
    font-weight: 700;
    margin-top: 0.25rem;
}

.stat-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dragon-medium);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ===================== */
/* BATTLE MAP            */
/* ===================== */
.battle-map-container {
    background: var(--dragon-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.battle-map-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49%, rgba(255, 215, 0, 0.05) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255, 215, 0, 0.05) 50%, transparent 51%);
    background-size: 40px 40px;
    pointer-events: none;
}

/* ===================== */
/* INITIATIVE TRACKER    */
/* ===================== */
.initiative-tracker {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.initiative-entry {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--dragon-medium);
    border-radius: 8px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.initiative-entry:hover {
    background: var(--dragon-light);
    transform: translateX(4px);
}

.initiative-entry.current-turn {
    border-left-color: var(--gold-bright);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, var(--dragon-medium) 100%);
    box-shadow: var(--shadow-sm), var(--shadow-glow-gold);
}

.initiative-entry.monster {
    border-left-color: var(--fire-red);
}

.initiative-entry.monster.current-turn {
    background: linear-gradient(90deg, rgba(233, 69, 96, 0.15) 0%, var(--dragon-medium) 100%);
    box-shadow: var(--shadow-sm), var(--shadow-glow-fire);
}

.initiative-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
    color: var(--gold-bright);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ===================== */
/* CHAT                  */
/* ===================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--dragon-dark);
    border-radius: 12px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    max-width: 85%;
    box-shadow: var(--shadow-sm);
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.player {
    background: linear-gradient(135deg, var(--dragon-medium) 0%, var(--dragon-gray) 100%);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.dm-narration {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.15) 0%, rgba(154, 7, 7, 0.1) 100%);
    border-left: 4px solid var(--fire-red);
    font-style: italic;
    align-self: flex-start;
}

.chat-message.player-action {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
    border-left: 4px solid var(--gold-bright);
    align-self: flex-end;
}

.chat-message.dice-roll {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.1) 0%, rgba(0, 206, 209, 0.1) 100%);
    border-left: 4px solid var(--magic-blue);
    text-align: center;
    align-self: center;
}

.chat-message .sender {
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--gold-bright);
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
}

.chat-input-container {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--dragon-gray);
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
}

/* ===================== */
/* DICE ROLLS            */
/* ===================== */
.dice-result {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--dragon-medium);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.dice-result .roll-notation {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dice-result .roll-total {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--gold-bright);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.dice-result.critical-success .roll-total {
    color: var(--rarity-uncommon);
    text-shadow: 0 0 20px var(--rarity-uncommon);
    animation: criticalPulse 1s ease-in-out infinite;
}

.dice-result.critical-fail .roll-total {
    color: var(--fire-red);
    text-shadow: 0 0 20px var(--fire-red);
}

@keyframes criticalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===================== */
/* HP BAR                */
/* ===================== */
.hp-bar {
    width: 100%;
    height: 10px;
    background: var(--dragon-dark);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow-inner);
}

.hp-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
    border-radius: 5px;
}

.hp-bar-fill.full {
    background: linear-gradient(90deg, #27ae60, #2ecc71, #27ae60);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.hp-bar-fill.half {
    background: linear-gradient(90deg, #d68910, #f39c12, #d68910);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.hp-bar-fill.low {
    background: linear-gradient(90deg, #c0392b, #e74c3c, #c0392b);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    animation: lowHpPulse 1.5s ease-in-out infinite;
}

@keyframes lowHpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===================== */
/* MESSAGES              */
/* ===================== */
.messages-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.message {
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-sm);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.15) 0%, rgba(39, 174, 96, 0.1) 100%);
    border-left: 4px solid #2ecc71;
}

.message-error {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.15) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-left: 4px solid #e74c3c;
}

.message-warning {
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.15) 0%, rgba(243, 156, 18, 0.1) 100%);
    border-left: 4px solid #f1c40f;
}

.message-info {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.15) 0%, rgba(41, 128, 185, 0.1) 100%);
    border-left: 4px solid #3498db;
}

.message-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 4px;
}

.message-close:hover {
    color: var(--fire-red);
    background: rgba(233, 69, 96, 0.1);
}

/* ===================== */
/* FOOTER                */
/* ===================== */
.main-footer {
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%),
                url('/static/images/theme/footer_bg.png') center/cover;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: auto;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), var(--fire-orange), var(--gold-dark), transparent);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* ===================== */
/* GRID SYSTEM           */
/* ===================== */
.grid {
    display: grid;
    gap: 1.75rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }

    .nav-links {
        display: none;
    }

    .stat-block {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

/* ===================== */
/* UTILITY CLASSES       */
/* ===================== */
.text-center { text-align: center; }
.text-gold { color: var(--gold-bright); }
.text-red { color: var(--fire-red); }
.text-muted { color: var(--text-secondary); }
.text-glow { text-shadow: 0 0 10px currentColor; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.rounded { border-radius: 8px; }
.shadow { box-shadow: var(--shadow-md); }
.glow-fire { box-shadow: var(--shadow-glow-fire); }
.glow-gold { box-shadow: var(--shadow-glow-gold); }

/* ===================== */
/* HTMX LOADING          */
/* ===================== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

.htmx-indicator.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--gold-bright);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================== */
/* ANIMATIONS            */
/* ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===================== */
/* CLASS-SPECIFIC COLORS */
/* ===================== */
.class-barbarian { border-color: var(--class-barbarian); }
.class-bard { border-color: var(--class-bard); }
.class-cleric { border-color: var(--class-cleric); }
.class-druid { border-color: var(--class-druid); }
.class-fighter { border-color: var(--class-fighter); }
.class-monk { border-color: var(--class-monk); }
.class-paladin { border-color: var(--class-paladin); }
.class-ranger { border-color: var(--class-ranger); }
.class-rogue { border-color: var(--class-rogue); }
.class-sorcerer { border-color: var(--class-sorcerer); }
.class-warlock { border-color: var(--class-warlock); }
.class-wizard { border-color: var(--class-wizard); }

/* ===================== */
/* RARITY STYLING        */
/* ===================== */
.rarity-common { color: var(--rarity-common); }
.rarity-uncommon { color: var(--rarity-uncommon); text-shadow: 0 0 8px rgba(30, 255, 0, 0.3); }
.rarity-rare { color: var(--rarity-rare); text-shadow: 0 0 8px rgba(0, 112, 221, 0.3); }
.rarity-very-rare { color: var(--rarity-very-rare); text-shadow: 0 0 8px rgba(163, 53, 238, 0.3); }
.rarity-legendary { color: var(--rarity-legendary); text-shadow: 0 0 8px rgba(255, 128, 0, 0.4); }
.rarity-artifact { color: var(--rarity-artifact); text-shadow: 0 0 10px rgba(230, 204, 128, 0.5); }

/* ===================== */
/* SPECIAL ELEMENTS      */
/* ===================== */

/* Dragon-themed divider */
.dragon-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), var(--fire-orange), var(--gold-dark), transparent);
    margin: 2rem 0;
    position: relative;
}

.dragon-divider::before {
    content: '🐉';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 0 1rem;
    font-size: 1.5rem;
}

/* Ornate border box */
.ornate-box {
    position: relative;
    padding: 2rem;
    background: var(--dragon-gray);
    border: 2px solid var(--gold-dark);
}

.ornate-box::before,
.ornate-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-bright);
}

.ornate-box::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.ornate-box::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Glowing text effect */
.glow-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
    }
    to {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

/* Badge/Tag styling */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    background: var(--dragon-medium);
    border: 1px solid var(--border-color);
}

.badge-fire {
    background: linear-gradient(135deg, var(--fire-red), var(--fire-crimson));
    border-color: var(--fire-orange);
    color: white;
}

.badge-gold {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
    border-color: var(--gold-bright);
    color: var(--dragon-black);
}

.badge-arcane {
    background: linear-gradient(135deg, var(--magic-purple), var(--arcane));
    border-color: var(--magic-purple);
    color: white;
}
