/* ==========================================
   SOULBOUND - Main Stylesheet
   Charte Graphique: Fantasy médiévale mature
   ========================================== */
 
/* === Import Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Merriweather+Sans:wght@400;700&family=Press+Start+2P&display=swap');

/* === CSS Variables - Color Palette === */
:root {
    /* Primary Colors */
    --gold-primary: #D8A23D;
    --gold-dark: #8C5A21;
    --gold-light: #F5D77B;
    --blue-magic: #4FC4FF;
    --blue-light: #9AE8FF;

    /* Secondary Colors */
    --stone-gray: #3E4655;
    --wood-brown: #7A4F2F;
    --grass-green: #6DAE55;
    --mountain-gray: #6B6D70;
    --sea-blue: #1C2F4A;

    /* Accent Colors */
    --danger-red: #9C2B2B;
    --danger-light: #c94444;

    /* UI Colors */
    --bg-dark: #0B1A28;
    --bg-panel: #0B1A28CC;
    --text-primary: #F0E6D3;
    --text-secondary: #A0A0A0;

    /* Fonts */
    --font-title: 'Cinzel Decorative', serif;
    --font-body: 'Merriweather Sans', sans-serif;
    --font-pixel: 'Press Start 2P', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ==========================================
   Screens
   ========================================== */

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, #0B1A28 0%, #050d14 100%);
}

.screen.active {
    display: flex;
}

/* Home Screen with Video Background */
#home-screen {
    position: relative;
    overflow: hidden;
}

#home-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    opacity: 0;
    animation: videoFadeIn 2s ease-in-out 2s forwards;
}

@keyframes videoFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.6;
    }
}

.home-container {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: menuFadeIn 1s ease-in-out 3.5s forwards;
    opacity: 0;
}

@keyframes menuFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-container .game-title {
    animation: logoFadeIn 1.5s ease-in-out 2.5s forwards;
    opacity: 0;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   Loading Screen
   ========================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-container {
    text-align: center;
}

.loading-logo {
    width: 300px;
    margin-bottom: 40px;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(79, 196, 255, 0.3));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(216, 162, 61, 0.5));
        transform: scale(1.02);
    }
}

.loading-bar-container {
    width: 300px;
    margin: 0 auto;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: var(--sea-blue);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
}

.loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-magic), var(--gold-primary));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--blue-magic);
}

