/* ==========================================================================
   ARCANA RPG: O DESTINO DO TARÔ - MYSTICAL GOTHIC STYLING
   ========================================================================== */

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

:root {
    --bg-dark: #07050d;
    --bg-panel: rgba(18, 14, 28, 0.88);
    --bg-altar: radial-gradient(circle at center, #1e1333 0%, #0a0614 70%);
    --gold: #d4af37;
    --gold-light: #f7e199;
    --gold-dark: #8c6d1f;
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.45);
    --purple-glow: 0 0 20px rgba(138, 43, 226, 0.5);
    --crimson: #e63946;
    --cyan: #00f2fe;
    --text-main: #f0e6d2;
    --text-muted: #9f96aa;
    --border-gold: 1px solid rgba(212, 175, 55, 0.35);
    --border-radiant: 1px solid rgba(212, 175, 55, 0.8);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-heading: 'Cinzel', serif;
    --font-flavor: 'MedievalSharp', cursive;
    --font-ui: 'Montserrat', sans-serif;
    --transition-smooth: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   APP CONTAINER
   ========================================================================== */
#app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    backdrop-filter: blur(2px);
}

/* ==========================================================================
   HEADER / STATUS BAR
   ========================================================================== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(180deg, rgba(14, 10, 24, 0.95) 0%, rgba(14, 10, 24, 0.6) 100%);
    border-bottom: var(--border-gold);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.game-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-shadow: var(--gold-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-logo .logo-rune {
    color: var(--gold);
    font-size: 1.8rem;
    animation: pulseRune 3s infinite ease-in-out;
}

.hud-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.badge-procedural {
    background: rgba(120, 80, 200, 0.25);
    border: 1px solid rgba(160, 110, 240, 0.6);
    color: #d1b3ff;
}

.badge-gemini {
    background: rgba(0, 200, 255, 0.2);
    border: 1px solid rgba(0, 230, 255, 0.8);
    color: #80f0ff;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.4);
}

.player-status-container {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.stat-bar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 1.1rem;
}

.bar-wrapper {
    width: 140px;
    height: 14px;
    background: rgba(20, 15, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.bar-fill {
    height: 100%;
    transition: width 0.35s ease;
    border-radius: 6px;
}

.hp-fill {
    background: linear-gradient(90deg, #b00020, #ff4d6d);
    box-shadow: 0 0 8px #ff4d6d;
}

.ether-fill {
    background: linear-gradient(90deg, #4361ee, #4cc9f0);
    box-shadow: 0 0 8px #4cc9f0;
}

.bar-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e0d8ea;
    min-width: 65px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: rgba(25, 18, 40, 0.8);
    border: var(--border-gold);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-ui);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.icon-btn:hover {
    background: rgba(45, 30, 75, 0.9);
    border-color: var(--gold-light);
    box-shadow: var(--gold-glow);
    transform: translateY(-2px);
}

/* ==========================================================================
   MAIN RITUAL STAGE
   ========================================================================== */
.main-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 310px 1fr 340px;
    gap: 18px;
    padding: 18px 24px;
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
}

/* ENEMY ARENA */
.enemy-arena-panel {
    background: var(--bg-panel);
    border: var(--border-gold);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.panel-header-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.enemy-card-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.enemy-avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #2d1845 0%, #0c0817 80%);
    border: 2px solid var(--crimson);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    animation: floatEnemy 4s infinite ease-in-out;
}

.enemy-avatar-svg {
    width: 100%;
    height: 100%;
}

.enemy-meta h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #ff6b6b;
    margin-bottom: 2px;
}

.enemy-meta p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.enemy-hp-box {
    width: 100%;
}

.enemy-hp-bar {
    width: 100%;
    height: 16px;
    background: #110d1a;
    border: 1px solid rgba(255, 100, 100, 0.4);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

.enemy-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #780016, #e63946);
    box-shadow: 0 0 10px #e63946;
    transition: width 0.35s ease;
}

