:root {
    --gold: #d4af37;
    --gold-light: #f1c40f;
    --red: #c0392b;
    --orange: #d35400;
    --blue: #2980b9;
    --purple: #8e44ad;
    --bg: #0a0a0a;
    --pink: #ff007f;
    --pink-glow: rgba(255, 0, 127, 0.6);
}

* {
    box-sizing: border-box;
}

@keyframes ambientFog {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glowLegendary {
    0% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); border-color: rgba(212, 175, 55, 0.6); }
    50% { box-shadow: 0 0 30px rgba(241, 196, 15, 0.9); border-color: var(--gold-light); }
    100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); border-color: rgba(212, 175, 55, 0.6); }
}

@keyframes glowMythic {
    0% { box-shadow: 0 0 15px rgba(142, 68, 173, 0.4); border-color: #5b2c6f; }
    50% { box-shadow: 0 0 40px rgba(142, 68, 173, 0.9); border-color: #9b59b6; }
    100% { box-shadow: 0 0 15px rgba(142, 68, 173, 0.4); border-color: #5b2c6f; }
}

@keyframes shake {
    0% { transform: translateX(0) rotate(0); }
    20% { transform: translateX(-6px) rotate(-3deg); }
    40% { transform: translateX(6px) rotate(3deg); }
    60% { transform: translateX(-6px) rotate(-3deg); }
    80% { transform: translateX(6px) rotate(3deg); }
    100% { transform: translateX(0) rotate(0); }
}

@keyframes damageFlash {
    0% { box-shadow: inset 0 0 0 rgba(192, 57, 43, 0); }
    20% { box-shadow: inset 0 0 60px 20px rgba(192, 57, 43, 0.7); }
    100% { box-shadow: inset 0 0 0 rgba(192, 57, 43, 0); }
}

@keyframes critFlash {
    0% { filter: drop-shadow(0 0 0 var(--gold)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 30px var(--gold-light)); transform: scale(1.1); }
    100% { filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.6)); transform: scale(1); }
}

@keyframes drawFlip {
    0% { transform: translateY(-40px) scale(0.8) rotateY(-90deg); opacity: 0; filter: brightness(2); }
    100% { transform: translateY(0) scale(1) rotateY(0deg); opacity: 1; filter: brightness(1); }
}

@keyframes floatUpAndFade {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
    80% { opacity: 1; transform: translate(-50%, -40px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60px) scale(0.9); }
}

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

@keyframes glowEternal {
    0% { box-shadow: 0 0 15px rgba(255, 0, 127, 0.4); border-color: #ff007f88; }
    50% { box-shadow: 0 0 40px var(--pink); border-color: var(--pink); }
    100% { box-shadow: 0 0 15px rgba(255, 0, 127, 0.4); border-color: #ff007f88; }
}

body {
    background: linear-gradient(-45deg, #050505, #111418, #0a0a0c, #1a1525);
    background-size: 400% 400%;
    animation: ambientFog 15s ease infinite;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

h1 {
    margin: 5px 0;
    font-size: 1.2rem;
    text-align: center;
    color: var(--gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 40px 20px;
}

.fullscreen-menu::before,
.fullscreen-menu::after {
    content: "";
    margin: auto;
}

.main-menu-btn {
    display: block;
    width: 350px;
    padding: 15px;
    margin: 10px auto;
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.main-menu-btn:hover:not(:disabled) {
    background: var(--gold);
    color: black;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.main-menu-btn:disabled {
    border-color: #333;
    color: #555;
    cursor: not-allowed;
}

.setup-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    width: 100%;
    margin-top: 10px;
}

.aura-eternal {
    animation: glowEternal 3s infinite ease-in-out;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 140px);
    gap: 15px;
    justify-content: center;
    align-content: start;
}

.hero-card {
    cursor: pointer;
    border: 2px solid #333;
    border-radius: 8px;
    transition: all 0.3s;
    opacity: 0.5;
    background: var(--bg);
    width: 140px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.hero-card:hover {
    opacity: 0.8;
    border-color: var(--gold-light);
    transform: translateY(-5px);
}

.hero-card.active {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transform: scale(1.05);
    z-index: 10;
}

.hero-card img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

.hero-info-panel {
    width: 320px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

#game-container {
    display: none;
    grid-template-columns: 1fr 320px;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.board {
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 15px;
    border: 1px solid #333;
    padding: 15px;
}

.cagnotte {
    text-align: center;
    padding: 5px;
    border: 1px solid var(--gold);
    border-radius: 10px;
    margin-bottom: 10px;
    background: black;
}

#score-cagnotte {
    font-size: 1.8rem;
    color: var(--gold-light);
    font-weight: bold;
}

.card-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.card {
    width: 150px;
    height: 220px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 40%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.9);
    border-color: var(--gold-light);
    z-index: 100;
}

#active-card:hover {
    transform: translateY(-12px) scale(1.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
    z-index: 200;
}

.card-stats {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
    font-family: 'Cinzel', serif;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.aura-legendary {
    animation: glowLegendary 2.5s infinite ease-in-out;
}

.aura-mythic {
    animation: glowMythic 3s infinite ease-in-out;
}

.safe-loot-label {
    font-size: 0.8rem;
    color: #2ecc71;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-label {
    font-size: 0.7rem;
    font-weight: bold;
    margin-top: -5px;
}

.pv {
    color: #ff4d4d;
}

.atk {
    color: #4d94ff;
}

.shield-icon {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.8));
    z-index: 20;
}

#log-container {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(20, 20, 22, 0.95) 0%, rgba(10, 10, 12, 0.8) 100%);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: 2px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    min-height: 0;
    overflow: hidden;
}

.log-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 12px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: var(--gold-light);
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

#log {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #ddd;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.log-entry {
    margin-bottom: 10px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
    padding-left: 10px;
    padding-bottom: 5px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

.log-monster { color: #ff7675; font-weight: bold; }
.log-loot { color: #2ecc71; font-weight: bold; }
.log-equip { color: #3498db; font-weight: bold; }
.log-nihilith { color: #9b59b6; font-weight: bold; }
.log-crit { color: #f1c40f; font-weight: bold; }

#log::-webkit-scrollbar { width: 6px; }
#log::-webkit-scrollbar-track { background: transparent; }
#log::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
#log::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: auto;
}

.controls button {
    padding: 14px 28px;
    font-weight: 800;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    background-size: 200% auto; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.3); 
    border: 1px solid;
    z-index: 1;
}

#btn-explore {
    background-image: linear-gradient(to right, #d4af37 0%, #f1c40f 50%, #d4af37 100%);
    color: #111;
    border-color: #fff;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.6);
}

#btn-attack {
    background-image: linear-gradient(to right, #8e1c10 0%, #e74c3c 50%, #8e1c10 100%);
    color: white;
    border-color: #ff9ff3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.3);
}

#btn-retreat {
    background-image: linear-gradient(to right, #1a5276 0%, #3498db 50%, #1a5276 100%);
    color: white;
    border-color: #81ecec;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.3);
}

#btn-abandon {
    background-image: linear-gradient(to right, #111 0%, #333 50%, #111 100%);
    color: #aaa;
    border-color: #555;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

#btn-survive { background-image: linear-gradient(to right, #5b2c6f 0%, #9b59b6 50%, #5b2c6f 100%); color: white; border-color: #d2b4de; }
#btn-mio-power { background-image: linear-gradient(to right, #1a5276 0%, #3498db 50%, #1a5276 100%); color: white; border-color: #81ecec; }
#btn-nymeria-power { background-image: linear-gradient(to right, #ba4a00 0%, #e67e22 50%, #ba4a00 100%); color: white; border-color: #f5cba7; }

.controls button:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.controls button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.8), inset 0 4px 8px rgba(0,0,0,0.6);
}

.controls button:disabled {
    background: #1a1a1a !important;
    color: #444 !important;
    border-color: #222 !important;
    box-shadow: none !important;
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 4000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.location-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.loc-card {
    background: linear-gradient(135deg, #111 0%, #1a1a1d 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    width: 200px;
    position: relative;
    overflow: hidden;
}

.loc-card:hover:not(.locked) {
    border-color: var(--gold-light);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2);
    filter: brightness(1.1);
}

.loc-card:active:not(.locked) {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.8), inset 0 2px 4px rgba(0,0,0,0.5);
}

.loc-card h3 {
    color: #fff;
    margin: 0 0 8px 0;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,1);
}

.loc-card-main {
    width: 100%;
    max-width: 415px;
    background: linear-gradient(135deg, #111 0%, #1a1a1d 100%);
    border-color: rgba(46, 204, 113, 0.3);
}

.loc-card-main h3 {
    color: #fff;
}

.loc-card-main p {
    color: #2ecc71;
    font-weight: bold;
}

.loc-card-main:hover {
    border-color: #2ecc71;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(46, 204, 113, 0.2);
}

.loc-card-rule strong {
    color: #e74c3c;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
    display: block;
}

.loc-card-rule p {
    color: #aaa;
}

.loc-card-rule:hover {
    border-color: #e74c3c;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(192, 57, 43, 0.2);
}

.loc-card[onclick^="alert("] {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(100%);
    border-color: #333 !important;
    background: #111 !important;
}

.loc-card[onclick^="alert("]:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    filter: grayscale(100%);
}

.loc-card[onclick^="alert("] h3,
.loc-card[onclick^="alert("] p {
    color: #666 !important;
}

.curse-label {
    font-size: 0.5rem;
    background: rgba(192, 57, 43, 0.3);
    border: 1px solid var(--red);
    color: #ffaaaa;
    padding: 1px 4px;
    border-radius: 3px;
    margin-top: 2px;
    width: 140px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shake-anim { animation: shake 0.3s ease-in-out; }
.damage-flash-anim { animation: damageFlash 0.5s ease-out; }
.crit-flash-anim { animation: critFlash 0.4s ease-out; }
.draw-anim { animation: drawFlip 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

.deck-counter {
    margin-top: 15px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #aaa;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
}

#deck-count {
    color: var(--gold-light);
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.status-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 8px;
    font-size: 0.7rem;
    color: #ccc;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 500;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.inventory-item-container:hover .status-tooltip,
.inventory-icon-container:hover .status-tooltip,
.curse-label-container:hover .status-tooltip,
.inventory-icon-container:active .status-tooltip,
.curse-label-container:active .status-tooltip { 
    visibility: visible;
    opacity: 1;
    z-index: 9999 !important;
    pointer-events: auto;
}

.home-screen {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-left: 10vw;
    padding-right: 10vw;
    background: linear-gradient(90deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.6) 40%, transparent 100%), linear-gradient(-45deg, #050505, #111418, #0a0a0c, #1a1525);
    background-size: 100% 100%, 400% 400%;
    animation: ambientFog 15s ease infinite;
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.game-title {
    font-size: 6.5rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3), 0 5px 15px rgba(0, 0, 0, 0.9);
    letter-spacing: 8px;
    line-height: 1;
}

.game-title strong { color: var(--gold-light); }

.game-subtitle {
    color: #888;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    letter-spacing: 16px;
    margin-top: 5px;
    margin-bottom: 70px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    padding-left: 5px;
}

.home-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10vw;
}

.home-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-btn {
    background: transparent;
    color: #999;
    border: none;
    border-left: 3px solid transparent;
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    width: 400px;
    text-decoration: none;
    letter-spacing: 3px;
}

.home-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
    transition: left 0.4s ease;
    z-index: -1;
}

.home-btn:hover {
    color: var(--gold-light);
    border-left: 3px solid var(--gold);
    transform: translateX(20px);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.home-btn:hover::before { left: 0; }

.home-btn.external-link {
    font-size: 0.9rem;
    margin-top: 30px;
    color: #555;
    letter-spacing: 2px;
}

.home-btn.external-link:hover {
    color: #fff;
    border-left-color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.patch-notes-panel {
    width: 320px;
    margin-top: -100px;
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.85) 0%, rgba(10, 10, 12, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    color: #ccc;
    font-family: 'Segoe UI', sans-serif;
    z-index: 10;
}

.patch-notes-panel h3 {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}

.patch-notes-version {
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.patch-notes-scroll-area {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

.patch-notes-scroll-area::-webkit-scrollbar { width: 6px; }
.patch-notes-scroll-area::-webkit-scrollbar-track { background: transparent; }
.patch-notes-scroll-area::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.patch-notes-scroll-area::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.patch-notes-panel ul {
    padding-left: 20px;
    font-size: 0.75rem;
    line-height: 1.6;
    margin: 0;
}

.patch-notes-panel li { margin-bottom: 12px; }
.patch-notes-panel li span { color: var(--gold-light); font-weight: bold; }

.patch-separator {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    margin: 25px 0 20px 0;
}

.old-version { color: #999; background: rgba(255, 255, 255, 0.05); }
.old-notes { color: #888; }
.old-notes li span { color: #bbb; }

#rules-menu > div::-webkit-scrollbar,
#credits-menu > div::-webkit-scrollbar,
#leaderboard-list::-webkit-scrollbar { width: 6px; }

#rules-menu > div::-webkit-scrollbar-track,
#credits-menu > div::-webkit-scrollbar-track,
#leaderboard-list::-webkit-scrollbar-track { background: transparent; }

#rules-menu > div::-webkit-scrollbar-thumb,
#credits-menu > div::-webkit-scrollbar-thumb,
#leaderboard-list::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

#rules-menu > div::-webkit-scrollbar-thumb:hover,
#credits-menu > div::-webkit-scrollbar-thumb:hover,
#leaderboard-list::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.leaderboard-tabs .tab-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 10px 20px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.leaderboard-tabs .tab-btn:hover {
    border-color: var(--gold-light);
    color: var(--gold-light);
    background: rgba(241, 196, 15, 0.05);
}

.leaderboard-tabs .tab-btn.active-normal { border-color: var(--gold); color: #000; background: var(--gold); box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
.leaderboard-tabs .tab-btn.active-difficile { border-color: var(--orange); color: #fff; background: var(--orange); box-shadow: 0 0 15px rgba(211, 84, 0, 0.4); }
.leaderboard-tabs .tab-btn.active-cauchemar { border-color: var(--red); color: #fff; background: var(--red); box-shadow: 0 0 15px rgba(192, 57, 43, 0.4); }

.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.score-row:hover { background: rgba(255, 255, 255, 0.02); }

.rank-col { width: 50px; text-align: center; font-family: 'Cinzel', serif; font-size: 1.2rem; font-weight: bold; color: #666; }
.player-col { flex: 1; padding-left: 15px; display: flex; flex-direction: column; text-align: left; }
.score-col { width: 120px; text-align: right; font-size: 1.4rem; font-weight: bold; color: var(--gold-light); font-family: 'Segoe UI', sans-serif; }

.player-name-text { color: #eee; font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.player-hero-text { color: #888; font-size: 0.8rem; font-style: italic; }

.score-row.rank-1 { background: rgba(241, 196, 15, 0.08); border-radius: 6px; border: 1px solid rgba(241, 196, 15, 0.3); margin-bottom: 5px; }
.score-row.rank-1 .rank-col { color: #f1c40f; font-size: 1.6rem; text-shadow: 0 0 15px rgba(241, 196, 15, 0.8); }
.score-row.rank-1 .player-name-text { color: #fff; font-weight: 800; font-size: 1.1rem; }
.score-row.rank-1 .score-col { color: #f1c40f; text-shadow: 0 0 10px rgba(241, 196, 15, 0.5); }

.score-row.rank-2 { background: rgba(189, 195, 199, 0.05); border-radius: 6px; border: 1px solid rgba(189, 195, 199, 0.2); margin-bottom: 5px; }
.score-row.rank-2 .rank-col { color: #bdc3c7; font-size: 1.4rem; text-shadow: 0 0 10px rgba(189, 195, 199, 0.5); }
.score-row.rank-2 .player-name-text { color: #fff; font-weight: 700; }
.score-row.rank-2 .score-col { color: #bdc3c7; }

.score-row.rank-3 { background: rgba(211, 84, 0, 0.05); border-radius: 6px; border: 1px solid rgba(211, 84, 0, 0.2); margin-bottom: 10px; }
.score-row.rank-3 .rank-col { color: #d35400; font-size: 1.3rem; text-shadow: 0 0 10px rgba(211, 84, 0, 0.5); }
.score-row.rank-3 .player-name-text { color: #fff; font-weight: 700; }
.score-row.rank-3 .score-col { color: #d35400; }

.mobile-log-btn { display: none !important; }
.close-log-btn { display: none; }

.hp-bar-container {
    width: 100%;
    height: 6px;
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    margin-top: 8px;
    margin-bottom: 2px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.9);
}

.hp-bar-fill {
    height: 100%;
    transition: width 0.3s ease-out, background-color 0.3s ease;
}

.floating-text {
    position: absolute;
    pointer-events: none;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.8);
    z-index: 9999;
    animation: floatUpAndFade 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.fct-damage { color: #e74c3c; font-size: 2.2rem; }
.fct-crit { color: #f1c40f; font-size: 2.5rem; text-shadow: 0 0 15px rgba(241, 196, 15, 0.8), 0 2px 4px rgba(0,0,0,0.9); }
.fct-heal { color: #2ecc71; font-size: 2rem; }

.pantheon-season-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 28px;
    padding: 8px 14px;
    background: rgba(10, 10, 12, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-left: 2px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    width: fit-content;
    max-width: 100%;
}

.pantheon-season-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.pantheon-season-label {
    position: relative;
    margin: 0;
    padding: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9f8a4a;
    white-space: nowrap;
}

.pantheon-season-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pantheon-season-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.pantheon-season-name {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold-light);
}

#achievement-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.achievement-popup {
    background: rgba(15, 15, 17, 0.95);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    border-radius: 6px;
    padding: 15px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.ach-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.8));
}

.ach-text {
    display: flex;
    flex-direction: column;
}

.ach-title-label {
    font-size: 0.65rem;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
    margin-bottom: 3px;
}

.ach-name {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

.rpg-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.rpg-hub-card {
    position: relative;
    height: 180px;
    border-radius: 6px;
    border: 1px solid #333;
    overflow: hidden;
    cursor: pointer;
    background-color: #111;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.rpg-hub-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(15, 15, 17, 1) 0%, rgba(15, 15, 17, 0.7) 40%, rgba(15, 15, 17, 0) 100%);
    transition: height 0.3s ease, background 0.3s ease;
}

.rpg-hub-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.rpg-hub-card:hover::after {
    height: 85%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
}

.rpg-hub-content {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 2;
    text-align: left;
}

.rpg-hub-subtitle {
    color: #aaa;
    font-size: 0.7rem;
    margin: 0 0 5px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
}

.rpg-hub-title {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin: 0;
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1), 0px 0px 10px rgba(0, 0, 0, 0.8);
}

.rpg-hub-card:hover .rpg-hub-subtitle {
    color: var(--gold);
}

.rpg-hub-card:hover .rpg-hub-title {
    color: #fff;
    transform: translateX(5px);
}

.rpg-room-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 30px;
    animation: fadeIn 0.3s ease;
}

.npc-dialogue-medallion {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(184, 155, 94, 0.2);
}

.npc-avatar-img {
    width: 90px; 
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    object-fit: cover;
    background-color: #111;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.3);
    padding: 3px;
    flex-shrink: 0;
}

.npc-quote-text {
    font-style: italic;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.rpg-pedestal {
    background: linear-gradient(180deg, #111 0%, #0a0a0c 100%);
    border: 1px solid #333;
    border-top: 3px solid var(--gold);
    border-radius: 6px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rpg-pedestal:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.4);
}

.tavern-poster {
    background: linear-gradient(180deg, #111 0%, #0a0a0c 100%);
    border: 1px solid #333;
    padding: 25px;
    border-radius: 6px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.5);
    transition: border-color 0.3s;
}

.tavern-poster:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.map-scroll {
    background: linear-gradient(135deg, #111 0%, #0a0a0c 100%);
    border: 1px solid #333;
    border-left: 4px solid var(--gold-light);
    padding: 20px 25px;
    border-radius: 4px 8px 8px 4px;
    box-shadow: inset 5px 0 15px rgba(212, 175, 55, 0.05);
    transition: all 0.3s;
}

.map-scroll:hover {
    background: linear-gradient(135deg, #161618 0%, #0d0d0f 100%);
    border-left-color: var(--gold);
    box-shadow: inset 5px 0 25px rgba(212, 175, 55, 0.1);
}

.bounty-board {
    background: linear-gradient(180deg, #111 0%, #0a0a0c 100%);
    border: 1px solid #333;
    border-top: 3px solid #8e1c10;
    padding: 25px;
    border-radius: 6px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
    transition: border-color 0.3s;
}

.bounty-board:hover {
    border-color: rgba(142, 28, 16, 0.3);
}

.barde-track-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: background 0.3s ease;
}

.barde-track-row:hover {
    background: rgba(212, 175, 55, 0.05);
}

.track-title {
    color: #e0e0e0;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    transition: color 0.3s ease;
}

.barde-track-row:hover .track-title {
    color: var(--gold-light);
}

.track-price-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-price-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    border-color: var(--gold-light);
}

.track-price-btn:disabled {
    border-color: #333;
    color: #555;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.5);
}

.rpg-action-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.rpg-action-btn:hover:not(:disabled) {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.rpg-action-btn:disabled {
    border-color: #444;
    color: #666;
    cursor: not-allowed;
}

.forge-artefact-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: radial-gradient(circle at center, #1a1a1d 0%, #0d0d0f 100%);
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 0 0 15px rgba(212, 175, 55, 0.15);
    padding: 30px;
    border-radius: 10px;
    animation: fadeIn 0.4s ease;
}

.forge-item-view-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.forge-select-gear {
    width: 100%;
    max-width: 350px;
    appearance: none;
    -webkit-appearance: none;
    background: #000;
    border: 2px solid var(--gold);
    color: #fff;
    padding: 15px;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    border-radius: 50px;
    transition: all 0.3s;
    outline: none;
}

.forge-select-gear:hover {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.05);
}

.forge-engraved-stat {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.forge-purchase-btn {
    width: 100%;
    max-width: 300px;
    background: linear-gradient(135deg, #111 0%, #222 100%);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: bold;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
}

.forge-purchase-btn:hover:not(:disabled) {
    background: var(--gold);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.guild-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.guild-top-info {
	text-align: left;
}

.guild-rank-box {
    margin-top: 12px;
    padding-top: 12px;
    position: relative;
}

.guild-rank-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), transparent);
}

.guild-rank-title {
    color: #ccc;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.guild-rank-desc {
    color: #999;
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 4px;
    max-width: 450px;
    line-height: 1.3;
}

.guild-top-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.treasury-block {
	text-align: right;
}

.guild-logout-btn {
    background: rgba(192, 57, 43, 0.1); 
    border: 1px solid var(--red); 
    color: var(--red); 
    padding: 8px 12px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-family: 'Cinzel', serif; 
    font-size: 0.75rem; 
    transition: all 0.3s;
}
.guild-logout-btn:hover {
    background: var(--red); 
    color: white;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.rules-panel {
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.9) 0%, rgba(10, 10, 12, 0.95) 100%);
    border: 1px solid #333;
    border-top: 3px solid var(--gold);
    border-radius: 8px;
    padding: 25px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 20px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.rules-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.4);
}

.rules-panel-title {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    letter-spacing: 1px;
}

.rules-list {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.rules-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

.rules-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.8rem;
}

.boss-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    padding: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.boss-card:hover {
    transform: scale(1.02);
    border-color: var(--gold-light);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.15);
}

.boss-name {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,1);
}

.boss-prime {
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    background: rgba(0,0,0,0.5);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.curse-card-rule {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #888;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.curse-card-rule:hover {
    border-color: var(--gold);
    border-left-color: var(--gold);
}

.curse-card-rule strong {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    margin-bottom: 5px;
    display: block;
}

.login-modal-panel {
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.95) 0%, rgba(10, 10, 12, 0.98) 100%);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9);
    width: 90%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-modal-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.login-title-gold {
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(212, 175, 55, 0.3);
}

.login-subtitle {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.login-sep-line {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    margin-bottom: 30px;
}

.login-input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-field {
    width: 100%;
    padding: 15px;
    background: #0a0a0c;
    color: #fff;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    cursor: text;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.login-field:focus {
    border-color: var(--gold);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1), 0 0 10px rgba(212, 175, 55, 0.2);
}

.login-field::placeholder {
    color: #555;
    letter-spacing: 1px;
}

.login-input-group::after {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(212, 175, 55, 0.6);
    font-size: 1.1rem;
    pointer-events: none;
}

.login-group-ident::after { content: "✦"; } 
.login-group-pass::after { content: "🗝️"; } 

.login-btn-primary {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    color: black;
    border: none;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.login-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    filter: brightness(1.1);
}

.login-btn-outline {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold);
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 25px;
}

.login-btn-outline:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
    border-color: var(--gold-light);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.login-close-link {
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.login-close-link:hover {
    color: var(--gold-light);
}

.goblin-container {
    width: 95%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.4s ease-out;
}

.goblin-dialog-box {
    background: rgba(10, 10, 12, 0.98);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9), inset 0 0 20px rgba(212, 175, 55, 0.1);
}

.goblin-name {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 8px;
}

.goblin-content {
    display: flex;
    align-items: center; 
    gap: 20px;
}

.goblin-portrait-circle {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: #111;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    flex-shrink: 0; 
}

#goblin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goblin-text {
    font-style: italic;
    color: #eee;
    line-height: 1.5;
    font-size: 1.05rem;
    flex: 1; 
}

.goblin-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.goblin-choice-btn {
    background: linear-gradient(90deg, rgba(20, 20, 25, 0.95) 0%, rgba(30, 30, 35, 0.95) 100%);
    border: 1px solid #444;
    border-left: 4px solid var(--gold);
    color: #fff;
    padding: 14px 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.goblin-choice-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-light);
    transform: translateX(8px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.ravel-zone {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--gold);
    border-radius: 8px;
    margin-top: 20px;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    height: 140px;
    perspective: 1000px;
}

.ravel-card-wrapper {
    position: relative;
    width: 90px;
    height: 130px;
    cursor: pointer;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.ravel-card-wrapper:hover {
    transform: translateY(-15px) scale(1.05);
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.4));
}

.card-face {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    border-radius: 6px;
    border: 1px solid #444;
}

.card-back {
    background-image: url('pioche.png');
    background-size: cover;
    background-position: center;
    border-color: #555;
    transform: rotateY(0deg);
    z-index: 2;
}

.card-front {
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1px solid var(--gold);
    backface-visibility: hidden;
    transform: rotateY(180deg);
    z-index: 1;
}

.ravel-card-wrapper.flipped {
    transform: rotateY(180deg);
    cursor: default;
    pointer-events: none; 
}

.ravel-card-wrapper.missed {
    opacity: 0.4;
    filter: grayscale(100%) brightness(50%);
    cursor: default;
}

.ravel-card-wrapper.winner .card-front {
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.4);
    border-color: var(--gold-light);
}

@media (max-width: 600px) {
    .goblin-content { flex-direction: column; gap: 15px; }
    .goblin-text { font-size: 0.95rem; text-align: center; }
    .goblin-portrait-circle { width: 70px; height: 70px; }
    .goblin-name { text-align: center; }
    .goblin-choice-btn { font-size: 0.8rem; padding: 12px; }
}

@media (max-width: 600px) {
    .goblin-header { flex-direction: column-reverse; gap: 10px; text-align: center; }
    .goblin-text { font-size: 0.9rem; text-align: center; }
    .goblin-choice-btn { font-size: 0.8rem; padding: 12px; }
}

@media (max-width: 600px) {

.login-modal-panel {
        padding: 25px 20px;
    }
    .login-title-gold {
        font-size: 1.5rem;
    }
    
    #achievement-container {
        top: 10px;
        right: 0;
        left: 0;
        align-items: center;
    }
    .achievement-popup {
        width: 90%;
        max-width: 350px;
        padding: 10px 15px;
        transform: translateY(-150%);
    }
    .achievement-popup.show {
        transform: translateY(0);
    }
    .ach-icon { font-size: 1.4rem; }
    .ach-name { font-size: 0.9rem; }
}
    
@media (max-height: 850px) {
    .card { width: 130px; height: 190px; }
    .card-stats { bottom: -8px; font-size: 0.75rem; padding: 2px 8px; }
    .hp-bar-container { height: 5px; margin-top: 5px; }
}

@media (max-width: 900px) {
    body {
        height: auto;
        overflow-y: auto;
    }

    #game-container {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        overflow-y: auto;
        gap: 15px;
        padding-bottom: 20px;
    }

    #monster-zone .card {
        width: 105px;
        height: 154px;
    }

    #player-zone {
        flex-wrap: nowrap;
        gap: 6px;
        width: 100%;
        padding: 0 5px;
    }

    #player-zone .card-wrapper {
        flex: 1;
        min-width: 0;
    }

    #player-zone .card {
        width: 100%;
        height: auto;
        aspect-ratio: 150 / 220;
    }

    #player-zone .card-stats {
        font-size: 0.65rem;
        padding: 2px 4px;
        bottom: -8px;
        width: 95%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hide-mobile {
        display: none;
    }

    .shield-icon {
        width: 22px;
        height: 22px;
        top: -8px;
        right: -8px;
    }

    .controls button {
        padding: 10px 15px;
        font-size: 0.75rem;
    }

    .pantheon-season-banner {
        display: none;
    }

    .inventory-item-container,
    .curse-label-container {
        width: 100%;
        overflow: visible;
        padding: 0 2px;
        box-sizing: border-box;
    }

    .curse-label {
        width: 100%;
        font-size: 0.45rem;
        padding: 1px;
    }

    .safe-loot-label {
        font-size: 0.7rem;
    }

    .mobile-log-btn {
        display: inline-block !important;
        background: #333 !important;
        border-color: #555 !important;
        color: white !important;
    }

    .close-log-btn {
        display: inline-block;
        float: right;
        color: var(--red);
        cursor: pointer;
        font-size: 1.2rem;
        margin-top: -2px;
    }

    #log-container {
        display: none;
        position: fixed;
        top: 5%;
        left: 5%;
        width: 90%;
        height: 90%;
        z-index: 6000;
        box-shadow: 0 0 50px rgba(0, 0, 0, 1);
        border: 2px solid var(--gold);
        margin: 0;
    }

    #log-container.show-log {
        display: flex !important;
    }

    #options-menu > div,
    #leaderboard-menu > div,
    #rules-menu > div,
    #credits-menu > div,
    #setup-menu > div {
        padding: 15px !important;
        width: 95% !important;
        max-width: 100% !important;
    }

    .leaderboard-tabs {
        flex-wrap: wrap;
    }

    .leaderboard-tabs .tab-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .score-row {
        padding: 10px;
    }

    .score-col {
        font-size: 1.1rem;
    }

    .setup-layout {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        grid-template-columns: repeat(2, 130px);
    }

    .hero-card {
        width: 130px;
    }

    .hero-info-panel {
        width: 100%;
        max-width: 100%;
        align-items: center;
    }

    .location-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
    }

    .loc-card {
        width: 100% !important;
        padding: 10px 5px !important;
        box-sizing: border-box !important;
    }

    .loc-card-main {
        grid-column: 1 / -1 !important;
    }

    .loc-card h3 {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }

.loc-card p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
}
    #main-menu h1 {
        font-size: 3.2rem;
    }

    #main-menu p {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .main-menu-btn {
        width: 90%;
        max-width: 320px;
        font-size: 1rem;
    }

    .home-screen {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-left: 0;
        padding-right: 0;
    }

    .home-layout {
        flex-direction: column;
        gap: 20px;
    }

    .home-content {
        align-items: center;
        text-align: center;
        margin-top: 10vh;
    }

    .game-title {
        font-size: 4rem;
        letter-spacing: 4px;
    }

    .game-subtitle {
        font-size: 0.9rem;
        letter-spacing: 6px;
        padding-left: 0;
        margin-bottom: 50px;
    }

    .home-btn {
        text-align: center;
        border-left: none;
        width: 280px;
        font-size: 1.2rem;
        padding: 15px;
    }

    .home-btn:hover {
        border-left: none;
        transform: scale(1.05);
    }

    .home-btn::before {
        display: none;
    }

    .home-screen .patch-notes-panel {
        display: none !important;
    }

    #auth-modal .patch-notes-panel, 
    #guild-name-modal .patch-notes-panel {
        max-height: 90vh;
        overflow-y: auto;
        flex-direction: column;
        padding: 20px 15px !important;
    }

    #auth-modal input, #guild-name-modal input {
        font-size: 16px !important;
    }
    #guild-modal > div {
        overflow-x: hidden !important;
        padding: 15px !important;
        width: 95% !important;
    }

    .guild-top-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .guild-top-info h2 { font-size: 1.5rem !important; margin-bottom: 5px; }
    .guild-top-info { text-align: center; }
    .guild-rank-desc { max-width: 100%; margin: 6px auto 0 auto; text-align: center; }
    .guild-top-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .treasury-block { text-align: center; }
    .guild-logout-btn { width: 100%; max-width: 250px; }

    .npc-dialogue-medallion {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .npc-avatar-img {
        margin-bottom: 5px;
    }

    .forge-artefact-panel {
        grid-template-columns: 1fr !important;
        padding: 20px 10px !important;
        gap: 30px !important;
    }
    
    .forge-item-view-column {
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        padding-bottom: 30px;
    }
    
    .forge-select-gear {
        font-size: 0.9rem !important;
        padding: 12px !important;
    }
    
    .bounty-board {
        padding: 15px;
    }
    
    .guild-rank-desc {
        max-width: 100%;
        margin: 6px auto 0 auto;
    }
    
    .guild-rank-box::before {
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    }
}