.loading-text {
    display: block;
    margin-top: 15px;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Runes background pattern */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(79, 196, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(216, 162, 61, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ==========================================
   Home Screen
   ========================================== */

.home-container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.game-title {
    font-family: var(--font-title);
    font-size: 4rem;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(216, 162, 61, 0.5);
    margin-bottom: 2rem;
    letter-spacing: 0.3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.game-title img {
    filter: drop-shadow(0 0 20px rgba(79, 196, 255, 0.4));
}

.language-selector {
    margin-bottom: 2rem;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--stone-gray);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    border-radius: 4px;
}

.lang-btn:hover,
.lang-btn.active {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(216, 162, 61, 0.1);
    box-shadow: 0 0 15px rgba(216, 162, 61, 0.3);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-buttons button {
    background: linear-gradient(135deg, var(--bg-dark), var(--sea-blue));
    border: 2px solid var(--gold-primary);
    color: var(--text-primary);
    padding: 1rem 3rem;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.menu-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(216, 162, 61, 0.2), transparent);
    transition: left 0.5s;
}

.menu-buttons button:hover::before {
    left: 100%;
}

.menu-buttons button:hover {
    background: linear-gradient(135deg, var(--sea-blue), var(--bg-dark));
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(216, 162, 61, 0.4), inset 0 0 20px rgba(79, 196, 255, 0.1);
}

/* ==========================================
   Options Screen
   ========================================== */

.options-container {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid var(--gold-primary);
    min-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(216, 162, 61, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Rune corners */
.options-container::before,
.options-container::after {
    content: '◈';
    position: absolute;
    color: var(--gold-primary);
    opacity: 0.5;
    font-size: 1.2rem;
}

.options-container::before {
    top: 10px;
    left: 10px;
}

.options-container::after {
    bottom: 10px;
    right: 10px;
}

.options-container h2 {
    font-family: var(--font-title);
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(216, 162, 61, 0.3);
}

.option-group {
    margin: 1.5rem 0;
    text-align: left;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.option-group input[type="range"] {
    width: 75%;
    margin-right: 1rem;
    accent-color: var(--gold-primary);
    background: var(--stone-gray);
    border-radius: 4px;
}

.option-group span {
    color: var(--blue-magic);
    font-weight: bold;
}

.option-group .language-selector {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

#btn-options-back {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: rgba(79, 196, 255, 0.1);
    border: 1px solid var(--blue-magic);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    border-radius: 4px;
    transition: all 0.3s;
}

#btn-options-back:hover {
    background: rgba(79, 196, 255, 0.2);
    box-shadow: 0 0 15px rgba(79, 196, 255, 0.3);
}

/* ==========================================
   Session Screen
   ========================================== */

.session-container,
.join-container,
.disband-container {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid var(--gold-primary);
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 30px rgba(216, 162, 61, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.session-container h2,
.join-container h2 {
    font-family: var(--font-title);
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.join-language {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--stone-gray);
}

.session-url-container {
    display: flex;
    margin: 1rem 0;
}

#session-url {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--stone-gray);
    color: var(--text-primary);
    font-family: var(--font-body);
    border-radius: 4px 0 0 4px;
}

#btn-copy-url {
    padding: 0.75rem 1rem;
    background: var(--gold-primary);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s;
}

#btn-copy-url:hover {
    background: var(--gold-light);
    box-shadow: 0 0 15px rgba(216, 162, 61, 0.5);
}

#waiting-message {
    color: var(--blue-magic);
    font-style: italic;
    margin: 1rem 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

#btn-back-home {
    margin-top: 1rem;
    padding: 0.5rem 2rem;
    background: transparent;
    border: 1px solid var(--stone-gray);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    border-radius: 4px;
    transition: all 0.3s;
}

#btn-back-home:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ==========================================
   Join Screen
   ========================================== */

.soulbound-explanation {
    text-align: left;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(79, 196, 255, 0.05);
    border-left: 3px solid var(--blue-magic);
    border-radius: 0 4px 4px 0;
}

.soulbound-explanation ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.soulbound-explanation li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.confirm-checkbox {
    margin: 1rem 0;
}

.confirm-checkbox input {
    margin-right: 0.5rem;
    accent-color: var(--blue-magic);
}

.confirm-checkbox label {
    color: var(--text-secondary);
}

.join-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.join-buttons button {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    border-radius: 4px;
    transition: all 0.3s;
}

#btn-accept-soulbound {
    background: var(--blue-magic);
    border: none;
    color: var(--bg-dark);
    font-weight: bold;
}

#btn-accept-soulbound:hover:not(:disabled) {
    background: var(--blue-light);
    box-shadow: 0 0 20px rgba(79, 196, 255, 0.5);
}

#btn-accept-soulbound:disabled {
    background: var(--stone-gray);
    cursor: not-allowed;
    opacity: 0.5;
}

#btn-refuse-soulbound {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-light);
}

#btn-refuse-soulbound:hover {
    background: rgba(156, 43, 43, 0.2);
}

/* ==========================================
   Story Screen
   ========================================== */

.story-container {
    max-width: 800px;
    padding: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.story-text {
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    line-height: 2;
    color: var(--text-primary);
    margin-bottom: 2rem;
    min-height: 200px;
    text-shadow: 0 0 10px rgba(79, 196, 255, 0.2);
    transition: opacity 0.3s;
    letter-spacing: 0.05em;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

.story-container button {
    padding: 0.75rem 2rem;
    margin: 0 0.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    background: rgba(216, 162, 61, 0.1);
    border: 1px solid var(--gold-primary);
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.3s;
}

.story-container button:hover {
    background: rgba(216, 162, 61, 0.2);
    box-shadow: 0 0 15px rgba(216, 162, 61, 0.3);
}

/* ==========================================
   Player Name Screen
   ========================================== */

#name-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.name-container {
    max-width: 500px;
    width: 90%;
    padding: 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(42, 42, 70, 0.95) 100%);
    border-radius: 12px;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 30px rgba(216, 162, 61, 0.3), inset 0 0 30px rgba(79, 196, 255, 0.1);
}

.name-container h2 {
    font-family: var(--font-body);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(79, 196, 255, 0.3);
}

#player-name-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-family: var(--font-body);
    background: rgba(50, 50, 70, 0.8);
    border: 2px solid var(--blue-magic);
    border-radius: 8px;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s;
    box-sizing: border-box;
}

#player-name-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(50, 50, 70, 1);
    box-shadow: 0 0 20px rgba(216, 162, 61, 0.4), inset 0 0 10px rgba(216, 162, 61, 0.1);
}

#player-name-input::placeholder {
    color: rgba(200, 200, 200, 0.5);
}