.enemy-intent-card {
    background: rgba(30, 15, 30, 0.7);
    border: 1px dashed rgba(230, 57, 70, 0.5);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    width: 100%;
    font-size: 0.82rem;
}

.intent-label {
    color: #ff9999;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.enemy-weakness-badge {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 12px;
    margin-top: 4px;
}

/* CENTER RITUAL ALTAR & 3D DICE ZONE */
.ritual-altar-panel {
    background: var(--bg-altar);
    border: var(--border-radiant);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.9), var(--gold-glow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    position: relative;
}

.altar-center-zone {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    min-height: 310px;
    position: relative;
}

/* 3D DICE ALTAR CONTAINER */
.dice-altar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 320px;
    height: 290px;
}

#dice-3d-canvas {
    width: 100% !important;
    height: 100% !important;
    cursor: pointer;
    outline: none;
}

.dice-result-overlay {
    position: absolute;
    bottom: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.dice-badge {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(15, 10, 25, 0.9);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    transition: var(--transition-smooth);
}

.nat20-badge {
    background: linear-gradient(135deg, #ffd700, #ff8800) !important;
    color: #000 !important;
    border-color: #fff !important;
    box-shadow: 0 0 25px #ffd700, 0 0 50px #ff8800 !important;
    transform: scale(1.1);
    animation: goldShimmer 1.5s infinite alternate;
}

.nat1-badge {
    background: linear-gradient(135deg, #b00020, #000) !important;
    color: #ff9999 !important;
    border-color: #ff0033 !important;
    box-shadow: 0 0 25px #ff0033 !important;
    transform: scale(1.08);
}

.rolling-badge {
    color: #00f2fe;
    border-color: #00f2fe;
    animation: blinkGlow 0.8s infinite alternate;
}

/* ACTIVE ALTAR CARD SLOT */
.altar-card-slot {
    width: 220px;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.altar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 30px 16px;
    width: 190px;
    height: 270px;
    background: rgba(20, 12, 35, 0.35);
}

.altar-placeholder .rune-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    margin-bottom: 12px;
    animation: spinRune 12s linear infinite;
    position: relative;
}

.altar-placeholder .rune-circle::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold);
    font-size: 1.4rem;
}

.altar-placeholder p {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.altar-card-active {
    transform: scale(1.05);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), var(--gold-glow);
}

.altar-card-lore {
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--gold-light);
    text-align: center;
    font-style: italic;
    max-width: 200px;
    line-height: 1.3;
}

/* ACTIONS BAR */
.actions-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 14px 0;
    min-height: 70px;
}

.action-choice-btn {
    flex: 1;
    max-width: 290px;
    background: rgba(26, 17, 44, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.action-choice-btn:hover:not(:disabled) {
    background: rgba(50, 30, 85, 0.95);
    border-color: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: var(--gold-glow);
}

.action-choice-btn.active-action {
    background: rgba(70, 40, 110, 0.95);
    border: 2px solid var(--gold-light);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.action-choice-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.act-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold-light);
    display: flex;
    justify-content: space-between;
}

.act-mod {
    color: #00f2fe;
    font-size: 0.78rem;
}

.act-desc {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin: 4px 0;
    line-height: 1.25;
}

.act-cost {
    font-size: 0.68rem;
    color: #4cc9f0;
    font-weight: 600;
}

/* MAIN ROLL TRIGGER BUTTON */
.roll-trigger-box {
    display: flex;
    justify-content: center;
}

.btn-fate-roll {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #a67c1e 0%, #d4af37 50%, #f7e199 100%);
    color: #120924;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 45px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    transition: var(--transition-smooth);
}

.btn-fate-roll:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.7);
}

.btn-fate-roll:disabled {
    background: #2a2038;
    color: #665c78;
    cursor: not-allowed;
    box-shadow: none;
}

