@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

:root {
    --text-gold: #c69c6d;
    --border-gold: #c69c6d;
    --bg-panel: rgba(10, 10, 15, 0.4);
    /* Lowered for transparency */
    --btn-bg: #444;
    --btn-border: #666;
    --text-main: #eee;
    --q-poor: #9d9d9d;
    --q-common: #ffffff;
    --q-uncommon: #1eff00;
    --q-rare: #0070dd;
    --q-epic: #a335ee;
    --q-legendary: #ff8000;
}

body {
    margin: 0;
    background: transparent;
    color: var(--text-main);
    font-family: 'Lato', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-image: url('assets/elwynn.png');
    z-index: -10;
    filter: brightness(0.6);
    transition: background-image 1s ease-in-out;
    background-color: #000;
}

/* SHAKE ANIMATION */
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

/* FLOATING TEXT */
.float-text {
    position: absolute;
    pointer-events: none;
    font-weight: bold;
    font-size: 28px;
    text-shadow: 2px 2px 4px #000;
    animation: floatUp 1.2s ease-out forwards;
    z-index: 1000;
}

/* COMBAT ARENA */
#combat-arena {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    height: 280px;
    background: rgba(0, 0, 0, 0.3);
    /* Made more transparent */
    border-bottom: 2px solid var(--border-gold);
    position: relative;
    overflow: hidden;
    padding: 30px 10px;
    backdrop-filter: blur(2px);
    /* Subtle blur to help readability */
}

.combat-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
    position: relative;
}

.combat-portrait {
    width: 120px;
    height: 120px;
    border: 3px solid var(--border-gold);
    border-radius: 8px;
    background: #1a1a1a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    object-fit: cover;
}

.combat-name {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    text-shadow: 1px 1px 2px #000;
}

.combat-hp-bar {
    width: 140px;
    height: 12px;
    background: #333;
    border: 1px solid #000;
    border-radius: 6px;
    overflow: hidden;
}

.combat-hp-fill {
    height: 100%;
    background: linear-gradient(to bottom, #ff4444, #880000);
    transition: width 0.3s ease;
}

.vs-label {
    font-family: 'Cinzel', serif;
    font-size: 40px;
    color: var(--text-gold);
    text-shadow: 0 0 15px rgba(198, 156, 109, 0.6);
    font-style: italic;
}

/* IDLE ANIMATION (Breathing + Bobbing) */
@keyframes idle-pulse {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.02) translateY(-2px);
    }
}

.combat-unit {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.1s;
    animation: idle-pulse 3s infinite ease-in-out;
    transform-origin: bottom center;
}

