/* ==========================================================================
   TURACG — ALCHEMICAL SANCTUM & TRANSMUTATION ENGINE
   Polished Arcane Aesthetics & Generous Non-Overlapping Layout
   ========================================================================== */

/* Main Container */
.alchemy-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* Header Banner */
.alchemy-header-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 27, 75, 0.88) 50%, rgba(15, 23, 42, 0.88) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 18px;
    padding: 20px 28px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(168, 85, 247, 0.15);
    backdrop-filter: blur(16px);
}

.alchemy-header-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 600px at 20% 0%, rgba(192, 132, 252, 0.15), transparent 70%),
                radial-gradient(circle 500px at 80% 100%, rgba(56, 189, 248, 0.12), transparent 70%);
    pointer-events: none;
}

.alchemy-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.alchemy-header-left {
    max-width: 820px;
}

.alchemy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.4);
    color: #e9d5ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.alchemy-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
    text-shadow: 0 0 25px rgba(192, 132, 252, 0.3);
}

.alchemy-subtitle {
    color: #cbd5e1;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.alchemy-rules-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rule-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 11.5px;
    font-weight: 600;
    color: #f1f5f9;
}

.rule-pill .pill-icon {
    font-size: 12px;
    color: #c084fc;
}

.rule-pill.highlight {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fef08a;
}

.rule-pill.highlight .pill-icon {
    color: #fbbf24;
}

/* ==================== THE TRANSMUTATION ALTAR ==================== */
.alchemy-altar-stage {
    position: relative;
    background: radial-gradient(circle 900px at 50% 35%, rgba(30, 27, 75, 0.95) 0%, rgba(10, 15, 30, 0.98) 60%, rgba(2, 6, 23, 1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.32);
    border-radius: 24px;
    padding: 30px 24px 34px;
    overflow: hidden;
    box-shadow: 0 16px 50px -10px rgba(0, 0, 0, 0.9), inset 0 0 70px rgba(168, 85, 247, 0.1);
}

/* Ambient Sacred Circle */
.altar-sacred-circle {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 720px;
    pointer-events: none !important;
    opacity: 0.28;
    transition: opacity 0.5s ease;
}

.altar-sacred-circle * {
    pointer-events: none !important;
}

.circle-svg {
    width: 100%;
    height: 100%;
    animation: rotateSacredCircle 70s linear infinite;
    transform-origin: center;
}

.circle-inner-svg {
    position: absolute;
    inset: 18%;
    width: 64%;
    height: 64%;
    animation: counterRotateSacredCircle 40s linear infinite;
    transform-origin: center;
}

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

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

.alchemy-altar-stage.is-transmuting .circle-svg {
    animation-duration: 3.5s;
    opacity: 0.85;
}

.alchemy-altar-stage.is-transmuting .circle-inner-svg {
    animation-duration: 2s;
    opacity: 0.85;
}

/* Altar Content: Distinct Top Row for Pedestals + Distinct Bottom Row for Crucible */
.altar-content-flow {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    width: 100%;
}

/* ==================== 1. PEDESTALS ROW (SEPARATED, ZERO OVERLAP) ==================== */
.pedestals-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    flex-wrap: wrap;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

@media (max-width: 860px) {
    .pedestals-row {
        gap: 20px;
        justify-content: center;
    }
}

#pedestal-mount-0,
#pedestal-mount-1,
#pedestal-mount-2,
.alchemy-pedestal,
.alchemy-wrapper .altar-pedestal {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    height: 430px;
    min-height: 430px;
    flex: 0 0 220px;
    pointer-events: auto !important;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    background: transparent;
    box-sizing: border-box;
    z-index: 10;
}

.pedestal-slot-number {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #e2e8f0;
    margin-bottom: 10px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
    user-select: none;
}

.pedestal-slot-number .slot-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a855f7;
    box-shadow: 0 0 10px #c084fc;
}

.alchemy-pedestal.filled .pedestal-slot-number,
.altar-pedestal.filled .pedestal-slot-number {
    border-color: rgba(56, 189, 248, 0.7);
    background: rgba(12, 74, 110, 0.85);
    color: #bae6fd;
}

.alchemy-pedestal.filled .pedestal-slot-number .slot-dot,
.altar-pedestal.filled .pedestal-slot-number .slot-dot {
    background: #38bdf8;
    box-shadow: 0 0 12px #38bdf8;
}