#btn-confirm-name {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: var(--font-body);
    background: linear-gradient(135deg, rgba(216, 162, 61, 0.2) 0%, rgba(245, 215, 123, 0.1) 100%);
    border: 2px solid var(--gold-primary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

#btn-confirm-name:hover {
    background: linear-gradient(135deg, rgba(216, 162, 61, 0.4) 0%, rgba(245, 215, 123, 0.2) 100%);
    box-shadow: 0 0 25px rgba(216, 162, 61, 0.6), inset 0 0 15px rgba(216, 162, 61, 0.2);
    transform: scale(1.02);
}

#btn-confirm-name:active {
    transform: scale(0.98);
}

/* ==========================================
   Game Screen & Canvas
   ========================================== */

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* ==========================================
   HUD
   ========================================== */

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hud > * {
    pointer-events: auto;
}

/* Coordinates */
#coordinates {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-panel);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid var(--gold-dark);
}

#coordinates span {
    margin: 0 0.5rem;
    color: var(--gold-light);
}

/* Souldak Currency Display */
#souldak-display {
    position: absolute;
    top: 60px;
    right: 10px;
    background: linear-gradient(135deg, rgba(245, 210, 123, 0.1), rgba(245, 210, 123, 0.05));
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--gold-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    color: var(--gold-primary);
}

#souldak-icon {
    font-size: 1.2rem;
}

#souldak-amount {
    color: var(--gold-light);
    font-size: 1rem;
}

/* Stats bars */
#player-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 200px;
}

.stat-bar {
    height: 22px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
}

.stat-bar.small {
    height: 14px;
}

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

.hp-fill {
    background: linear-gradient(90deg, #6B2020, var(--danger-red), var(--danger-light));
    width: 100%;
}

.xp-fill {
    background: linear-gradient(90deg, #4a2c7a, #8b5cf6, var(--blue-magic));
    width: 0%;
}

.fatigue-fill {
    background: linear-gradient(90deg, #1a3a5c, var(--blue-magic), var(--blue-light));
    width: 100%;
}

.stat-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-weight: bold;
}

/* Partner stats */
#partner-stats {
    position: absolute;
    top: 65px;
    left: 10px;
    background: var(--bg-panel);
    padding: 0.5rem;
    border-radius: 4px;
    width: 150px;
    border: 1px solid var(--stone-gray);
}

#partner-name {
    font-size: 0.75rem;
    color: var(--blue-magic);
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

/* Fatigue bar */
#fatigue-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background: var(--bg-panel);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--blue-magic);
    box-shadow: 0 0 30px rgba(79, 196, 255, 0.3);
}

/* Quick inventory */
#quick-inventory {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: var(--bg-panel);
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--gold-dark);
}

.inv-slot {
    width: 50px;
    height: 50px;
    background: rgba(62, 70, 85, 0.8);
    border: 2px solid var(--stone-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.inv-slot:hover {
    border-color: var(--blue-magic);
    box-shadow: 0 0 10px rgba(79, 196, 255, 0.3);
}

.inv-slot.selected {
    border-color: var(--gold-primary);
    background: rgba(200, 200, 200, 0.4);
    box-shadow: 0 0 20px rgba(216, 162, 61, 0.8), inset 0 0 10px rgba(216, 162, 61, 0.3);
    transform: scale(1.05);
}

.inv-slot.drag-over {
    border-color: var(--gold-primary);
    background: rgba(216, 162, 61, 0.3);
    box-shadow: 0 0 15px rgba(216, 162, 61, 0.6), inset 0 0 8px rgba(216, 162, 61, 0.2);
}

.inv-slot .item-icon {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.inv-slot .item-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.7rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-weight: bold;
}

/* ==========================================
   Full Inventory
   ========================================== */

#full-inventory {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--gold-primary);
    border-radius: 8px;
    padding: 1rem;
    min-width: 450px;
    box-shadow: 0 0 40px rgba(216, 162, 61, 0.3);
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gold-dark);
}

.inventory-header h3 {
    font-family: var(--font-title);
    color: var(--gold-primary);
}

#btn-close-inventory {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

#btn-close-inventory:hover {
    color: var(--danger-light);
}

#inventory-grid {
    display: grid;
    grid-template-columns: repeat(9, 50px);
    gap: 4px;
}

/* Drop Item Modal */
#drop-item-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--danger-red);
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 300px;
    box-shadow: 0 0 40px rgba(156, 43, 43, 0.3);
    z-index: 100;
}

.drop-item-container h3 {
    font-family: var(--font-title);
    color: var(--danger-red);
    margin-top: 0;
    margin-bottom: 1rem;
}

.drop-item-content {
    margin-bottom: 1.5rem;
}