/* SNAPPY ATTACK (S&F Style) */
@keyframes attack-player {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    20% {
        transform: translateX(-50px) rotate(-20deg) scale(0.9);
    }

    /* Deep windup */
    40% {
        transform: translateX(300px) rotate(15deg) scale(1.3);
    }

    /* Heavy Impact (Moving closer) */
    50% {
        transform: translateX(250px) rotate(5deg) scale(1.1);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}

@keyframes attack-enemy {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    20% {
        transform: translateX(50px) rotate(20deg) scale(0.9);
    }

    40% {
        transform: translateX(-300px) rotate(-15deg) scale(1.3);
    }

    /* Heavy Impact (Moving closer) */
    50% {
        transform: translateX(-250px) rotate(-5deg) scale(1.1);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}

/* SCREEN SHAKE (Crit) */
@keyframes screen-shake {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translate(-10px, -10px) rotate(-1deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translate(10px, 10px) rotate(1deg);
    }
}

.anim-screen-shake {
    animation: screen-shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}


/* FLASH HIT (White Flash) */
@keyframes hit-flash {
    0% {
        transform: translate(0, 0) scale(1);
        filter: brightness(1);
    }

    10% {
        transform: translate(-5px, 5px) scale(0.95);
        filter: brightness(5) saturate(0);
    }

    /* FLASH WHITE */
    20% {
        transform: translate(5px, -5px) scale(1.05);
        filter: brightness(2) saturate(0.5);
    }

    30% {
        transform: translate(-5px, -5px) scale(0.95);
        filter: brightness(1.5);
    }

    40% {
        transform: translate(5px, 5px) scale(1.05);
    }

    100% {
        transform: translate(0, 0) scale(1);
        filter: brightness(1);
    }
}

.anim-attack-player {
    animation: attack-player 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    transition: none !important;
}

.anim-attack-enemy {
    animation: attack-enemy 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    transition: none !important;
}

.anim-hit {
    animation: hit-flash 0.5s ease-out !important;
    transition: none !important;
}

/* COMBAT STATES */
@keyframes windup {
    0% { transform: translateX(0) scale(1); }
    100% { transform: translateX(-12px) scale(0.98); }
}

@keyframes strike {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(24px) scale(1.05); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes crit-flash {
    0% { filter: brightness(1); }
    40% { filter: brightness(1.6) saturate(1.3); }
    100% { filter: brightness(1); }
}

.anim-windup {
    animation: windup 0.22s ease-out !important;
}

.anim-strike {
    animation: strike 0.26s ease-out !important;
}

.anim-crit {
    animation: screen-shake 0.5s cubic-bezier(.36, .07, .19, .97) both, crit-flash 0.5s ease-out both;
}

.anim-dot {
    animation: aura-pulse 0.7s ease-in-out;
    filter: hue-rotate(20deg);
}

.anim-buff {
    animation: aura-pulse 0.8s ease-in-out;
    box-shadow: 0 0 18px 6px rgba(255, 215, 0, 0.5);
}

.anim-shield {
    animation: aura-pulse 0.9s ease-in-out;
    box-shadow: 0 0 18px 6px rgba(0, 191, 255, 0.6);
}

.anim-enrage {
    animation: aura-shake 0.1s infinite;
    box-shadow: 0 0 22px 8px rgba(255, 0, 0, 0.7);
}

@keyframes death-fade {
    0% { filter: grayscale(0); transform: scale(1); opacity: 1; }
    100% { filter: grayscale(1); transform: scale(0.95); opacity: 0.6; }
}

.anim-death {
    animation: death-fade 1s ease-out forwards;
}

@keyframes levelup-glow {
    0% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.7); }
    100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

.anim-levelup {
    animation: levelup-glow 1.2s ease-out;
}

@keyframes loot-glint {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
    100% { filter: brightness(1); }
}

.anim-loot {
    animation: loot-glint 0.7s ease-out;
}

.anim-gold {
    animation: loot-glint 0.7s ease-out;
}

.anim-quest {
    animation: levelup-glow 0.9s ease-out;
}

.anim-talent {
    animation: levelup-glow 1.2s ease-out;
}

.pulse {
    animation: aura-pulse 1.2s ease-in-out infinite;
}

.dmg-popup {
    position: absolute;
    font-weight: bold;
    font-size: 32px;
    text-shadow: 2px 2px 4px #000;
    pointer-events: none;
    z-index: 1001;
}

.dmg-player {
    color: #ff4444;
}

.dmg-enemy {
    color: #ffd700;
}

/* STATUS AURAS */
.aura-holy {
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.6);
    animation: aura-pulse 2s infinite ease-in-out;
    border-color: #ffd700 !important;
}

.aura-poison {
    box-shadow: 0 0 15px 5px rgba(50, 205, 50, 0.6);
    animation: aura-pulse 1.5s infinite ease-in-out;
    border-color: #32cd32 !important;
}

.aura-shield {
    box-shadow: 0 0 15px 5px rgba(0, 191, 255, 0.6);
    animation: aura-pulse 3s infinite ease-in-out;
    border-color: #00bfff !important;
}

.aura-enrage {
    box-shadow: 0 0 20px 8px rgba(255, 0, 0, 0.7);
    animation: aura-shake 0.1s infinite;
    border-color: #ff0000 !important;
}

@keyframes aura-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes aura-shake {
    0% {
        transform: translate(1px, 1px);
    }

    50% {
        transform: translate(-1px, -1px);
    }

    100% {
        transform: translate(1px, -1px);
    }
}

/* PARTICLES */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    font-size: 24px;
    animation: particle-fly 1.5s forwards ease-out;
}