/* Card Slot Frame (Exactly Matches 220px x 310px Card Size) */
.pedestal-card-slot {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    height: 310px;
    min-height: 310px;
    max-height: 310px;
    border-radius: var(--card-radius, 12px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto !important;
}

/* Empty Pedestal Slot - High Contrast & Unmistakable */
.pedestal-card-slot.empty {
    border: 2px dashed rgba(192, 132, 252, 0.8);
    background: radial-gradient(circle at 50% 50%, rgba(88, 28, 135, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: inset 0 0 35px rgba(168, 85, 247, 0.28), 0 8px 24px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    pointer-events: auto !important;
}

.pedestal-card-slot.empty:hover {
    border-color: #c084fc;
    background: radial-gradient(circle at 50% 50%, rgba(126, 34, 206, 0.55) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: inset 0 0 45px rgba(192, 132, 252, 0.45), 0 12px 32px rgba(168, 85, 247, 0.4);
    transform: translateY(-4px) scale(1.02);
}

.empty-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    gap: 12px;
    pointer-events: none;
}

.empty-slot-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.25);
    border: 1.5px solid rgba(192, 132, 252, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
    animation: pulseIconGlow 3s ease-in-out infinite;
}

@keyframes pulseIconGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(168, 85, 247, 0.3); }
    50% { transform: scale(1.08); box-shadow: 0 0 25px rgba(168, 85, 247, 0.55); }
}

.empty-slot-label {
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.08em;
}

.empty-slot-hint {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.4;
}

.btn-slot-browse {
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid rgba(192, 132, 252, 0.7);
    border-radius: 12px;
    color: #f3e8ff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Occupied Pedestal Slot */
.pedestal-card-slot.occupied {
    background: transparent;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 32px -5px rgba(0, 0, 0, 0.85);
    pointer-events: auto !important;
}

.pedestal-card-slot.occupied:hover {
    transform: translateY(-4px);
}

.pedestal-card-slot .card-3d-wrapper {
    width: 220px;
    height: 310px;
    pointer-events: auto !important;
}

/* Eject Button for Slotted Card */
.pedestal-eject-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease;
    transform: translateZ(50px);
    pointer-events: auto !important;
}

.pedestal-eject-btn:hover {
    background: #dc2626;
    transform: scale(1.15) rotate(90deg) translateZ(50px);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
}

/* Standalone Explicit Cancel Button Below Card */
.btn-cancel-slotted-card {
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.7);
    color: #fecaca;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    z-index: 50;
    pointer-events: auto !important;
}

.btn-cancel-slotted-card:hover {
    background: rgba(239, 68, 68, 0.5);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

.pedestal-placeholder-btn-space {
    height: 36px;
    margin-top: 10px;
    box-sizing: border-box;
}

.pedestal-base-plinth {
    width: 170px;
    height: 18px;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 10px 10px 16px 16px;
    margin-top: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(168, 85, 247, 0.2);
}

/* ==================== 2. CRUCIBLE CORE & STATUS (STANDALONE ROW BELOW SLOTS) ==================== */
.crucible-core-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 640px;
    text-align: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Plasma Crucible Orb */
.crucible-orb-container {
    position: relative;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crucible-plasma-orb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f3e8ff 0%, #c084fc 35%, #7e22ce 70%, #3b0764 100%);
    box-shadow: 0 0 25px rgba(192, 132, 252, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.6);
    position: relative;
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(192, 132, 252, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 38px rgba(192, 132, 252, 0.85); }
}

.crucible-energy-ring {
    position: absolute;
    inset: -6px;
    border: 2px solid transparent;
    border-top-color: #38bdf8;
    border-bottom-color: #c084fc;
    border-radius: 50%;
    animation: ringSpin 5s linear infinite;
}

.crucible-energy-ring-2 {
    position: absolute;
    inset: -12px;
    border: 1px dashed rgba(245, 158, 11, 0.6);
    border-radius: 50%;
    animation: ringSpinCounter 8s linear infinite;
}

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

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

/* Transmutation Status & Recipe Preview Card */
.crucible-status-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 22px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.crucible-status-card.ready {
    border-color: rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.92) 0%, rgba(45, 26, 75, 0.92) 100%);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.25), 0 8px 24px rgba(0, 0, 0, 0.6);
}