#drop-item-name {
    font-size: 1rem;
    color: var(--gold-primary);
    font-weight: bold;
    margin: 0 0 1rem 0;
}

.drop-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drop-item-quantity label {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 80px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    background: var(--danger-red);
    border: 1px solid var(--danger-light);
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--danger-light);
    transform: scale(1.05);
}

#drop-quantity {
    width: 60px;
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--danger-red);
    border-radius: 4px;
    color: white;
    text-align: center;
    font-weight: bold;
}

#drop-quantity:focus {
    outline: none;
    border-color: var(--danger-light);
    box-shadow: 0 0 5px rgba(156, 43, 43, 0.5);
}

.drop-item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

#btn-confirm-drop {
    background: var(--danger-red);
    border: 1px solid var(--danger-light);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

#btn-confirm-drop:hover {
    background: var(--danger-light);
    transform: scale(1.05);
}

#btn-cancel-drop {
    background: transparent;
    border: 1px solid var(--stone-gray);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

#btn-cancel-drop:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Character Stats Modal */
#character-stats-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--blue-magic);
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 350px;
    box-shadow: 0 0 40px rgba(79, 196, 255, 0.3);
    z-index: 100;
}

.character-stats-container {
    color: var(--text-primary);
}

.character-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--blue-magic);
    position: relative;
}

.character-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--blue-magic), var(--blue-light));
    border-radius: 4px;
    border: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.character-header h3 {
    flex: 1;
    margin: 0;
    font-family: var(--font-title);
    color: var(--blue-magic);
    font-size: 1.3rem;
}

#btn-close-stats {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

#btn-close-stats:hover {
    color: var(--danger-light);
}

.character-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 3px solid var(--blue-magic);
}

.stat-label {
    font-weight: 600;
    color: var(--gold-primary);
    font-size: 0.95rem;
}

.stat-value {
    color: var(--blue-light);
    font-weight: bold;
    font-size: 0.95rem;
}

/* ==========================================
   Chat
   ========================================== */

#chat-container {
    position: absolute;
    bottom: 70px;
    left: 10px;
    width: 300px;
    background: var(--bg-panel);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
}

#chat-messages {
    height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.chat-message {
    margin-bottom: 0.4rem;
    padding: 0.2rem 0;
    line-height: 1.4;
}

.chat-time {
    color: var(--stone-gray);
    font-size: 0.65rem;
    margin-right: 0.3rem;
}

.chat-sender {
    color: var(--blue-magic);
    font-weight: bold;
    margin-right: 0.3rem;
}

.chat-text {
    color: var(--text-primary);
}

/* Loot messages */
.chat-loot .chat-sender {
    color: var(--gold-primary);
}

.chat-loot .chat-text {
    color: var(--gold-light);
    font-weight: 500;
}

/* System messages */
.chat-system .chat-sender {
    color: var(--grass-green);
}

/* Combat messages */
.chat-combat .chat-sender {
    color: var(--danger-red);
}

#chat-input-container {
    display: flex;
    border-top: 1px solid var(--stone-gray);
}

#chat-input {
    flex: 1;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
}

#chat-input::placeholder {
    color: var(--stone-gray);
}

#btn-send-chat {
    padding: 0.5rem 1rem;
    background: var(--blue-magic);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#btn-send-chat:hover {
    background: var(--blue-light);
}

/* ==========================================
   Dialog Box
   ========================================== */

#dialog-box {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    border: 2px solid var(--gold-primary);
    border-radius: 8px;
    padding: 1.5rem;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 0 30px rgba(216, 162, 61, 0.2);
}

/* Rune corners for dialog */
#dialog-box::before,
#dialog-box::after {
    content: '⬥';
    position: absolute;
    color: var(--gold-primary);
    opacity: 0.6;
}

#dialog-box::before {
    top: 8px;
    left: 12px;
}

#dialog-box::after {
    top: 8px;
    right: 12px;
}

#dialog-speaker {
    font-family: var(--font-title);
    color: var(--gold-primary);
    font-weight: bold;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

#dialog-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

#btn-dialog-next {
    float: right;
    padding: 0.5rem 1.5rem;
    background: rgba(79, 196, 255, 0.1);
    border: 1px solid var(--blue-magic);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    border-radius: 4px;
    transition: all 0.3s;
}

#btn-dialog-next:hover {
    background: rgba(79, 196, 255, 0.2);
    box-shadow: 0 0 10px rgba(79, 196, 255, 0.3);
}

/* ==========================================
   System Messages
   ========================================== */

