.pixel-tool-body {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(13, 13, 13, 0.96), rgba(13, 13, 13, 0.82)),
        url("../assets/images/homepage-hero-maker.png") center / cover no-repeat,
        #111;
}

.pixel-tool-main {
    position: relative;
    width: 100vw;
    height: 100vh;
    padding: 16px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
}

.pixel-tool-topbar {
    display: flex;
    align-items: center;
    min-height: 46px;
}

.pixel-back {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: #fff;
    text-decoration: none;
    background: rgba(32, 32, 32, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 -4px 0 rgba(0, 0, 0, 0.28),
        0 10px 20px rgba(0, 0, 0, 0.22);
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.pixel-back::before {
    content: "<";
    margin-right: 10px;
}

.pixel-tool-section,
.pixel-tool-shell,
.pc-canvas-wrapper {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.pixel-tool-shell {
    position: relative;
    color: #f4ead9;
}

.pc-canvas-wrapper {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
}

.pc-canvas {
    position: relative;
    min-height: 0;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        #151515;
    background-position: 0 0, 0 16px, 16px -16px, -16px 0;
    background-size: 32px 32px;
    border: 2px solid rgba(255, 235, 205, 0.2);
    box-shadow:
        inset 0 0 0 4px rgba(0, 0, 0, 0.28),
        0 20px 48px rgba(0, 0, 0, 0.35);
}

.pc-drop-zone,
.pc-preview {
    position: absolute;
    inset: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-drop-zone {
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    border: 2px dashed rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.18);
    transition: border-color 160ms ease, background 160ms ease;
}

.pc-drop-zone:hover,
.pc-drop-zone.pc-drag-over {
    border-color: #d7f36d;
    background: rgba(79, 158, 58, 0.12);
}

.pc-drop-plus,
.pc-drop-text,
.pc-info,
.pc-nav-btn,
.mc-action {
    font-family: "MinecraftAE", "Microsoft YaHei", sans-serif;
}

.pc-drop-plus {
    color: rgba(255, 255, 255, 0.62);
    font-size: 4.4rem;
    line-height: 1;
}

.pc-drop-text {
    color: #fff4dd;
    text-align: center;
    font-size: clamp(1.2rem, 2.5vw, 2.1rem);
    line-height: 1.28;
}

.pc-drop-hint {
    color: rgba(250, 244, 232, 0.7);
    font-size: 1rem;
}

.pc-preview {
    background: rgba(0, 0, 0, 0.22);
}

.pc-preview canvas {
    max-width: 100%;
    max-height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.pc-toolbar {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(10, 10, 10, 0.78);
    border: 1px solid rgba(255, 235, 205, 0.16);
}

.pc-info {
    color: #fff4dd;
}

.pc-info-value {
    color: #d7f36d;
}

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

.mc-action {
    position: relative;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        inset 0 -4px 0 rgba(0, 0, 0, 0.28),
        0 10px 20px rgba(0, 0, 0, 0.22);
    font-size: 0.95rem;
    line-height: 1.1;
}

.mc-action--primary {
    background: #4f9e3a;
    border-color: #79c75d;
}

.mc-action--secondary {
    background: rgba(32, 32, 32, 0.9);
    border-color: rgba(255, 255, 255, 0.22);
}

.pc-nav-btn {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    min-width: 52px;
    min-height: 52px;
    border: 1px solid rgba(255, 235, 205, 0.22);
    color: #fff4dd;
    background: rgba(18, 18, 18, 0.88);
    cursor: pointer;
}

.pc-nav-btn:hover {
    border-color: #d7f36d;
}

.pc-nav-left {
    left: 18px;
}

.pc-nav-right {
    right: 18px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 90;
    transform: translate(-50%, 16px);
    padding: 12px 16px;
    color: #fff;
    background: rgba(18, 18, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 700px) {
    .pixel-tool-main {
        padding: 10px;
        gap: 8px;
    }

    .pixel-back {
        min-height: 40px;
        padding: 0 14px;
    }

    .pc-toolbar {
        display: grid;
    }

    .pc-actions {
        display: grid;
    }

    .pc-actions .mc-action {
        width: 100%;
    }
}