.status-badge-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.status-indicator-pill {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.status-indicator-pill.empty {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-indicator-pill.partial {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.status-indicator-pill.ready {
    background: rgba(245, 158, 11, 0.2);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.status-headline {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 3px;
}

.status-description {
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.4;
}

.recipe-evolution-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-from {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.tier-arrow {
    color: #fbbf24;
    font-size: 14px;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.tier-to {
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    text-shadow: 0 0 10px currentColor;
}

/* Transmute Action Buttons Bar */
.altar-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.btn-transmute {
    padding: 14px 34px;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-transmute.disabled,
.btn-transmute:disabled {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-transmute.ready {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 40%, #9333ea 100%);
    border: 1px solid rgba(254, 240, 138, 0.6);
    color: #ffffff;
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.45), 0 0 35px rgba(168, 85, 247, 0.35);
    animation: transmuteReadyPulse 2.5s ease-in-out infinite;
}

.btn-transmute.ready:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 35px rgba(245, 158, 11, 0.65), 0 0 50px rgba(168, 85, 247, 0.5);
    border-color: #ffffff;
}

.btn-transmute.ready:active {
    transform: translateY(1px) scale(0.98);
}

@keyframes transmuteReadyPulse {
    0%, 100% { box-shadow: 0 6px 25px rgba(245, 158, 11, 0.45), 0 0 35px rgba(168, 85, 247, 0.35); }
    50% { box-shadow: 0 10px 35px rgba(245, 158, 11, 0.75), 0 0 55px rgba(168, 85, 247, 0.6); }
}

.btn-sparkle {
    color: #fef08a;
    font-size: 13px;
}

.btn-alchemy-clear {
    padding: 13px 20px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-alchemy-clear:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: translateY(-2px);
}

.btn-alchemy-clear:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Transmuting Animation Converge States */
.alchemy-altar-stage.is-transmuting .pedestal-card-slot.occupied {
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.alchemy-altar-stage.is-transmuting #pedestal-mount-0 .pedestal-card-slot.occupied {
    transform: translate(120px, 120px) rotate(15deg) scale(0.7);
}

.alchemy-altar-stage.is-transmuting #pedestal-mount-1 .pedestal-card-slot.occupied {
    transform: translate(0, 140px) scale(0.7);
}

.alchemy-altar-stage.is-transmuting #pedestal-mount-2 .pedestal-card-slot.occupied {
    transform: translate(-120px, 120px) rotate(-15deg) scale(0.7);
}

.alchemy-altar-stage.is-transmuting.converge-phase .pedestal-card-slot.occupied {
    transform: scale(0) rotate(180deg) !important;
    opacity: 0 !important;
    transition: all 0.4s ease-in !important;
}

/* ==================== CARD SHELF DRAWER ==================== */
.alchemy-shelf-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px 26px;
    box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(14px);
}

.shelf-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shelf-title-group h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 3px;
}

.shelf-title-group p {
    font-size: 12.5px;
    color: #94a3b8;
}

.shelf-instruction-badge {
    padding: 6px 14px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.35);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #e9d5ff;
}

/* Shelf Toolbar Filters */
.shelf-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shelf-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.shelf-filter-btn {
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shelf-filter-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.shelf-filter-btn.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(192, 132, 252, 0.7);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.shelf-filter-btn.shelf-toggle-compatible {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.shelf-filter-btn.shelf-toggle-compatible:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    color: #ffffff;
}

.shelf-filter-btn.shelf-toggle-compatible.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(234, 88, 12, 0.3) 100%);
    border-color: rgba(245, 158, 11, 0.85);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

/* Shelf Cards Grid */
.alchemy-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    justify-items: center;
}

.shelf-card-tile {
    position: relative;
    cursor: pointer;
    border-radius: var(--card-radius);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.shelf-card-tile:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Slotted in Altar State */
.shelf-card-tile.is-slotted {
    opacity: 0.45;
}

.shelf-card-tile.is-slotted .card-inner {
    filter: grayscale(0.6);
}

.shelf-card-tile .slotted-badge-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.7);
    color: #e9d5ff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    pointer-events: none;
}

/* Compatible / Eligible State */
.shelf-card-tile.is-compatible {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
}

.shelf-card-tile.is-compatible::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--card-radius) + 3px);
    border: 2px solid #38bdf8;
    pointer-events: none;
    z-index: 28;
    animation: compatibleBorderPulse 2s ease-in-out infinite;
}

@keyframes compatibleBorderPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; box-shadow: 0 0 14px #38bdf8; }
}

.shelf-card-tile .card-add-prompt {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(14, 165, 233, 0.92);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 30;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
}

.shelf-card-tile.is-compatible:hover .card-add-prompt {
    opacity: 1;
    transform: translateY(-2px);
}

/* Incompatible Cards */
.shelf-card-tile.is-incompatible {
    opacity: 0.35;
    filter: saturate(0.35);
}

.shelf-card-tile.is-incompatible:hover {
    transform: none;
}

.shelf-card-tile .incompatible-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    z-index: 30;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.shelf-card-tile.is-incompatible:hover .incompatible-tag {
    opacity: 1;
}