@keyframes particle-fly {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
        opacity: 0;
    }
}

/* GOLD RUSH */
.coin-anim {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ffd700;
    border-radius: 50%;
    border: 1px solid #b8860b;
    z-index: 3000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #b8860b;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

#app-container {
    width: 95%;
    height: 95%;
    max-width: 1600px;
    display: grid;
    grid-template-columns: 350px 1fr 300px;
    grid-template-rows: 80px 1fr 120px;
    gap: 16px;
    position: relative;
    z-index: 10;
    /* Ensure UI is on top of background */
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 2px solid #444;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.gold-border {
    border-color: var(--border-gold);
    box-shadow: 0 0 10px rgba(198, 156, 109, 0.2);
}

.top-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(20, 20, 30, 0.6) 50%, rgba(0, 0, 0, 0.8) 100%);
    border-bottom: 2px solid var(--border-gold);
}

.game-title {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: var(--text-gold);
    text-shadow: 2px 2px 4px #000;
}

.location-display {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: #fff;
    text-shadow: 0 0 10px var(--text-gold);
}

.left-panel {
    grid-column: 1;
    grid-row: 2 / 3;
    padding: 16px;
    gap: 16px;
}

.char-portrait {
    width: 100px;
    height: 100px;
    background: #000;
    border: 2px solid var(--border-gold);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    position: relative;
}

.char-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.char-info {
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-name-wow {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--text-gold);
    text-shadow: 2px 2px 4px #000, 0 0 10px rgba(198, 156, 109, 0.5);
    margin: 5px 0;
    font-weight: bold;
    letter-spacing: 1px;
}

@keyframes pulseGold {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
}

.selected-char {
    border-color: #ffd700 !important;
    transform: scale(1.05) translateY(-2px);
    animation: pulseGold 2s infinite ease-in-out;
}

#char-class-desc {
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed #555;
    padding: 10px;
    border-radius: 4px;
}

