/* Block Page Styles - Everything Minecraft */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-accent: #ecf0f1;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.12);
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
    font-weight: 400;
    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for webkit browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Clean scrollbars - Hide but keep functionality */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 16px;
    padding: 4px 0;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    /* minimal top spacing below navbar */
    margin-top: calc(var(--navbar-height, 80px) + 8px);
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    position: relative;
}

/* Block Header - matching homepage style */
.block-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 48px 24px;
    background: var(--background-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.block-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.block-header .block-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Main content grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    width: 100%;
    overflow-x: hidden;
}

/* Card styling matching homepage nav-items */
.content-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

/* Card headers with blue background */
.card-header {
    padding: 24px;
    background: var(--secondary-color);
    color: white;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.card-header .block-image {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Card content */
.card-content {
    padding: 24px;
    background: var(--background-primary);
}

.card-content p {
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.card-content p:last-child {
    margin-bottom: 0;
}

/* Properties table styling */
.properties-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.properties-table th,
.properties-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.properties-table th {
    background: var(--background-accent);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.properties-table td {
    color: var(--text-secondary);
    font-weight: 400;
}

.properties-table tr:last-child th,
.properties-table tr:last-child td {
    border-bottom: none;
}

/* Pills/badges styling */
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin: 2px;
}

.pill.yes {
    background: var(--success-color);
    color: white;
}

.pill.no {
    background: var(--text-light);
    color: white;
}

.pill.transparent {
    background: var(--secondary-color);
    color: white;
}

.pill.flammable {
    background: var(--accent-color);
    color: white;
}

.pill.gravity {
    background: var(--warning-color);
    color: white;
}

.pill.decoration {
    background: var(--primary-color);
    color: white;
}

/* OLD Crafting recipe styling - DISABLED TO PREVENT CONFLICTS */
/*
.crafting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 180px;
    margin: 16px auto;
    padding: 16px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
*/

.crafting-slot {
    width: 50px;
    height: 50px;
    background: var(--background-accent);
    border: 2px solid #C0C0C0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.crafting-slot:hover {
    border-color: #9932CC;
    background: var(--background-primary);
}

.crafting-slot img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.crafting-result {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}



/* Recipe sections */
.recipe-section {
    margin: 32px 0;
}

.recipe-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    text-align: center;
}

/* Back button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    box-shadow: var(--shadow-light);
}

.back-button:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* ACTUAL BLOCK.PHP ELEMENTS */

/* Background slideshow */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--background-secondary);
}

.background-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.background-slide.active {
    opacity: 0.05;
}

/* Header section */
.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px 20px;
    background: var(--background-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Ensure anchor jumps land below the fixed navbar */
#shaped, #shapeless, #smelting, #stonecutting {
    scroll-margin-top: calc(var(--navbar-height, 100px) + 16px);
}

/* Push the entire header block down beneath the fixed navbar without enlarging it */
.header {
    /* minimal gap below the navbar */
    margin-top: 4px;
}

.header-content {
    margin-top: 0;
}

@media (max-width: 768px) {
    .header { margin-top: 12px; }
    .header-content { margin-top: 0; }
}

.header-image {
    flex-shrink: 0;
}

.header-image img {
    width: 96px;
    height: 96px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.header-image-fallback {
    width: 96px;
    height: 96px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-accent);
    font-size: 36px;
    color: var(--text-light);
}