/* ==================== PERSISTENT TRANSMUTATION DOCK ==================== */
.alchemy-sticky-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 27, 75, 0.96) 100%);
    border: 1px solid rgba(168, 85, 247, 0.55);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(168, 85, 247, 0.3);
    backdrop-filter: blur(16px);
    animation: dockSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 95vw;
    flex-wrap: wrap;
    justify-content: center;
}

@keyframes dockSlideUp {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.dock-slots-preview {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dock-slot-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.dock-slot-item.empty {
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: #64748b;
    padding: 6px 12px;
}

.dock-slot-item.filled {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f1f5f9;
    cursor: pointer;
}

.dock-slot-item.filled:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    transform: translateY(-2px);
}

.dock-slot-remove {
    font-size: 11px;
    color: #ef4444;
    font-weight: 900;
    margin-left: 4px;
}

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

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

.dock-indicator {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 8px;
    text-transform: uppercase;
}

.dock-indicator.partial {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.dock-indicator.ready {
    background: rgba(245, 158, 11, 0.2);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.dock-recipe-label {
    font-size: 12px;
    color: #e2e8f0;
}

.dock-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== REVELATION / SUCCESS MODAL ==================== */
.alchemy-reveal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.35s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alchemy-reveal-card-dialog {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 2px solid rgba(245, 158, 11, 0.6);
    border-radius: 26px;
    padding: 36px;
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 80px -10px rgba(0, 0, 0, 0.9), 0 0 80px rgba(245, 158, 11, 0.35);
    animation: scaleUpDialog 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUpDialog {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.reveal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reveal-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.reveal-title-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #fbbf24;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.reveal-headline {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
}

.reveal-evolution-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    font-size: 11.5px;
    font-weight: 800;
    margin-bottom: 20px;
}

.reveal-card-stage {
    margin-bottom: 22px;
    display: flex;
    justify-content: center;
}

.reveal-card-stage .card-3d-wrapper {
    width: 220px;
    height: 310px;
    animation: revealCardRise 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes revealCardRise {
    from { transform: translateY(35px) scale(0.85); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.reveal-meta-info {
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
}

.reveal-actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   Time-Based Alchemy & Countdown Engine Styles
   ========================================================================== */

.rule-pill.timer-pill {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #bae6fd;
    font-weight: 700;
}

.status-indicator-pill.in-progress {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    animation: pulseBrewingBadge 2s ease-in-out infinite;
}

@keyframes pulseBrewingBadge {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); box-shadow: 0 0 18px rgba(56, 189, 248, 0.6); }
}

.crucible-status-card.in-progress {
    border-color: rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.95) 100%);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2), 0 8px 24px rgba(0, 0, 0, 0.6);
}

.alchemy-timer-container {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.alchemy-countdown-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alchemy-timer-icon {
    font-size: 18px;
    animation: timerSpin 3s ease-in-out infinite;
}

@keyframes timerSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.alchemy-timer-digits {
    font-family: var(--font-display, monospace);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #38bdf8;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.alchemy-timer-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.alchemy-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.alchemy-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #a855f7 50%, #f59e0b 100%);
    border-radius: 6px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.alchemy-timer-meta {
    font-size: 11.5px;
    color: #cbd5e1;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.alchemy-timer-meta strong {
    color: #f1f5f9;
}

.btn-dev-instant-finish {
    margin-top: 4px;
    padding: 4px 12px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fef08a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dev-instant-finish:hover {
    background: rgba(245, 158, 11, 0.35);
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.pedestal-transmuting-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #e0f2fe;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 60;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.pedestal-transmuting-badge.ready {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.8);
    color: #fef08a;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.btn-transmute.btn-claim-glow {
    background: linear-gradient(135deg, #10b981 0%, #059669 40%, #047857 100%) !important;
    border: 1px solid rgba(167, 243, 208, 0.8) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5), 0 0 35px rgba(16, 185, 129, 0.4) !important;
    animation: claimReadyPulse 2s ease-in-out infinite !important;
}

@keyframes claimReadyPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5), 0 0 35px rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 10px 35px rgba(16, 185, 129, 0.75), 0 0 50px rgba(16, 185, 129, 0.6); }
}

.alchemy-altar-stage.is-brewing .crucible-plasma-orb {
    animation: brewingPlasmaPulse 2s ease-in-out infinite alternate;
}

@keyframes brewingPlasmaPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 30px rgba(56, 189, 248, 0.6); }
    100% { transform: scale(1.1); box-shadow: 0 0 60px rgba(168, 85, 247, 0.9); }
}

.shelf-card-tile.altar-busy {
    opacity: 0.55;
    filter: grayscale(40%);
    cursor: not-allowed !important;
}