.pulse-glow {
    animation: pulseButton 2s infinite ease-in-out;
}

/* CHRONICLE / AI STORYTELLER PANEL */
.chronicle-panel {
    background: var(--bg-panel);
    border: var(--border-gold);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
}

.chronicle-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
    margin-top: 10px;
    max-height: 440px;
}

.chronicle-content::-webkit-scrollbar {
    width: 4px;
}

.chronicle-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 4px;
}

.chronicle-entry {
    background: rgba(10, 7, 18, 0.65);
    border-left: 3px solid var(--gold);
    padding: 10px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.82rem;
    line-height: 1.45;
    animation: fadeIn 0.4s ease;
}

.chronicle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.chronicle-text {
    color: #e5ddea;
}

.ai-entry {
    border-left-color: #00f2fe;
    background: rgba(5, 20, 35, 0.7);
}

.ai-entry .chronicle-header {
    color: #00f2fe;
}

.enemy-log {
    border-left-color: var(--crimson);
}

.victory-log {
    border-left-color: #43e97b;
    background: rgba(10, 35, 18, 0.7);
}

/* ==========================================================================
   TAROT CARDS HAND DECK (BOTTOM)
   ========================================================================== */
.cards-hand-dock {
    padding: 10px 24px 20px 24px;
    background: linear-gradient(0deg, rgba(8, 5, 15, 0.98) 0%, rgba(8, 5, 15, 0.75) 85%, transparent 100%);
    border-top: var(--border-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.dock-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin-bottom: 12px;
}

.dock-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.dock-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.player-cards-hand {
    display: flex;
    justify-content: center;
    gap: 18px;
    perspective: 1200px;
    max-width: 1400px;
    width: 100%;
}

/* TAROT CARD 3D COMPONENT */
.tarot-card {
    width: 165px;
    height: 245px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1), box-shadow 0.25s ease;
    transform-style: preserve-3d;
    position: relative;
}

.tarot-card.selected {
    transform: translateY(-24px) scale(1.08) !important;
    filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.8));
}

.card-inner {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
}

.card-front {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    position: relative;
    border-radius: 12px;
}

.card-border-gold {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1.5px solid rgba(212, 175, 55, 0.7);
    border-radius: 8px;
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.card-roman {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--gold-light);
}

.card-element {
    font-size: 0.65rem;
    color: #e0d8ea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-art-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    position: relative;
    z-index: 2;
}

.card-art-svg {
    width: 80px;
    height: 100px;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.6));
}

.card-art-img {
    max-width: 90px;
    max-height: 115px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.5);
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
    transition: transform 0.25s ease;
}

.tarot-card:hover .card-art-img {
    transform: scale(1.04);
}

.card-info {
    text-align: center;
    position: relative;
    z-index: 2;
}

.card-name {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 0.65rem;
    color: var(--gold-light);
    font-family: var(--font-flavor);
    line-height: 1.1;
}

.card-footer {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.card-badge {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.card-foil-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 12px;
    mix-blend-mode: overlay;
    opacity: 0.65;
}

/* ==========================================================================
   FLOATING DAMAGE TEXT
   ========================================================================== */
.floating-dmg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.6rem;
    pointer-events: none;
    z-index: 99;
    animation: floatDamageUp 1.1s ease forwards;
}

.float-damage {
    color: #ff3366;
    text-shadow: 0 0 10px #ff0033;
}

.float-crit {
    color: #ffd700;
    font-size: 2.1rem;
    text-shadow: 0 0 15px #ffd700, 0 0 30px #ff6600;
}

.float-heal {
    color: #43e97b;
    text-shadow: 0 0 12px #38ef7d;
}

.float-miss {
    color: #999;
    font-size: 1.2rem;
}

/* ==========================================================================
   CRITICAL SHOCKWAVES & SCREEN SHAKE
   ========================================================================== */