.header-text {
    text-align: center;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.header-category {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.header-actions {
    flex-shrink: 0;
}

.report-button {
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.report-button:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Header Navigation Section */
.header-nav-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.header-nav-buttons {
    flex: 1;
}

.recipe-nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 8px;
}

.recipe-nav-btn {
    padding: 12px 24px;
    color: var(--recipe-btn-color, #ffffff);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    box-shadow: var(--shadow-light);
    background: var(--recipe-btn-bg, #27ae60); /* unified green */
}

/* Unified hover for recipe buttons */
.recipe-nav-btn:hover {
    background: var(--recipe-btn-bg-hover, #229954);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Content grid layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    margin-bottom: 48px;
    width: 100%;
    overflow-x: hidden;
}

/* Main content */
.main-content {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    /* visually reduce the main content width and center it within its column */
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.description-section {
    padding: 12px 16px; /* reduced top/bottom padding for tighter spacing */
    border-bottom: 1px solid var(--border-color);
}

.description-section:last-child {
    border-bottom: none;
}

.description-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

.description-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Recipes section */
.recipes-section {
    padding: 16px; /* reduced padding to match description section */
}

.recipes-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 24px 0;
    text-align: center;
}

.recipe-card {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin: 24px 0;
}

.recipe-content {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
}

.recipe-content::before {
    display: none;
}

.recipe-description {
    padding: 16px 20px;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.description-items {
    margin-top: 8px;
}

.description-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.icon-group {
    display: flex;
    gap: 2px;
    margin-right: 8px;
    align-items: center;
}

.recipe-header {
    background: #9932CC;
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 0;
}

/* Color variations for multiple stonecutting recipe headers */
.recipe-header.stonecutting-variant-1 {
    background: #3498db; /* Blue */
}

.recipe-header.stonecutting-variant-2 {
    background: #e74c3c; /* Red */
}

.recipe-header.stonecutting-variant-3 {
    background: #f39c12; /* Orange */
}

.recipe-header.stonecutting-variant-4 {
    background: #27ae60; /* Green */
}

.recipe-header.stonecutting-variant-5 {
    background: #9b59b6; /* Purple */
}

.recipe-type {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.recipe-type-icon {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    padding: 2px;
    background: var(--background-primary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.description-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.recipe-type-tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 160px;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 9999;
    pointer-events: none;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.recipe-type-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}

.recipe-type:hover .recipe-type-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Crafting interface - Iron Helmet style from crafting-tables.html */
.crafting-interface {
    padding: 24px;
    display: block;
    text-align: center;
}

.crafting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.crafting-grid::before {
    display: none;
}

.recipe-slot {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-accent);
    font-size: 24px;
    transition: all 0.2s ease;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
}

.empty-slot {
    width: 50px;
    height: 50px;
    border: 2px dashed var(--text-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-secondary);
    opacity: 0.5;
    position: relative;
}

.recipe-slot:hover {
    border-color: var(--secondary-color);
    box-shadow: none;
}

.empty-slot:hover {
    border-color: var(--secondary-color);
    opacity: 0.7;
}

.empty-slot:hover .recipe-slot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.crafting-arrow {
    text-align: center;
    margin: 20px 0;
    font-size: 24px;
    color: var(--secondary-color);
}

.crafting-arrow img,
.recipe-arrow img {
    opacity: 0;
    width: 48px;
    height: 48px;
}

.recipe-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.recipe-arrow {
    text-align: center;
    margin: 20px 0;
    font-size: 24px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    width: 48px;
    height: 48px;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

.recipe-result-item {
    text-align: center;
    /* smaller square result box */
    aspect-ratio: 1 / 1;
    width: 110px;
    min-width: 100px;
    max-width: 120px;
    padding: 6px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 2px solid var(--success-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.recipe-slot img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: none;
}

.recipe-slot:hover img {
    transform: none;
}

.recipe-slot-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 100px;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 8px;
    pointer-events: none;
}

.recipe-slot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}

.recipe-slot:hover .recipe-slot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.recipe-result-item {
    text-align: center;
    /* consistent smaller square sizing for the result box */
    aspect-ratio: 1 / 1;
    width: 110px;
    min-width: 100px;
    max-width: 120px;
    padding: 6px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 2px solid var(--success-color);
    gap: 4px;
    margin: 0 auto;
    position: relative;
}

.recipe-result-item .item {
    font-size: 32px;
    margin-bottom: 8px;
}

.recipe-result-item .name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.recipe-result-item .count,
.recipe-result-item .recipe-count {
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--success-color);
    padding: 4px 6px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.recipe-result-item img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border-radius: 4px;
    margin-bottom: 4px;
}

.result-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-accent);
    border-radius: 6px;
    font-size: 28px;
    color: var(--text-light);
    border: 2px solid var(--border-color);
}

.recipe-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #000000;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    min-width: 120px;
    max-width: 300px;
    text-align: center;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #333;
}

.recipe-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #000000;
}

.recipe-result-item:hover .recipe-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Smelting interface styling */
.smelting-interface {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
    padding: 20px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: visible;
    position: relative;
}

.smelting-input .recipe-slot {
    width: 70px;
    height: 70px;
    position: relative;
}

/* Ensure tooltips work in smelting interface */
.smelting-ingredient {
    position: relative;
}

.smelting-interface .recipe-slot:hover .recipe-slot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Specific styling for smelting result tooltips */
.smelting-result .recipe-slot:hover .recipe-slot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
    z-index: 2000;
}

.smelting-result .recipe-slot-tooltip {
    z-index: 2000;
    margin-bottom: 12px;
    white-space: nowrap;
    max-width: 200px;
    overflow: visible;
    text-overflow: ellipsis;
}

/* Handle long block names in smelting tooltips */
.smelting-result .recipe-slot-tooltip {
    white-space: normal;
    word-wrap: break-word;
    max-width: 180px;
    line-height: 1.2;
}

/* Ensure smelting tooltips are always visible */
.smelting-result:hover .recipe-slot-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(-2px) !important;
    z-index: 3000 !important;
}