#system-messages {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.system-message {
    background: linear-gradient(135deg, rgba(79, 196, 255, 0.9), rgba(154, 232, 255, 0.9));
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    color: var(--bg-dark);
    font-weight: bold;
    animation: fadeInOut 3s ease-in-out forwards;
    box-shadow: 0 0 20px rgba(79, 196, 255, 0.5);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================
   Soulbound Animation
   ========================================== */

#soulbound-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 26, 40, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#soulbound-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
}

#soulbound-message {
    position: relative;
    z-index: 1001;
    font-family: var(--font-title);
    font-size: 1.8rem;
    background: linear-gradient(180deg, var(--blue-light), var(--blue-magic));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(79, 196, 255, 0.8);
    text-align: center;
    padding: 2rem;
}

/* ==========================================
   Disband Screen
   ========================================== */

.disband-container h2 {
    font-family: var(--font-title);
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.disband-warning {
    color: var(--danger-light);
    font-weight: bold;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(156, 43, 43, 0.2);
    border: 1px solid var(--danger-red);
    border-radius: 4px;
}

.disband-choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.disband-choices button {
    padding: 1rem 2rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

#btn-break-soulbound {
    background: var(--danger-red);
    border: none;
    color: white;
}

#btn-break-soulbound:hover {
    background: var(--danger-light);
    box-shadow: 0 0 20px rgba(156, 43, 43, 0.5);
}

#btn-keep-soulbound {
    background: var(--blue-magic);
    border: none;
    color: var(--bg-dark);
    font-weight: bold;
}

#btn-keep-soulbound:hover {
    background: var(--blue-light);
    box-shadow: 0 0 20px rgba(79, 196, 255, 0.5);
}

/* ==========================================
   Utilities
   ========================================== */

.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--stone-gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--bg-panel);
    border: 1px solid var(--gold-primary);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    max-width: 220px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(216, 162, 61, 0.3);
}

.tooltip .item-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.tooltip .item-rarity {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.tooltip .item-desc {
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Rarity colors */
.rarity-common { color: var(--text-secondary); }
.rarity-uncommon { color: var(--grass-green); }
.rarity-rare { color: var(--blue-magic); }
.rarity-epic { color: #a855f7; }
.rarity-legendary { color: var(--gold-primary); }
.rarity-quest { color: #ec4899; }

/* ==========================================
   Glow Effects & Particles
   ========================================== */

.glow-gold {
    box-shadow: 0 0 20px rgba(216, 162, 61, 0.5);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(79, 196, 255, 0.5);
}

/* Floating particles animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Pulse animation for orbs */
@keyframes orbPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--gold-primary);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px var(--gold-light);
    }
}

/* ==========================================
   Sessions Table Styling
   ========================================== */

.sessions-container {
    position: relative;
    background: rgba(11, 26, 40, 0.9);
    border: 2px solid var(--gold-primary);
    border-radius: 8px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 0 30px rgba(216, 162, 61, 0.3);
}

.sessions-container h2 {
    font-family: var(--font-title);
    color: var(--gold-primary);
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
}

.sessions-table-wrapper {
    overflow-y: auto;
    flex: 1;
    border: 1px solid rgba(216, 162, 61, 0.3);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sessions-table thead {
    position: sticky;
    top: 0;
    background: rgba(216, 162, 61, 0.15);
    border-bottom: 2px solid var(--gold-primary);
}

.sessions-table th {
    padding: 12px;
    text-align: left;
    color: var(--gold-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.sessions-table tbody tr {
    border-bottom: 1px solid rgba(216, 162, 61, 0.2);
    transition: background-color 0.2s ease;
}

.sessions-table tbody tr:hover {
    background-color: rgba(216, 162, 61, 0.08);
}

.sessions-table td {
    padding: 14px 12px;
    color: var(--text-primary);
}

.session-id-cell {
    font-family: monospace;
    font-size: 12px;
    color: var(--blue-light);
    word-break: break-all;
}

.session-level-cell {
    text-align: center;
    color: var(--gold-light);
    font-weight: 600;
}

.session-date-cell {
    color: var(--text-secondary);
    font-size: 13px;
}

.session-actions-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-resume-session {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    white-space: nowrap;
}

.btn-resume-session:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(216, 162, 61, 0.3);
}

.btn-delete-session {
    padding: 6px 10px;
    background: rgba(156, 43, 43, 0.4);
    border: 1px solid var(--danger-red);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: var(--danger-light);
}

.btn-delete-session:hover {
    background: rgba(156, 43, 43, 0.7);
    box-shadow: 0 0 10px rgba(156, 43, 43, 0.5);
}

.sessions-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#no-sessions {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px;
}
