/* ---------- Estilos Modernizados Minecraft Clicker ---------- */
:root {
    --bg: #101a16;
    --panel: #16221c;
    --panel-2: #0d1511;
    --accent: #1db084;
    --accent-strong: #15a274;
    --text: #e9fbf5;
    --muted: #9fb7b1;
    --license-bg: linear-gradient(90deg, #ffd86b, #ffb64b);
    --glass: rgba(255, 255, 255, 0.04);
    --shadow: 0 4px 24px rgba(0,0,0,0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg), #08100f 80%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    user-select: none;
    min-height: 100vh;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.08);
    box-shadow: var(--shadow);
}

.title {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #0004;
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

button {
    appearance: none;
    border: none;
    background: var(--glass);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

button:hover, .btn-accent:hover {
    background: var(--accent);
    color: #042018;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.btn-accent {
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #042018;
    font-weight: 800;
}

.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 18px;
}

.layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

h2, h3, h4 {
    margin: 0 0 10px 0;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.stat {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.label {
    font-size: 13px;
    color: var(--muted);
}

.val {
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 1px;
}

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#block {
    width: 320px;
    height: 320px;
    border-radius: 16px;
    border: 5px solid rgba(0,0,0,0.32);
    background-size: cover;
    background-position: center;
    margin: 12px 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transition: border-color 0.2s;
    animation: blockPop 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}

#block.lava {
    border-color: #ff6b3a !important;
    box-shadow: 0 0 32px #ff6b3a55;
    animation: shake 0.3s;
}

#block.ready {
    border-color: #ffd86b !important;
    box-shadow: 0 0 32px #ffd86b99;
    animation: pulse 1.2s infinite;
}

@keyframes shake {
    0% { transform: translate(0,0);}
    25% { transform: translate(-4px,2px);}
    50% { transform: translate(4px,-2px);}
    75% { transform: translate(-2px,4px);}
    100% { transform: translate(0,0);}
}

@keyframes blockPop {
    0% { transform: scale(0.7); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 32px #ffd86b99; }
    50% { box-shadow: 0 0 48px #ffd86bcc; }
    100% { box-shadow: 0 0 32px #ffd86b99; }
}

.hp-bar {
    width: 320px;
    height: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    margin-top: 10px;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ee1b0, #89f2ff);
    width: 100%;
    transition: width 0.3s;
}

.particle {
    position: absolute;
    font-weight: 900;
    text-shadow: 0 1px 0 #000, 0 0 8px #fff4;
    animation: rise .9s ease-out forwards;
    user-select: none;
    pointer-events: none;
    font-size: 1.5rem;
}

@keyframes rise {
    0% { opacity: 1; transform: translateY(0);}
    100% { opacity: 0; transform: translateY(-60px);}
}

.tabs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
}

.tab.active {
    background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.04);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 700px) {
    .shop-grid {
        grid-template-columns: 1fr;
    }
}

.shop-item {
    background: rgba(0,0,0,0.18);
    padding: 14px;
    border-radius: 12px;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.09);
}

.icon {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    display: grid;
    place-items: center;
    font-weight: 900;
}

.inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.inv-item {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    cursor: grab;
    border: 1px solid rgba(255,255,255,0.03);
    user-select: none;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s;
}

.inv-item:hover {
    background: var(--accent);
    color: #042018;
}

.inv-item.rare:hover {
    box-shadow: 0 0 16px #4efcff, 0 0 32px #4efcff55;
    border: 2px solid #4efcff;
    animation: rareGlow 1.2s infinite alternate;
}

@keyframes rareGlow {
    0% { box-shadow: 0 0 16px #4efcff; }
    100% { box-shadow: 0 0 32px #4efcff55; }
}

.inv-item img {
    width: 44px;
    height: 44px;
    display: block;
    margin: 0 auto 6px;
    pointer-events: none;
}

.inv-qty {
    font-size: 13px;
    color: var(--muted);
    position: absolute;
    right: 10px;
    bottom: 8px;
    background: rgba(0,0,0,0.22);
    padding: 2px 8px;
    border-radius: 8px;
}

.crafting-area {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 16px;
}

.craft-grid {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
    gap: 8px;
}

.slot {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    display: grid;
    place-items: center;
    border: 2px dashed rgba(255,255,255,0.04);
    font-size: 15px;
    user-select: none;
    position: relative;
    transition: border-color 0.2s;
}

.slot.over {
    border-color: var(--accent);
}

.craft-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#craftBtn {
    background: var(--accent);
    border: none;
    color: #042018;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    transition: background 0.2s;
}

#craftBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chest {
    position: absolute;
    width: 74px;
    height: 74px;
    border-radius: 12px;
    background-size: cover;
    display: grid;
    place-items: center;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    user-select: none;
    transition: box-shadow 0.2s;
}

.chest:hover {
    box-shadow: 0 0 32px #ffd86b99;
}

.pill {
    background: rgba(0,0,0,0.18);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge-owned {
    background: #154f37;
    color: #b5ffe7;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 900;
}

.badge-buy {
    background: #2b3940;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
}

.layer-select {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.layer-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s;
}

.layer-btn.active {
    background: linear-gradient(90deg, #333, #222);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffd86b;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    z-index: 9999;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
    animation: pop .35s cubic-bezier(.68,-0.55,.27,1.55);
}

.license-toast {
    position: fixed;
    right: 24px;
    bottom: 110px;
    background: var(--license-bg);
    color: #111;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    z-index: 10000;
    transform-origin: right bottom;
    animation: pop .35s ease;
    font-size: 1.1rem;
}

@keyframes pop {
    0% { transform: scale(0.7); opacity: 0;}
    100% { transform: scale(1); opacity: 1;}
}

#furnacePanel {
    position: fixed;
    left: 24px;
    bottom: 24px;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    z-index: 999;
    display: none;
    box-shadow: var(--shadow);
}

.furnace-slot {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    display: grid;
    place-items: center;
    border: 2px dashed rgba(255,255,255,0.04);
    margin: 8px;
    user-select: none;
    position: relative;
    transition: border-color 0.2s;
}

.furnace-slot.over {
    border-color: var(--accent);
}

.progress-bar {
    width: 220px;
    height: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb16b, #ff7a3c);
    width: 0%;
    transition: width 0.3s;
}

.stack-count {
    position: absolute;
    background: rgba(0,0,0,0.7);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 13px;
    bottom: 6px;
    right: 6px;
    color: #ffd86b;
    font-weight: 800;
}
#block.lava-hit {
    animation: lavaExplode 0.5s;
}
@keyframes lavaExplode {
    0% { filter: brightness(1.2) blur(0px);}
    50% { filter: brightness(2) blur(4px);}
    100% { filter: brightness(1) blur(0px);}
}
.nether body,
.nether .panel {
    --panel: #3a0e0e;
    --panel-2: #2e0b07;
    --accent: #ff8a6b;
    --accent-strong: #ff5936;
}

.nether #block {
    border-color: #5a0c0c;
    box-shadow: 0 0 32px #ff8a6b55;
}