.smelting-process {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.recipe-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 24px;
    width: 48px;
    height: 48px;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.recipe-arrow img {
    opacity: 0;
    width: 48px;
    height: 48px;
}

.recipe-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.furnace-container {
    position: relative;
    padding: 12px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.furnace-icon img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.furnace-fallback {
    width: 40px;
    height: 40px;
    background: var(--text-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 4px;
}

.smelting-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    position: relative;
    cursor: help;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    overflow: visible;
    z-index: 1;
    padding: 12px;
}

.smelting-result .recipe-slot {
    position: relative;
    z-index: 10;
    overflow: visible;
    width: 70px;
    height: 70px;
}

.smelting-result img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border-radius: 4px;
}

.smelting-details {
    margin-top: 8px;
    text-align: center;
}

.cooking-time,
.experience {
    margin: 4px 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.smelting-label {
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 8px;
    background: var(--background-accent);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}

.smelting-value {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid transparent;
    min-width: 40px;
    text-align: center;
}

/* Stonecutting interface styling */
.stonecutting-interface {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* tighter spacing between input/arrow/result */
    margin: 12px 0; /* reduced outer margin */
    /* container removed: keep spacing but no visible box */
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

/* Ensure children don't stretch and are centered (input, arrow, result) */
.stonecutting-interface > * {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stonecutting-input .recipe-slot {
    width: 70px;
    height: 70px;
}

/* Tighten horizontal spacing between input and arrow specifically for stonecutting */
.stonecutting-input {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* remove default spacing so we can control it via the arrow */
}

.stonecutting-interface .recipe-arrow,
.stonecutting-interface .stonecutting-arrow {
    margin: 0 6px; /* smaller horizontal gap between input and arrow */
}

.stonecutting-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 24px;
    width: 48px;
    height: 48px;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.stonecutting-arrow {
    align-self: center;
    margin: 0 6px;
}



.stonecutting-arrow img {
    opacity: 0;
    width: 48px;
    height: 48px;
}

.stonecutting-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/siteimages/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.stonecutter-container {
    position: relative;
    padding: 12px;
    background: var(--background-accent);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.stonecutter-icon img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.stonecutter-fallback {
    width: 40px;
    height: 40px;
    background: var(--text-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 600;
    border-radius: 4px;
}

.stonecutting-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px;
    border-radius: 0;
    position: relative;
    cursor: help;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stonecutting-result img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border-radius: 4px;
}

/* Ensure the stonecutting result slot uses the same dimensions as the input slot */
.stonecutting-result .recipe-slot {
    width: 70px;
    height: 70px;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}


.recipe-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--warning-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.rotating-ingredient {
    transition: opacity 0.3s ease;
}

.no-recipes {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* CRAFTABLE FROM SECTION - "can be used to craft" */
.craftable-from-section {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.craftable-from-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

.craftable-title {
    padding: 20px 24px;
    margin: 0;
    background: var(--secondary-color);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: none;
}

.craftable-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    background: var(--background-primary);
}

.craftable-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    min-height: 120px;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.craftable-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: var(--secondary-color);
    background: var(--background-primary);
    text-decoration: none;
    color: inherit;
}

.craftable-image {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    border: 2px solid var(--border-color);
}

.craftable-placeholder {
    width: 48px;
    height: 48px;
    background: var(--text-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
}

.craftable-details {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.craftable-name {
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: visible; /* Allow tooltips to overflow sidebar boundaries */
}

.info-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: visible; /* Allow tooltips to show outside card boundaries */
    box-shadow: var(--shadow-light);
}

.info-card h3 {
    padding: 20px 24px;
    margin: 0;
    background: var(--secondary-color);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
}

.property-grid {
    padding: 24px;
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative; /* Create positioning context for tooltips */
}

.property-item:last-child {
    border-bottom: none;
}

.property-item-vertical {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.property-item-vertical:last-child {
    border-bottom: none;
}

.property-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    position: relative; /* Create positioning context for tooltips */
}

.tooltip-trigger {
    cursor: help;
}

.property-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    min-width: 200px;
    max-width: 300px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 8px;
    line-height: 1.4;
}

.property-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
}

.tooltip-trigger:hover .property-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Responsive tooltip positioning - move to left side if would overflow right */
.property-item:nth-last-child(-n+3) .property-tooltip,
.property-item-vertical:nth-last-child(-n+2) .property-tooltip {
    right: 0;
    left: auto;
}

.property-item:nth-last-child(-n+3) .property-tooltip::after,
.property-item-vertical:nth-last-child(-n+2) .property-tooltip::after {
    left: auto;
    right: 20px;
}

.property-value {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
}

.light-level {
    color: var(--warning-color);
    font-weight: 600;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.biome-buttons .biome-btn,
.structure-buttons .structure-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.biome-buttons .biome-btn:hover,
.structure-buttons .structure-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

/* Report modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--background-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
}

.modal-header {
    padding: 20px 24px;
    background: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    padding: 20px 24px;
    background: var(--background-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .header {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-nav-section {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .recipe-nav-buttons {
        justify-content: center;
    }
    
    .nav-label {
        margin-right: 0;
        margin-bottom: 8px;
        display: block;
        text-align: center;
    }
    
    .header-actions {
        align-self: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .description-section,
    .recipes-section,
    .property-grid {
        padding: 16px;
    }
    
    .crafting-interface {
        flex-direction: column;
        gap: 16px;
    }
    
    .crafting-grid {
        transform: scale(0.8);
    }
    
    .recipe-slot {
        width: 40px;
        height: 40px;
    }
    
    .recipe-slot img {
        width: 24px;
        height: 24px;
    }
    
    .recipe-result-item img,
    .result-icon {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.75rem;
    }
    
    .header-image img,
    .header-image-fallback {
        width: 72px;
        height: 72px;
    }
    
    .property-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .property-value {
        text-align: left;
    }
    
    .crafting-grid {
        transform: scale(0.7);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
}

/* Command Box Styling */
.command-box {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    position: relative;
}

.command-box code {
    flex: 1;
    color: #00ff00;
    background: transparent;
    border: none;
    font-size: 14px;
    font-family: inherit;
    user-select: all;
}

.copy-btn {
    background: var(--secondary-color);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.command-note {
    display: block;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
}
