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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'MinecraftFont', Arial, sans-serif;
    background-color: #2C2C2C;
    background-image: url('/images/background.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #ffffff;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.inventory-background {
    width: 800px;
    max-width: 100%;
    background-image: url('/images/inventory.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    image-rendering: pixelated;
}

.slot {
    position: absolute;
    width: 36px;
    height: 36px;
}

.item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.instructions {
    width: 800px;
    max-width: 100%;
    background-color: rgba(32, 32, 32, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    border: 2px solid #404040;
    margin-bottom: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.subtitle {
    color: #AAAAAA;
    font-size: 1.1em;
    margin-top: 10px;
}

h1 {
    color: #55FF55;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px #1a1a1a;
}

h2 {
    color: #5555FF;
    border-bottom: 2px solid #404040;
    padding-bottom: 10px;
    margin-top: 30px;
}

.section {
    margin-top: 60px;
    margin-bottom: 30px;
}

.section:first-of-type {
    margin-top: 40px;
}

.code-block {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #5555FF;
    font-family: monospace;
    overflow-x: auto;
    margin: 15px 0;
}

.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.parameter {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter code {
    background-color: #2d2d2d;
    padding: 4px 8px;
    border-radius: 3px;
    color: #55FF55;
}

.examples {
    text-align: center;
    margin-top: 40px;
}

.example-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.example-links a {
    background-color: #5555FF;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.example-links a:hover {
    background-color: #7777FF;
    text-decoration: none;
}

.inventory-container {
    width: 352px;
    height: 332px;
    position: relative;
    margin: 50px auto;
    image-rendering: pixelated;
    transform: scale(1.5);
    transform-origin: top center;
}

.inventory-background {
    width: 100%;
    height: 100%;
    background-image: url('/images/inventory.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    image-rendering: pixelated;
}

.inventory-background::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 193px;
    width: 150px;
    height: 150px;
    background-color: #C6C6C6;
    z-index: 1;
    pointer-events: none;
}

.slot {
    width: 32px;
    height: 32px;
    position: absolute;
}

.item {
    width: 32px;
    height: 32px;
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
}

.item-count {
    position: absolute;
    bottom: -1px;
    right: -1px;
    color: white;
    text-shadow: 2px 2px #3f3f3f;
    font-size: 20px;
    font-family: 'MinecraftFont', monospace;
    font-weight: normal;
    line-height: 16px;
    pointer-events: none;
    padding: 0;
    image-rendering: pixelated;
}

.item-tooltip {
    display: none;
    position: absolute;
    background-color: rgba(16, 0, 16, 0.94);
    padding: 4px 8px;
    border: 1px solid rgba(16, 0, 16, 0.94);
    z-index: 1000;
    white-space: nowrap;
    font-family: 'MinecraftFont', monospace;
    font-size: 14px;
    left: 100%;
    top: 0;
    margin-left: 4px;
    pointer-events: none;
}

.tooltip-name {
    color: rgb(255, 255, 255);
    margin-bottom: 2px;
    font-weight: normal;
}

.tooltip-enchants {
    margin: 2px 0;
}

.tooltip-enchants div {
    color: rgb(153, 153, 255);
    font-style: normal;
    font-size: 14px;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
    line-height: 16px;
    white-space: nowrap;
}

.tooltip-lore {
    margin-top: 2px;
    color: rgb(119, 119, 119);
    font-style: italic;
    font-weight: normal;
}

@keyframes obfuscated {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

.slot:hover .item-tooltip {
    display: block;
}

.item.enchanted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        -45deg,
        transparent 0%,
        transparent 40%,
        rgba(139, 103, 228, 0.25) 45%,
        rgba(139, 103, 228, 0.25) 55%,
        transparent 60%,
        transparent 100%
    );
    mix-blend-mode: overlay;
    background-size: 200% 200%;
    animation: enchanted-glint 3s linear infinite;
    pointer-events: none;
}

@keyframes enchanted-glint {
    0% {
        background-position: 200% 200%;
    }
    100% {
        background-position: -200% -200%;
    }
}

.inventory-background [data-slot="36"],
.inventory-background [data-slot="37"],
.inventory-background [data-slot="38"],
.inventory-background [data-slot="39"],
.inventory-background [data-slot="40"] {
    background-color: #908c8c;
}

.inventory-background [data-slot="36"] .item,
.inventory-background [data-slot="37"] .item,
.inventory-background [data-slot="38"] .item,
.inventory-background [data-slot="39"] .item,
.inventory-background [data-slot="40"] .item {
    z-index: 1;
}

.inventory-background [data-slot="41"] {
    background-color: #908c8c;
}

.inventory-background [data-slot="41"] .item {
    z-index: 1;
}

.link-share-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.copy-link-btn {
    background-color: rgba(32, 32, 32, 0.8);
    color: #e0e0e0;
    border: 2px solid #404040;
    padding: 8px 16px;
    font-family: 'MinecraftFont', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    outline: none;
}

.copy-link-btn:hover {
    background-color: rgba(64, 64, 64, 0.9);
    color: #ffffff;
    border-color: #55FF55;
    transform: scale(1.05);
    box-shadow: 
        inset 0 0 15px rgba(85, 255, 85, 0.2),
        0 4px 8px rgba(0,0,0,0.3);
}

.copy-link-btn:active {
    background-color: rgba(85, 255, 85, 0.2);
    color: #ffffff;
    transform: scale(0.95);
    box-shadow: 
        inset 0 0 20px rgba(85, 255, 85, 0.3),
        0 1px 2px rgba(0,0,0,0.1);
}

@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .instructions {
        width: 100%;
        padding: 15px;
    }

    .inventory-background {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }

    .instructions {
        padding: 15px;
    }
}