/**
 * Bedrock Level Format Tutorial 样式
 * 基于网站统一设计风格，适配Bedrock Edition特色
 */

/* 基础变量继承 */
:root {
    --bedrock-blue: #4A90E2;
    --bedrock-purple: #8B5CF6;
    --database-green: #10B981;
    --leveldb-orange: #F97316;
    --key-yellow: #FCD34D;
}

/* 主容器样式 */
.tool-container {
    position: relative;
    z-index: 1;
}

/* 装饰元素 */
.database-decoration {
    position: absolute;
    top: -50px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--bedrock-blue), var(--bedrock-purple));
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.leveldb-decoration {
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--database-green), var(--leveldb-orange));
    transform: rotate(45deg);
    opacity: 0.08;
    animation: rotate 12s linear infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes rotate {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* 功能卡片样式 */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--minecraft-panel);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--minecraft-secondary);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bedrock-blue), var(--bedrock-purple));
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.feature-card h3 {
    color: var(--minecraft-yellow);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: #CCCCCC;
    line-height: 1.4;
    margin: 0;
}

/* LevelDB 格式说明 */
.leveldb-format {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.leveldb-format h2 {
    color: var(--bedrock-blue);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.format-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.format-info-card {
    background: rgba(45, 45, 45, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--minecraft-secondary);
    border-left: 4px solid var(--database-green);
}

.format-info-card h3 {
    color: var(--database-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.format-info-card ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.format-info-card li {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.format-info-card strong {
    color: var(--minecraft-green);
}

.format-info-card a {
    color: var(--bedrock-blue);
    text-decoration: none;
}

.format-info-card a:hover {
    text-decoration: underline;
}

.code-example {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    border-left: 3px solid var(--minecraft-green);
    font-family: 'Courier New', monospace;
    color: var(--minecraft-green);
    font-size: 0.9rem;
}

/* Chunk Key Format */
.chunk-key-format {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.chunk-key-format h2 {
    color: var(--key-yellow);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.key-structure {
    margin-top: 1.5rem;
}

.key-structure h3 {
    color: var(--minecraft-yellow);
    margin-bottom: 1rem;
}

.key-components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.component-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
    border-left: 4px solid var(--key-yellow);
}

.component-card h4 {
    color: var(--key-yellow);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.component-card p {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.component-card code {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    color: var(--minecraft-green);
    font-size: 0.8rem;
    display: block;
    margin-top: 0.3rem;
}

.key-length-info {
    background: rgba(252, 211, 77, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--key-yellow);
    margin-top: 1.5rem;
}

.key-length-info h4 {
    color: var(--key-yellow);
    margin-bottom: 1rem;
}

.key-length-info ul {
    padding-left: 1.5rem;
    margin: 0;
}

.key-length-info li {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.key-length-info strong {
    color: var(--key-yellow);
}

/* Key Types Section */
.key-types-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.key-types-section h2 {
    color: var(--leveldb-orange);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.key-category {
    background: rgba(35, 35, 35, 0.8);
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
    overflow: hidden;
}

.key-category .category-header {
    background: rgba(249, 115, 22, 0.1);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--minecraft-secondary);
    transition: background-color 0.3s ease;
}

.key-category .category-header:hover {
    background: rgba(249, 115, 22, 0.2);
}

.key-category .category-header h3 {
    margin: 0;
    color: var(--leveldb-orange);
    font-size: 1.1rem;
    flex-grow: 1;
}

.key-count {
    color: #CCCCCC;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 1rem;
}

.toggle-icon {
    font-size: 1.2rem;
    color: var(--leveldb-orange);
    transition: transform 0.3s ease;
    user-select: none;
}

.key-category.expanded .toggle-icon {
    transform: rotate(90deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(45, 45, 45, 0.6);
    will-change: max-height;
}

.key-category.expanded .category-content {
    max-height: none;
}

.keys-table {
    padding: 1rem;
}

.key-types-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.key-types-table th {
    background: rgba(249, 115, 22, 0.2);
    color: var(--leveldb-orange);
    padding: 0.8rem;
    text-align: left;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--minecraft-secondary);
}

.key-types-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #CCCCCC;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tag-decimal, .tag-hex {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: var(--minecraft-green);
    font-weight: bold;
    text-align: center;
    width: 50px;
}

.tag-ascii {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--key-yellow);
    text-align: center;
    width: 60px;
}

.key-name {
    color: var(--minecraft-yellow);
    font-weight: bold;
    width: 150px;
}

.key-description {
    color: #CCCCCC;
    line-height: 1.4;
}

/* Special Keys Section */
.special-keys-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.special-keys-section h2 {
    color: var(--bedrock-purple);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.special-key-category {
    background: rgba(35, 35, 35, 0.8);
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
    overflow: hidden;
}

.special-key-category .category-header {
    background: rgba(139, 92, 246, 0.1);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--minecraft-secondary);
    transition: background-color 0.3s ease;
}

.special-key-category .category-header:hover {
    background: rgba(139, 92, 246, 0.2);
}

.special-key-category .category-header h3 {
    margin: 0;
    color: var(--bedrock-purple);
    font-size: 1.1rem;
    flex-grow: 1;
}

.special-key-category .category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(45, 45, 45, 0.6);
    will-change: max-height;
}

.special-key-category.expanded .category-content {
    max-height: none;
}

.special-key-category.expanded .toggle-icon {
    transform: rotate(90deg);
}

.special-keys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.special-key-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
    border-left: 4px solid var(--bedrock-purple);
}

.special-key-card h4 {
    color: var(--bedrock-purple);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
}

.special-key-card p {
    color: #CCCCCC;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* level.dat Structure */
.leveldat-structure {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.leveldat-structure h2 {
    color: var(--minecraft-blue);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.leveldat-header {
    background: rgba(16, 185, 129, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--database-green);
    margin-bottom: 2rem;
}

.leveldat-header h3 {
    color: var(--database-green);
    margin-bottom: 1rem;
}

.header-structure {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.header-component {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 4px;
    color: #CCCCCC;
    font-size: 0.9rem;
    border-left: 3px solid var(--database-green);
}

.header-component strong {
    color: var(--database-green);
}

.leveldat-fields h3 {
    color: var(--minecraft-yellow);
    margin-bottom: 1rem;
}

.leveldat-category {
    background: rgba(35, 35, 35, 0.8);
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
    overflow: hidden;
}

.leveldat-category .category-header {
    background: rgba(59, 130, 246, 0.1);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--minecraft-secondary);
    transition: background-color 0.3s ease;
}

.leveldat-category .category-header:hover {
    background: rgba(59, 130, 246, 0.2);
}

.leveldat-category .category-header h4 {
    margin: 0;
    color: var(--minecraft-blue);
    font-size: 1.1rem;
    flex-grow: 1;
}

.leveldat-category .category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(45, 45, 45, 0.6);
    will-change: max-height;
}

.leveldat-category.expanded .category-content {
    max-height: none;
}

.leveldat-category.expanded .toggle-icon {
    transform: rotate(90deg);
}

.field-count {
    color: #CCCCCC;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 1rem;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .fields-grid {
        grid-template-columns: 1fr;
    }
    
    .field-card .json-content {
        font-size: 0.7rem;
        max-height: 100px;
        padding: 0.4rem;
    }
}

.field-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--minecraft-blue);
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 0; /* 允许flex items缩小 */
}

.field-card:hover {
    border-color: var(--minecraft-yellow);
    box-shadow: 0 2px 8px rgba(255, 255, 85, 0.2);
}

.field-card h5 {
    color: var(--minecraft-yellow);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.field-type {
    background: rgba(59, 130, 246, 0.2);
    color: var(--minecraft-blue);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.field-card p {
    color: #CCCCCC;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Field Example容器 */
.field-example {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.field-example strong {
    color: var(--minecraft-yellow);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* JSON容器 */
.json-container {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 长文本和JSON内容的特殊处理 */
.field-card .json-content {
    font-family: 'Courier New', monospace;
    padding: 0.5rem;
    padding-right: 2.5rem; /* 为复制按钮留空间 */
    font-size: 0.75rem;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--minecraft-secondary) transparent;
    color: var(--minecraft-green);
    line-height: 1.3;
    word-spacing: 0.1em;
    margin: 0;
}

/* 复制按钮 */
.copy-json-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 85, 0.2);
    border: 1px solid var(--minecraft-yellow);
    color: var(--minecraft-yellow);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-json-btn:hover {
    background: rgba(255, 255, 85, 0.3);
    transform: scale(1.1);
}

.copy-json-btn:active {
    transform: scale(0.95);
}

.copy-json-btn.copied {
    background: rgba(16, 185, 129, 0.3);
    border-color: var(--minecraft-green);
    color: var(--minecraft-green);
}

/* 滚动条样式 */
.field-card .json-content::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.field-card .json-content::-webkit-scrollbar-track {
    background: transparent;
}

.field-card .json-content::-webkit-scrollbar-thumb {
    background: var(--minecraft-secondary);
    border-radius: 2px;
}

.field-card .json-content::-webkit-scrollbar-thumb:hover {
    background: var(--minecraft-yellow);
}

/* NBT Differences */
.nbt-differences {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.nbt-differences h2 {
    color: var(--minecraft-red);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.differences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.difference-card {
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    position: relative;
}

.difference-card.bedrock {
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--bedrock-blue);
}

.difference-card.java {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--leveldb-orange);
}

.difference-card h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.difference-card.bedrock h3 {
    color: var(--bedrock-blue);
}

.difference-card.java h3 {
    color: var(--leveldb-orange);
}

.difference-card ul {
    padding-left: 1.5rem;
    margin: 0;
}

.difference-card li {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.difference-card strong {
    color: inherit;
}

.difference-card.bedrock strong {
    color: var(--bedrock-blue);
}

.difference-card.java strong {
    color: var(--leveldb-orange);
}

.conversion-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--minecraft-red);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.conversion-warning h4 {
    color: var(--minecraft-red);
    margin-bottom: 0.5rem;
}

.conversion-warning p {
    color: #CCCCCC;
    margin: 0;
    line-height: 1.4;
}

/* LOG Files Format */
.log-files-format {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.log-files-format h2 {
    color: var(--minecraft-blue);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.log-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.log-info-card {
    background: rgba(45, 45, 45, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--minecraft-secondary);
    border-left: 4px solid var(--minecraft-blue);
}

.log-info-card h3 {
    color: var(--minecraft-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.log-info-card p {
    color: #CCCCCC;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.log-info-card ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.log-info-card li {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.log-info-card strong {
    color: var(--minecraft-blue);
}

.log-examples {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-entry {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--database-green);
}

.log-entry code {
    color: var(--database-green);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.log-explanation {
    color: #CCCCCC;
    font-size: 0.85rem;
    margin: 0;
    font-style: italic;
}

.log-troubleshooting {
    margin-top: 2rem;
    background: rgba(249, 115, 22, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--leveldb-orange);
}

.log-troubleshooting h3 {
    color: var(--leveldb-orange);
    margin-bottom: 1rem;
}

.troubleshooting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.troubleshooting-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--leveldb-orange);
}

.troubleshooting-item h4 {
    color: var(--leveldb-orange);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.troubleshooting-item p {
    color: #CCCCCC;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Developer Tools */
.developer-tools {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.developer-tools h2 {
    color: var(--minecraft-green);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tool-card {
    background: rgba(45, 45, 45, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--minecraft-secondary);
    border-left: 4px solid var(--minecraft-green);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.tool-card h3 {
    color: var(--minecraft-green);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tool-card p {
    color: #CCCCCC;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.tool-card ul {
    padding-left: 1.5rem;
    margin: 0;
}

.tool-card li {
    color: #CCCCCC;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tool-card strong {
    color: var(--minecraft-green);
}

/* Best Practices */
.best-practices {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
}

.best-practices h2 {
    color: var(--minecraft-yellow);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.practice-card {
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    position: relative;
}

.practice-card.safety {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--minecraft-red);
}

.practice-card.technical {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--minecraft-blue);
}

.practice-card.performance {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--minecraft-green);
}

.practice-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.practice-card h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.practice-card.safety h3 {
    color: var(--minecraft-red);
}

.practice-card.technical h3 {
    color: var(--minecraft-blue);
}

.practice-card.performance h3 {
    color: var(--minecraft-green);
}

.practice-card ul {
    padding-left: 1.5rem;
    margin: 0;
}

.practice-card li {
    color: #CCCCCC;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.practice-card strong {
    color: inherit;
}

.practice-card.safety strong {
    color: var(--minecraft-red);
}

.practice-card.technical strong {
    color: var(--minecraft-blue);
}

.practice-card.performance strong {
    color: var(--minecraft-green);
}

.compatibility-notice {
    background: rgba(252, 211, 77, 0.1);
    border: 2px solid var(--minecraft-yellow);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.compatibility-notice h4 {
    color: var(--minecraft-yellow);
    margin-bottom: 0.5rem;
}

.compatibility-notice p {
    color: #CCCCCC;
    margin: 0;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .format-info-grid,
    .key-components-grid,
    .differences-grid,
    .tools-grid,
    .practices-grid {
        grid-template-columns: 1fr;
    }
    
    .key-types-table {
        font-size: 0.75rem;
    }
    
    .key-types-table th,
    .key-types-table td {
        padding: 0.5rem;
    }
    
    .tag-decimal, .tag-hex {
        width: auto;
        min-width: 40px;
    }
    
    .key-name {
        width: auto;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 1rem;
    }
    
    .leveldb-format,
    .chunk-key-format,
    .key-types-section,
    .special-keys-section,
    .leveldat-structure,
    .nbt-differences,
    .developer-tools,
    .best-practices {
        padding: 1.5rem;
    }
    
    .feature-highlights,
    .special-keys-grid,
    .fields-grid {
        grid-template-columns: 1fr;
    }
    
    .key-types-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 动画和过渡效果 */
.feature-card,
.format-info-card,
.component-card,
.special-key-card,
.field-card,
.difference-card,
.tool-card,
.practice-card {
    transition: all 0.3s ease;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* Related Tools Section */
.related-tools-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    border: 2px solid var(--minecraft-secondary);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.related-tools-section h2 {
    color: var(--minecraft-yellow);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.related-tools-subtitle {
    color: #CCCCCC;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-tool-card {
    background: rgba(45, 45, 45, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--minecraft-secondary);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.related-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.2);
    border-color: var(--bedrock-blue);
}

.related-tool-card .tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.related-tool-card h3 {
    color: var(--minecraft-green);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-tool-card p {
    color: #CCCCCC;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tool-relation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.relation-badge {
    background: var(--bedrock-blue);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.relation-reason {
    color: #CCCCCC;
    font-size: 0.8rem;
    line-height: 1.3;
}


/* 打印样式 */
@media print {
    .database-decoration,
    .leveldb-decoration {
        display: none;
    }
    
    .tool-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .feature-card,
    .format-info-card,
    .key-types-section,
    .leveldat-structure {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .related-tools-section {
        display: none;
    }
}