.class-card:hover {
    transform: scale(1.03);
    border-color: rgba(255, 215, 0, 0.5) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.char-class {
    font-size: 14px;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#pet-info {
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #333;
    border-radius: 4px;
    min-height: 16px;
}

#talent-notice {
    padding: 4px 6px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.bar-container {
    margin-bottom: 12px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
    color: #ccc;
}

.bar-bg {
    background: #111;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    transition: width 0.3s;
}

.hp-fill {
    background: linear-gradient(90deg, #00b300, #1eff00);
}

.xp-fill {
    background: linear-gradient(90deg, #7a00cc, #a335ee);
}

.resource-fill {
    transition: width 0.3s;
    height: 100%;
}

.mana-fill {
    background: linear-gradient(90deg, #0055aa, #0070dd);
}

.energy-fill {
    background: linear-gradient(90deg, #cc9900, #ffd100);
}

.rage-fill {
    background: linear-gradient(90deg, #aa0000, #ff4444);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    color: #ddd;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #333;
}

.stat-val {
    font-weight: bold;
    color: #fff;
    font-size: 15px;
}

/* EQUIPMENT GRID */
.equip-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.equip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    justify-items: center;
}

.equip-slot {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.equip-slot:hover {
    border-color: var(--text-gold);
    background: rgba(255, 255, 255, 0.05);
}

.equip-slot .slot-icon {
    font-size: 18px;
}

.equip-slot.empty::after {
    content: attr(data-slot-label);
    font-size: 8px;
    color: #ffd700;
    text-transform: uppercase;
    text-align: center;
    position: absolute;
    bottom: -15px;
    width: 100%;
}

.slot-bg-icon {
    font-size: 24px;
    opacity: 0.15;
    pointer-events: none;
}

.equip-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.equip-slot .quality-border {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    pointer-events: none;
}

.equip-slot .slot-icon {
    font-size: 20px;
    opacity: 0.3;
}

/* Quality Borders */
.q-poor .quality-border {
    border-color: #9d9d9d;
}

.q-common .quality-border {
    border-color: #ffffff;
}

.q-uncommon .quality-border {
    border-color: #1eff00;
}

.q-rare .quality-border {
    border-color: #0070dd;
}

.q-epic .quality-border {
    border-color: #a335ee;
}

.q-legendary .quality-border {
    border-color: #ff8000;
}

.center-panel {
    grid-column: 2;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Expansion UI */
.talent-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.talent-card.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.talent-card:hover {
    border-color: var(--text-gold);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

/* STATUS EFFECTS UI */
.status-tray {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    min-height: 20px;
}

.status-icon {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
    cursor: help;
}

.dead {
    filter: grayscale(1) opacity(0.5) !important;
    transition: all 0.5s;
}

.dead-label {
    text-decoration: line-through;
    color: #ff4444 !important;
}

.status-icon .duration {
    position: absolute;
    bottom: -4px;
    right: -2px;
    font-size: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0 2px;
    border-radius: 3px;
}

/* MAP SYSTEM */
.map-container {
    width: 100%;
    height: 400px;
    background: #d2b48c;
    background-image: url('assets/world_map.png');
    /* Hier dein generiertes Bild einfügen */
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 4px;
    border: 4px solid #3d2b1f;
    /* Dunkler Holzrahmen */
    outline: 2px solid #ffd700;
    /* Goldene Kante */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 100px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin-top: 10px;
}

.map-pin {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #5d4037;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    animation: pin-float 3s ease-in-out infinite;
}

.map-pin:hover {
    transform: translate(-50%, -50%) scale(1.3);
    background: #fff;
    border-color: #ffd700;
    box-shadow: 0 0 10px #ffd700;
    z-index: 20;
}

.map-pin.current {
    border-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation: pulse-pin 1.5s infinite, pin-float 3s ease-in-out infinite;
}

@keyframes pin-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-2px); }
}

@keyframes pulse-pin {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 0 15px rgba(0, 255, 0, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

.map-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    display: none;
    pointer-events: none;
    transform: translate(-50%, -25px);
    z-index: 11;
}

.map-pin:hover+.map-label {
    display: block;
}

.weather-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* MOBILE ADJUSTMENTS (iPhone 16 / Pro Max) */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        align-items: flex-start;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
    }

    #app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: 100%;
        height: auto;
        padding: 10px;
        gap: 12px;
    }

    .top-bar {
        grid-column: 1;
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 5px;
    }

    .game-title {
        font-size: 20px;
    }

    .location-display {
        font-size: 18px;
    }

    .left-panel,
    .center-panel,
    .right-panel {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        max-width: none;
    }

    #combat-arena {
        height: 200px;
    }

    .portrait-container {
        width: 80px;
        height: 80px;
    }

    .combat-portrait {
        width: 80px;
        height: 80px;
    }

    .vs-label {
        font-size: 24px;
    }

    .console-box {
        height: 300px;
        /* Fixed height for log on mobile */
        font-size: 14px;
    }

    #combat-log {
        height: 150px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 small stats in a row */
    }

    .stat-item {
        padding: 4px;
    }

    .stat-val {
        font-size: 12px;
    }

    .equip-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 slots in a row */
        gap: 5px;
    }

    .equip-slot {
        width: 60px;
        /* Larger touch targets */
        height: 60px;
    }

    /* Touch Friendly Buttons */
    .btn-action,
    .sell-btn,
    #btn-send {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }

    .inv-item {
        padding: 12px;
        min-height: 50px;
        font-size: 14px;
    }

    .sell-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

.console-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #eee;
    text-shadow: 1px 1px 2px #000;
    scrollbar-width: thin;
}

#log-world,
#log-combat {
    min-height: 100%;
}

.log-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid #333;
}

.log-tab {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #555;
    color: #ccc;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0.8px;
}

