/* Combat Carousel Styles */
.monster-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.carousel-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

/* Nav button sizing override (sect-btn--ghost base provides colors) */
.combat-nav-btn {
    padding: 15px 20px;
    font-size: 1.5em;
    flex-shrink: 0;
}

.carousel-cards-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Card size modifiers (sect-card provides visual styling) */
.monster-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(30, 30, 46, 0.95) 0%, rgba(15, 15, 26, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    overflow: hidden;
}

.combat-card--center {
    width: 340px;
    border-color: rgba(78, 205, 196, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(78, 205, 196, 0.15);
    transform: scale(1.02);
    z-index: 2;
}

.combat-card--preview {
    width: 270px;
    opacity: 0.55;
    cursor: pointer;
    filter: saturate(0.85);
}

.combat-card--preview:hover {
    opacity: 0.9;
    transform: translateY(-4px) scale(0.98);
    filter: saturate(1.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.combat-card--locked {
    opacity: 0.4;
    filter: grayscale(0.6);
}

/* Card Header: Type Badge & Tier */
.monster-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.monster-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.monster-type-badge--vitality {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.monster-type-badge--savage {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fdba74;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.2);
}

.monster-type-badge--ironhide {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.2);
}

.monster-type-badge--ancient {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.4);
    color: #fde047;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.2);
}

.monster-tier-badge {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--ui-text-dim);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Monster Portrait Frame */
.monster-portrait-frame {
    position: relative;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 50%, rgba(30, 30, 50, 0.8) 0%, rgba(10, 10, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
    overflow: hidden;
}

.combat-card--preview .monster-portrait-frame {
    height: 90px;
}

.monster-portrait-frame--vitality {
    background: radial-gradient(circle at 50% 50%, rgba(127, 29, 29, 0.4) 0%, rgba(15, 10, 15, 0.95) 100%);
    border-color: rgba(239, 68, 68, 0.25);
}

.monster-portrait-frame--savage {
    background: radial-gradient(circle at 50% 50%, rgba(154, 52, 18, 0.4) 0%, rgba(18, 10, 10, 0.95) 100%);
    border-color: rgba(249, 115, 22, 0.25);
}

.monster-portrait-frame--ironhide {
    background: radial-gradient(circle at 50% 50%, rgba(71, 85, 105, 0.4) 0%, rgba(15, 20, 28, 0.95) 100%);
    border-color: rgba(148, 163, 184, 0.25);
}

.monster-portrait-frame--ancient {
    background: radial-gradient(circle at 50% 50%, rgba(113, 63, 18, 0.4) 0%, rgba(20, 18, 10, 0.95) 100%);
    border-color: rgba(234, 179, 8, 0.25);
}

.monster-portrait-svg-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.monster-portrait-svg-wrap svg {
    width: auto;
    height: 90%;
    max-width: 90%;
    object-fit: contain;
}

.combat-card--preview .monster-portrait-svg-wrap svg {
    height: 80%;
}

.monster-pack-chip {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.7em;
    font-weight: 700;
    color: #fef08a;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 4px;
    padding: 2px 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Card content styles */
.monster-name {
    font-size: 1.2em;
    font-weight: 700;
    text-align: center;
    color: var(--p-ffffff);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.combat-card--preview .monster-name {
    font-size: 1.05em;
    margin-bottom: 8px;
}

.monster-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.monster-stats .ui-bd-row {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.monster-stats .ui-bd-row:last-child {
    border-bottom: none;
}

/* Fight Button Styles */
.combat-fight-btn {
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.combat-fight-btn--active {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    border-color: #f87171 !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
    animation: fightPulse 1.5s infinite;
}

@keyframes fightPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(239, 68, 68, 0.8);
    }
}

/* Drops row */
.carousel-drops-row {
    cursor: help;
}

.carousel-drops-row:hover {
    background: rgba(78, 205, 196, 0.12);
    border-radius: 3px;
}

.carousel-drops-value {
    color: var(--ui-text-mute);
    font-style: italic;
    font-size: 0.9em;
}

.carousel-drops-row:hover .carousel-drops-value {
    color: var(--ui-teal);
}

/* ─── Mobile: single centered card between the nav arrows ───
   The desktop 3-card carousel (340px center + two 280px previews) is far wider than a
   phone screen and overflows horizontally. On mobile we hide the previews and let the
   center card fill the space between the ◀ ▶ buttons. */
@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) {
    .monster-carousel { padding: 8px; gap: 10px; }
    .carousel-container { gap: 6px; width: 100%; }
    .combat-nav-btn { padding: 10px 12px; font-size: 1.2em; }
    .carousel-cards-wrapper { gap: 0; flex: 1; min-width: 0; }
    .combat-card--preview { display: none; }
    .combat-card--center { width: 100%; box-sizing: border-box; }
    .monster-portrait-frame { height: 100px; }
    .monster-name { font-size: 1.1em; margin-bottom: 8px; }
    .monster-stats { margin-bottom: 10px; }
}

/* Floating drops tooltip (follows mouse) */
.drops-floating-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    background: linear-gradient(135deg, var(--p-1e1e2e) 0%, var(--p-15152a) 100%);
    border: 1px solid var(--ui-teal);
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 180px;
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.4);
}

.drops-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
    font-size: 0.85em;
    color: var(--p-cccccc);
}

.drops-tooltip-row .drops-chance {
    color: var(--ui-teal);
    font-weight: bold;
}

/* Infinity Symbol Styles */
@keyframes infinityFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.infinity-symbol {
    color: var(--p-a855f7);
    text-shadow:
        0 0 5px var(--p-a855f7),
        0 0 10px var(--p-a855f7),
        0 0 20px var(--p-9333ea),
        0 0 30px var(--p-7c3aed);
    animation: infinityFloat 2s ease-in-out infinite;
    display: inline-block;
    font-weight: bold;
}

.renown {
    color: var(--p-fbbf24);
    font-weight: 600;
}

.combat-drop-preview { width:100%; padding-bottom:8px; }
.combat-preview-title { font-weight:700; }
.combat-preview-monster { display:flex; justify-content:center; height:96px; margin:4px 0; }
.combat-preview-monster svg { width:96px; height:96px; }
.combat-preview-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:6px 0; border-bottom:1px solid #86916c50; }
.combat-preview-stats .drops-tooltip-row { flex-direction:column; gap:2px; text-align:center; }
.combat-preview-drops { padding-top:6px; }
.combat-preview-drops .drops-tooltip-row { align-items:center; gap:6px; }
.combat-preview-drops .drops-tooltip-row > span:first-child { display:flex; align-items:center; gap:5px; min-width:0; overflow-wrap:anywhere; }
.combat-preview-icon { display:inline-flex; width:24px; height:24px; flex-shrink:0; }
.combat-preview-icon > svg, .combat-preview-icon > img { width:24px; height:24px; object-fit:contain; }