.critical-shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    pointer-events: none;
    animation: shockwaveExpand 1s ease-out forwards;
}

.divine-shockwave {
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px #ffd700, inset 0 0 30px #ff8800;
}

.doom-shockwave {
    border: 3px solid #ff0033;
    box-shadow: 0 0 30px #ff0033, inset 0 0 30px #660011;
}

.screen-shake {
    animation: screenVibrate 0.5s ease;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.game-modal.active {
    display: flex;
}

.modal-card {
    background: #140d24;
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 28px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), var(--gold-glow);
    animation: modalPop 0.3s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    color: var(--gold-light);
    font-size: 1.3rem;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.82rem;
    color: var(--gold-light);
    font-weight: 600;
}

.form-input, .form-select {
    background: #090611;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.88rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: var(--gold-glow);
}

.free-ai-guide {
    background: rgba(0, 200, 255, 0.08);
    border: 1px dashed rgba(0, 200, 255, 0.4);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #bbf0ff;
}

.free-ai-guide a {
    color: #00f2fe;
    text-decoration: underline;
    font-weight: 700;
}

/* ==========================================================================
   ANIMATIONS KEYFRAMES
   ========================================================================== */
@keyframes pulseRune {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 10px #ffd700); }
}

@keyframes spinRune {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatEnemy {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseButton {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 8px 35px rgba(212, 175, 55, 0.85); }
}

@keyframes floatDamageUp {
    0% { opacity: 1; transform: translate(-50%, -40%) scale(0.8); }
    50% { transform: translate(-50%, -90%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -140%) scale(1); }
}

@keyframes shockwaveExpand {
    0% { width: 40px; height: 40px; opacity: 1; }
    100% { width: 320px; height: 320px; opacity: 0; }
}

@keyframes screenVibrate {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-6px, 4px); }
    40% { transform: translate(6px, -4px); }
    60% { transform: translate(-4px, -3px); }
    80% { transform: translate(4px, 3px); }
    100% { transform: translate(0, 0); }
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

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