.log-tab.active {
    color: #ffd700;
    border-color: var(--border-gold);
    box-shadow: 0 0 8px rgba(198, 156, 109, 0.35);
}

.log-pane {
    display: none;
}

.log-pane.active {
    display: block;
}

#combat-log {
    background: rgba(40, 0, 0, 0.4);
    border-top: 1px solid var(--border-gold);
    height: 180px;
    flex: none;
}

.log-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.msg-location {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: var(--text-gold);
    text-align: center;
    margin: 20px 0 10px 0;
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: 5px;
}

.msg-enemy {
    color: #ff4b4b;
    font-weight: bold;
}

.right-panel {
    grid-column: 3;
    grid-row: 2 / 3;
    padding: 16px;
    position: relative;
}

.panel-header {
    font-family: 'Cinzel', serif;
    color: #ddd;
    border-bottom: 1px solid #555;
    padding-bottom: 6px;
    margin-bottom: 10px;
    text-align: center;
}

.inventory-list {
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
}

.inv-item {
    padding: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.inv-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sell-btn {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 10px;
    padding: 2px 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.sell-btn:hover {
    background: #8b0000;
    border-color: #ff4444;
}

/* QUEST TRACKER */
.quest-tracker {
    margin-top: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.quest-title {
    font-weight: bold;
    color: var(--text-gold);
    font-size: 14px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.quest-obj {
    font-size: 12px;
    color: #ccc;
    margin-left: 10px;
}

/* TOOLTIP */
#tooltip {
    position: absolute;
    display: none;
    background: #050510;
    border: 1px solid #888;
    padding: 8px;
    box-shadow: 0 0 10px #000;
    z-index: 99999;
    pointer-events: none;
    width: 200px;
    font-size: 13px;
}

#tooltip .tt-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

#tooltip .tt-type {
    color: #888;
    font-size: 11px;
    margin-bottom: 6px;
}

#tooltip .tt-stat {
    color: #fff;
}

#tooltip .tt-desc {
    color: var(--text-gold);
    font-style: italic;
    margin-top: 8px;
    font-size: 11px;
}



/* ==================== BOTTOM HUD ==================== */
.bottom-area {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 100;
}

.wow-hud {
    display: flex;
    width: 100%;
    height: 100px;
    /* Slimmed down slightly */
    background: linear-gradient(0deg, #0c0c0c 0%, #1a1a1a 100%);
    border-top: 2px solid var(--border-gold);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    position: relative;
    padding: 0 20px;
    align-items: center;
    gap: 15px;
}

.hud-right-container {
    margin-left: 140px;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    /* Push actions down slightly by giving XP bar its own space */
}

.exp-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(0, 0, 0, 0.85);
    position: relative;
    border: 1px solid #333;
    border-bottom: none;
    overflow: hidden;
    cursor: pointer;
    z-index: 100;
}

.exp-bar-fill {
    height: 100%;
    background: #ff0000;
    /* Requested Red color */
    width: 0%;
    transition: width 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.2);
}

.exp-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #ffd700;
    text-shadow: 1px 1px 2px #000;
    font-weight: bold;
    pointer-events: none;
    letter-spacing: 1px;
}

.hud-portrait {
    width: 130px;
    height: 130px;
    background: #000;
    border: 3px solid var(--border-gold);
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    left: 20px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(198, 156, 109, 0.5);
    z-index: 101;
}

.hud-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.hud-actions {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border: 1px solid #333;
    border-radius: 0 0 4px 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

#action-bar-skills {
    background: rgba(0, 0, 0, 0.25);
    border-style: dashed;
}

.action-btn {
    width: 50px;
    height: 50px;
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    position: relative;
    transition: all 0.1s;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.action-btn:hover {
    border-color: var(--text-gold);
    box-shadow: 0 0 10px var(--text-gold);
    transform: translateY(-2px);
}

.action-btn .icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
}

