* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #1a1a1a;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 草方块背景 */
.bedrock-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, #87CEEB 0%, #87CEEB 40%, #7EC850 40%, #7EC850 45%, #8B7355 45%, #8B7355 100%),
        repeating-linear-gradient(90deg, transparent 0px, transparent 15px, rgba(0,0,0,0.1) 15px, rgba(0,0,0,0.1) 16px),
        repeating-linear-gradient(0deg, transparent 0px, transparent 15px, rgba(0,0,0,0.1) 15px, rgba(0,0,0,0.1) 16px);
    animation: grassSway 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes grassSway {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 当只有链接时，容器居中 */
.container.center-only {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container.center-only .inventory-container {
    margin-bottom: 0;
    max-width: 1400px;
    width: 100%;
}

/* 标题区域 */
.mc-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 4px solid #5a5a5a;
    box-shadow: 
        inset 0 0 0 2px #8b8b8b,
        0 8px 0 #000,
        0 8px 20px rgba(0, 0, 0, 0.8);
    image-rendering: pixelated;
}

.mc-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffff55;
    text-shadow: 
        3px 3px 0 #aa8800,
        0 0 20px rgba(255, 255, 85, 0.5);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.mc-subtitle {
    font-size: 1rem;
    color: #aaaaaa;
    text-shadow: 2px 2px 0 #000;
}

/* 物品栏容器 */
.inventory-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    padding: 20px;
    background: rgba(139, 139, 139, 0.95);
    border: 4px solid #000;
    box-shadow: 
        inset 0 0 0 2px #5a5a5a,
        0 8px 0 #000,
        0 8px 30px rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
}

/* 物品槽 */
.item-slot {
    aspect-ratio: 1;
    background: #373737;
    border: 3px solid #1a1a1a;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.5),
        inset -2px -2px 0 rgba(90, 90, 90, 0.3);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-decoration: none;
    color: #fff;
}

.item-slot:hover {
    background: #4a4a4a;
    border-color: #fff;
    box-shadow: 
        inset 2px 2px 0 rgba(255, 255, 255, 0.2),
        inset -2px -2px 0 rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* 物品图标 - SVG 样式 */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    overflow: hidden;
}

.item-icon {
    font-size: 48px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

/* 图片图标样式 */
.item-icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
    object-fit: contain;
}

/* SVG 直接嵌入样式 */
.item-slot svg:not(.icon) {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

/* 强制所有SVG元素使用单一白色 */
.item-slot .icon * {
    fill: #ffffff !important;
    stroke: none !important;
}

/* 物品名称 */
.item-name {
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 2px 2px 0 #000;
    display: block;
    line-height: 1.4;
    word-break: break-word;
    text-align: center;
    color: #ffffff;
}

.item-slot:hover .item-name {
    color: #ffff55;
}

.item-slot:hover .item-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

.item-slot:hover .item-icon-img {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

.item-slot:hover svg:not(.icon) {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

/* 动画效果 - 保留但不使用 */
@keyframes redstoneBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glowPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

@keyframes blazeFlicker {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.1); }
    50% { filter: brightness(0.95); }
    75% { filter: brightness(1.05); }
}

/* 物品名称 */
.item-name {
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 2px 2px 0 #000;
    display: block;
    line-height: 1.4;
    word-break: break-word;
    text-align: center;
}

.item-slot:hover .item-name {
    color: #ffff55;
}

.item-slot:hover .item-icon {
    transform: scale(1.1);
}

/* 页脚 */
.mc-footer {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 4px solid #5a5a5a;
    box-shadow: 
        inset 0 0 0 2px #8b8b8b,
        0 8px 0 #000;
    color: #888;
    text-shadow: 2px 2px 0 #000;
}

.beian-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.beian-item {
    font-size: 1rem;
    margin: 0;
}

.mc-footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mc-footer a:hover {
    color: #ffff55;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mc-title {
        font-size: 1.8rem;
    }
    
    .mc-subtitle {
        font-size: 0.9rem;
    }
    
    .inventory-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
        padding: 15px;
    }
    
    .item-icon {
        font-size: 36px;
        margin-bottom: 8px;
    }
    
    .item-icon-img {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }
    
    .item-slot svg:not(.icon) {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }
    
    .item-name {
        font-size: 0.85rem;
    }
    
    .mc-footer {
        padding: 20px;
    }
    
    .beian-item {
        font-size: 0.85rem;
    }
    
    .beian-info {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .mc-title {
        font-size: 1.5rem;
    }
    
    .inventory-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 4px;
        padding: 10px;
    }
    
    .item-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .item-icon-img {
        width: 28px;
        height: 28px;
        margin-bottom: 6px;
    }
    
    .item-slot svg:not(.icon) {
        width: 28px;
        height: 28px;
        margin-bottom: 6px;
    }
    
    .item-name {
        font-size: 0.8rem;
    }
    
    .item-slot {
        padding: 8px;
    }
    
    .mc-footer {
        padding: 15px;
    }
    
    .beian-item {
        font-size: 0.8rem;
    }
    
    .beian-info {
        gap: 10px;
    }
}

/* 像素化图像渲染 */
img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* 选中文本样式 */
::selection {
    background: #5a5a5a;
    color: #ffff55;
}

::-moz-selection {
    background: #5a5a5a;
    color: #ffff55;
}