/* SANIDADE BAR & CLUES BADGE */
.sanity-fill {
    background: linear-gradient(90deg, #5e082c, #a18cd1);
    box-shadow: 0 0 8px #a18cd1;
}

.badge-clues {
    background: rgba(212, 175, 55, 0.25);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-weight: 700;
}

/* EVIDENCE JOURNAL CARD */
.evidence-journal-card {
    background: rgba(18, 12, 28, 0.85);
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 10px;
}

.journal-header {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 6px;
    font-weight: 700;
}

.journal-hint {
    font-size: 0.73rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* STORY DECISION DOCK (CHOICES + CUSTOM ACTION) */
.story-decision-dock {
    padding: 12px 24px;
    background: rgba(12, 8, 20, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.35);
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    z-index: 5;
}

.story-choices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    width: 100%;
}

.story-choice-btn {
    background: rgba(22, 16, 36, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.story-choice-btn:hover {
    background: rgba(45, 28, 75, 0.95);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--gold-glow);
}

.story-choice-btn.active-choice {
    background: rgba(65, 35, 110, 0.98);
    border: 2px solid var(--gold-light);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

.choice-title {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.choice-meta {
    font-size: 0.72rem;
    color: #ff9999;
}

/* CUSTOM ACTION INPUT BOX */
.custom-action-box {
    display: flex;
    gap: 10px;
    width: 100%;
}

#custom-action-input {
    flex: 1;
    background: rgba(8, 5, 15, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    transition: var(--transition-smooth);
}

#custom-action-input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: var(--gold-glow);
    background: rgba(18, 12, 30, 0.95);
}

#custom-action-submit-btn {
    background: linear-gradient(135deg, #8c6d1f 0%, #d4af37 100%);
    color: #120924;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 22px;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 1px;
}

#custom-action-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--gold-glow);
}

.player-custom-entry {
    border-left-color: #ffd700;
    background: rgba(40, 25, 10, 0.7);
}

/* ==========================================================================
   CHARACTER PORTRAIT & MONSTER ART
   ========================================================================== */
.character-portrait-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.character-portrait-wrapper {
    width: 170px;
    height: 204px;
    border-radius: 12px;
    background: #08050e;
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 8px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    animation: characterPulse 4s infinite ease-in-out;
}

.char-portrait-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

.character-meta-info {
    text-align: center;
}

.character-meta-info h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.character-meta-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

@keyframes characterPulse {
    0%, 100% { transform: translateY(0); box-shadow: 0 0 18px rgba(212, 175, 55, 0.35); }
    50% { transform: translateY(-4px); box-shadow: 0 0 28px rgba(212, 175, 55, 0.6); }
}

/* ==========================================================================
   SCENE LOOT ZONE
   ========================================================================== */
.scene-loot-zone {
    width: 100%;
    margin-bottom: 12px;
}

.loot-card {
    background: linear-gradient(135deg, rgba(35, 22, 10, 0.95) 0%, rgba(18, 12, 28, 0.95) 100%);
    border: 1.5px solid #ffd700;
    border-radius: var(--radius-sm);
    padding: 12px;
    width: 100%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loot-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loot-icon {
    font-size: 1.8rem;
}

.loot-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    color: var(--gold-light);
    font-weight: 700;
}

.loot-desc {
    font-size: 0.72rem;
    color: #e0d8ea;
    line-height: 1.25;
}

.loot-actions {
    display: flex;
    gap: 8px;
}

.loot-btn-take {
    flex: 1;
    background: linear-gradient(135deg, #a67c1e 0%, #ffd700 100%);
    color: #120924;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.loot-btn-take:hover {
    transform: scale(1.02);
    box-shadow: 0 0 10px #ffd700;
}

.loot-btn-leave {
    background: rgba(40, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* ==========================================================================
   INVENTORY & WEAPONS CARD
   ========================================================================== */
.inventory-card {
    background: rgba(14, 10, 22, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
}

.inv-header {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.equipped-weapon-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(25, 18, 40, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
}

.weapon-icon {
    font-size: 1.4rem;
}

.equipped-weapon-bar strong {
    font-size: 0.85rem;
    color: #fff;
    display: block;
}

.weapon-meta {
    font-size: 0.72rem;
    color: #00f2fe;
}

.inventory-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inventory-item-pill {
    background: rgba(28, 20, 44, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    color: #e0d8ea;
    font-size: 0.72rem;
    padding: 4px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.inventory-item-pill:hover {
    background: rgba(55, 35, 90, 0.95);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.inventory-item-pill small {
    color: var(--gold-light);
    font-weight: 700;
}

.empty-inv {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVIDADE REFINADA (MOBILE & DESKTOP)
   ========================================================================== */
@media (max-width: 1200px) {
    .main-stage {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }
    .enemy-arena-panel, .chronicle-panel {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 14px;
    }
    .player-status-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .bar-wrapper {
        width: 100px;
    }
    .main-stage {
        padding: 8px 10px;
        gap: 12px;
    }
    .altar-center-zone {
        flex-direction: column;
        gap: 12px;
    }
    .dice-altar-box {
        width: 100%;
        max-width: 280px;
        height: 240px;
    }
    .story-decision-dock {
        padding: 10px 14px;
    }
    .story-choices-container {
        grid-template-columns: 1fr;
    }
    .custom-action-box {
        flex-direction: column;
    }
    #custom-action-submit-btn {
        padding: 12px;
        width: 100%;
    }
    .player-cards-hand {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        gap: 10px;
        scroll-snap-type: x mandatory;
    }
    .tarot-card {
        min-width: 135px;
        height: 205px;
        scroll-snap-align: start;
    }
    .btn-fate-roll {
        width: 100%;
        padding: 14px 18px;
        font-size: 0.9rem;
    }
}