.action-btn.icon-warrior { border-color: #b78a5a; }
.action-btn.icon-rogue { border-color: #c0a800; }
.action-btn.icon-mage { border-color: #5bb2ff; }
.action-btn.icon-hunter { border-color: #8cc36a; }
.action-btn.icon-priest { border-color: #e6e6e6; }
.action-btn.icon-warlock { border-color: #9a79c7; }
.action-btn.icon-druid { border-color: #ff9a3d; }
.action-btn.icon-shaman { border-color: #4aa0ff; }
.action-btn.icon-paladin { border-color: #f4a4c6; }
.action-btn.icon-dk { border-color: #c44747; }

.action-btn.vfx-fire .icon { box-shadow: inset 0 0 10px rgba(255, 120, 0, 0.35), 0 0 8px rgba(255, 120, 0, 0.3); }
.action-btn.vfx-frost .icon { box-shadow: inset 0 0 10px rgba(120, 200, 255, 0.35), 0 0 8px rgba(120, 200, 255, 0.3); }
.action-btn.vfx-shadow .icon { box-shadow: inset 0 0 10px rgba(140, 80, 255, 0.35), 0 0 8px rgba(140, 80, 255, 0.3); }
.action-btn.vfx-poison .icon { box-shadow: inset 0 0 10px rgba(80, 200, 120, 0.35), 0 0 8px rgba(80, 200, 120, 0.3); }
.action-btn.vfx-holy .icon { box-shadow: inset 0 0 10px rgba(255, 230, 140, 0.35), 0 0 8px rgba(255, 230, 140, 0.3); }
.action-btn.vfx-hit .icon { box-shadow: inset 0 0 10px rgba(255, 90, 90, 0.35), 0 0 8px rgba(255, 90, 90, 0.3); }
.action-btn.vfx-execute .icon { box-shadow: inset 0 0 12px rgba(255, 40, 40, 0.4), 0 0 10px rgba(255, 40, 40, 0.35); }
.action-btn.vfx-arrow .icon { box-shadow: inset 0 0 10px rgba(200, 180, 120, 0.35), 0 0 8px rgba(200, 180, 120, 0.3); }

.action-btn.disabled {
    opacity: 0.5;
    filter: grayscale(0.6);
    cursor: not-allowed;
}

.action-btn .cost {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 3px;
    padding: 0 3px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.action-btn.cost-mana .cost {
    color: #7ec8ff;
    border-color: rgba(126, 200, 255, 0.5);
    background: rgba(20, 60, 90, 0.65);
}

.action-btn.cost-rage .cost {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(90, 20, 20, 0.65);
}

.action-btn.cost-energy .cost {
    color: #ffe066;
    border-color: rgba(255, 224, 102, 0.5);
    background: rgba(90, 80, 20, 0.65);
}

.action-btn .cooldown {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 3px;
    display: none;
    transform-origin: bottom center;
}

.action-btn.on-cooldown .cooldown {
    display: block;
    animation: cooldownPulse 1.2s ease-in-out infinite;
}

.action-btn .cooldown-sweep {
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: conic-gradient(
        rgba(0, 0, 0, 0.7) 0deg,
        rgba(0, 0, 0, 0.7) var(--cd-angle, 0deg),
        rgba(0, 0, 0, 0) var(--cd-angle, 0deg),
        rgba(0, 0, 0, 0) 360deg
    );
    display: none;
    pointer-events: none;
}

.action-btn.on-cooldown .cooldown-sweep {
    display: block;
}

.action-btn .cooldown-text {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffd700;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

.action-btn.on-cooldown .cooldown-text {
    display: flex;
}

@keyframes cooldownPulse {
    0%, 100% { box-shadow: inset 0 0 0 rgba(255, 215, 0, 0.0); }
    50% { box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.25); }
}

.action-btn .btn-tooltip {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #ffd700;
    padding: 5px 10px;
    border: 1px solid #c69c6d;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 1000;
}

.action-btn:hover .btn-tooltip {
    opacity: 1;
}

.hud-btn {
    width: 50px;
    height: 50px;
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    position: relative;
    transition: all 0.1s;
}

.hud-btn:hover {
    border-color: var(--text-gold);
    box-shadow: 0 0 10px var(--text-gold);
    transform: translateY(-2px);
}

.hud-btn .btn-tooltip {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #ffd700;
    padding: 5px 10px;
    border: 1px solid #c69c6d;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 1000;
}

.hud-btn:hover .btn-tooltip {
    opacity: 1;
}

.hud-input-wrapper {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}

.chat-input {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #555;
    color: #ffd700;
    padding: 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
}

/* Combat Animations */
.animate-shake {
    animation: shake 0.5s;
}

@keyframes flash-red {
    0% {
        filter: brightness(1) sepia(0) saturate(1) hue-rotate(0deg);
    }

    50% {
        filter: brightness(1.5) sepia(1) saturate(5) hue-rotate(-50deg);
    }

    100% {
        filter: brightness(1) sepia(0) saturate(1) hue-rotate(0deg);
    }
}

.animate-flash {
    animation: flash-red 0.5s;
}

.menu-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
    font-family: 'Cinzel', serif;
}

.menu-btn:hover {
    color: #fff;
    border-color: #fff;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

/* LOOT CHEST */
@keyframes chestOpen {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotateX(0deg);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05) rotateX(5deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes chestShine {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), inset 0 0 20px rgba(255, 215, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.2);
    }
}

@keyframes chestWiggle {
    0% {
        transform: scale(1) rotate(0deg);
    }

    25% {
        transform: scale(1.1) rotate(5deg);
    }

    50% {
        transform: scale(1.1) rotate(-5deg);
    }

    75% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.chest-wiggle {
    animation: chestWiggle 0.8s infinite ease-in-out;
}

#loot-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: linear-gradient(135deg, #2a1810 0%, #1a0f08 100%);
    border: 3px solid #8B6914;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.3);
    animation: chestOpen 0.5s ease-out, chestShine 2s ease-in-out infinite;
}

.loot-header {
    background: linear-gradient(180deg, #8B6914 0%, #6B5010 100%);
    padding: 12px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    text-align: center;
    color: #FFD700;
    font-size: 16px;
    text-shadow: 2px 2px 4px #000;
    border-bottom: 2px solid #FFD700;
    border-radius: 5px 5px 0 0;
}

.loot-body {
    padding: 15px;
    background: linear-gradient(180deg, rgba(42, 24, 16, 0.9) 0%, rgba(26, 15, 8, 0.9) 100%);
}

.loot-item {
    padding: 10px;
    border: 2px solid #6B5010;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    transition: all 0.2s;
}

.loot-item:hover {
    background: rgba(139, 105, 20, 0.3);
    border-color: #FFD700;
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.loot-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4a3820 0%, #2a1f10 100%);
    border: 2px solid #8B6914;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.loot-close {
    text-align: center;
    padding: 10px;
    background: linear-gradient(180deg, #6B5010 0%, #4a3510 100%);
    cursor: pointer;
    color: #FFD700;
    font-size: 13px;
    font-weight: bold;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #8B6914;
    transition: all 0.2s;
}

.loot-close:hover {
    background: linear-gradient(180deg, #8B6914 0%, #6B5010 100%);
    color: #FFF;
}

/* Modals */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.hidden {
    display: none !important;
}

.wow-modal {
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    background: #111;
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    color: #eee;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-header {
    background: linear-gradient(90deg, #222, #333, #222);
    padding: 12px 16px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--text-gold);
    border-bottom: 1px solid #444;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 16px;
    background: #151515;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #333;
}

.modal-btn {
    background: #7a0000;
    color: #fff;
    border: 1px solid #a00;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.modal-btn.primary {
    background: #004a99;
    border-color: #0066cc;
}

.q-poor {
    color: var(--q-poor);
    border-color: var(--q-poor);
}

.q-common {
    color: var(--q-common);
    border-color: var(--q-common);
}

.q-uncommon {
    color: var(--q-uncommon);
    border-color: var(--q-uncommon);
}

.q-rare {
    color: var(--q-rare);
    border-color: var(--q-rare);
}

.q-epic {
    color: var(--q-epic);
    border-color: var(--q-epic);
}

.q-legendary {
    color: var(--q-legendary);
    border-color: var(--q-legendary);
}

/* ANIMATIONS */
@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) scale(1.5);
        opacity: 0;
    }
}

.floating-text {
    position: absolute;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    font-weight: bold;
    text-shadow: 2px 2px 2px #000;
    z-index: 9999;
    font-family: 'Cinzel', serif;
}

.shake-effect {
    animation: shake 0.5s;
}

/* Particles */
/* INTRO OVERLAY */
.mystic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.mystic-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.mystic-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    border: 2px solid transparent;
    border-image: linear-gradient(to bottom, #c69c6d, #4d3319) 1;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    box-shadow: 0 0 50px rgba(198, 156, 109, 0.2);
    animation: fadeIn 2s ease-in-out;
    position: relative;
}

.mystic-title {
    font-family: 'Cinzel', serif;
    font-size: 4em;
    color: #ffd700;
    text-shadow: 0 0 10px #ffaa00;
    margin-bottom: 20px;
    letter-spacing: 5px;
    animation: glowPulse 3s infinite alternate;
}

.mystic-text {
    font-family: 'Lato', sans-serif;
    font-size: 1.2em;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 40px;
    font-style: italic;
}

.mystic-btn {
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
    padding: 15px 40px;
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.mystic-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 20px #ffd700;
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    from {
        text-shadow: 0 0 10px #ffaa00;
    }

    to {
        text-shadow: 0 0 25px #ffaa00, 0 0 10px #fff;
    }
}

/* SKILL TREE OVERHAUL (WoW Classic Style) */
.talent-tree {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #3d2b1f;
    border-radius: 4px;
}

.talent-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.talent-card {
    width: 60px;
    height: 60px;
    background: #000;
    border: 2px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
}

.talent-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 15px #ffd700;
}

.talent-card.active {
    border-color: #ffd700;
}

.talent-card .rank-tag {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #111;
    border: 1px solid #ffd700;
    color: #ffd700;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.talent-card.maxed {
    border-color: #ff8000;
}

.talent-card.maxed .rank-tag {
    color: #ff8000;
    border-color: #ff8000;
}

.talent-card .icon {
    font-size: 30px;
}

/* Tooltip modification for Talents */
.talent-tooltip {
    text-align: left;
}

.talent-tooltip .name {
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
}

.talent-tooltip .rank {
    color: #fff;
    font-size: 12px;
    margin: 4px 0;
}

.talent-tooltip .desc {
    color: #ccc;
    font-style: italic;
    font-size: 11px;
}

.talent-card-classic:hover {
    border-color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.talent-card-classic.locked:hover {
    border-color: #ff4444 !important;
    background: rgba(255, 0, 0, 0.05) !important;
}

/* INVENTORY GRID */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.inv-slot {
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    transition: 0.1s;
}

.inv-slot:hover {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.05);
}

.inv-slot .count-tag {
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

.inv-slot.q-poor {
    border-color: #9d9d9d;
}

.inv-slot.q-common {
    border-color: #fff;
}

.inv-slot.q-uncommon {
    border-color: #1eff00;
}

.inv-slot.q-rare {
    border-color: #0070dd;
}

.inv-slot.q-epic {
    border-color: #a335ee;
}

.inv-slot.q-legendary {
    border-color: #ff8000;
}

.item-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.item-icon.q-poor {
    color: #9d9d9d;
}

.item-icon.q-common {
    color: #ffffff;
}

.item-icon.q-uncommon {
    color: #1eff00;
    text-shadow: 0 0 5px #1eff00;
}

.item-icon.q-rare {
    color: #0070dd;
    text-shadow: 0 0 5px #0070dd;
}

.item-icon.q-epic {
    color: #a335ee;
    text-shadow: 0 0 8px #a335ee;
}

.item-icon.q-legendary {
    color: #ff8000;
    text-shadow: 0 0 10px #ff8000;
}
