@import url('https://fonts.googleapis.com/css?family=Press+Start+2P');

/* ===== 🎨 Root Theme Variables ===== */
:root {
  --color-dirt-dark: #3b2f2f;
  /* background, borders */
  --color-dirt-clay: #a0522d;
  /* clay red UI bg */
  --color-gold: #ffd700;
  /* gold - buttons, highlights */
  --color-beige: #f5deb3;
  /* text */
  --color-black: #000000;
  /* deep border */
  --color-hover: #9b6d19;
  /* hover feedback */
  --color-ui-dark: #1a1a1a;
  /* dark container background */
  --color-ui-dark2: #000000;
}

/* ===== 🔔 Chat Notification Animations ===== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.6);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 2px 16px rgba(255, 68, 68, 0.9);
  }
}

.chat-message-unread {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Canvas Container ===== */
.canvas-container {
  flex: 1;
  background-color: var(--color-ui-dark);
  border: 2px solid var(--color-black);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

canvas {
  image-rendering: pixelated;
  width: 100%;
  height: 100%;
}

/* ===== Buttons ===== */
button,
input[type=button],
input[type=submit] {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  background-color: var(--color-dirt-dark);
  color: var(--color-black);
  border: 2px solid var(--color-black);
  padding: 10px 16px;
  border-radius: 0;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease;
  border-bottom: var(--color-ui-dark2) 4px solid !important;
}

div{

  font-family: 'Press Start 2P', cursive !important;
}


button:hover,
input[type=button]:hover,
input[type=submit]:hover {
  background-color: var(--color-hover);
  transform: translateY(-2px) rotate(-1.5deg);
}

button:active,
input[type=button]:active {
  background-color: var(--color-dirt-clay);
  color: var(--color-beige);
  transform: translateY(1px) rotate(1deg);
}

/* ===== Inputs ===== */
input[type=text],
textarea,
select {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  background-color: var(--color-beige);
  color: var(--color-black);
  border: 2px solid var(--color-black);
  padding: 6px;
  border-radius: 0;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: 1px dotted var(--color-gold);
  
}

/* ===== Inventory Panel ===== */
#inventory.container {
  /* Provide a border, background, etc., if you like */
  border-radius: 10px;
  background: rgba(20, 20, 20, 1);
  /* You can also add a media query to ensure responsiveness on smaller devices */
  max-width: 70%;
  width: 59%;
  max-height: 70%;
  min-height: 50%;
  height: auto;
  overflow-y: clip;
  /* CR - I want the pieces inside to deal with their overflow not the entire container */
}

/* Title styling */
.inventory-title {
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: underline;
  margin: 0 10px;
  color: whitesmoke;
}


/* Scrollable item list */
.item-list {
  flex: 1;
  overflow: hidden auto;
  padding: 4px;
}

.item-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item-list li,
.item-list div {
  padding: 6px;
  margin: 3px 0;
  background: transparent;
  cursor: pointer;
}

.item-list li:hover,
.item-list div:hover,
.item-list .selected {
  background-color: var(--color-gold);
  color: var(--color-dirt-dark);
}


.entry-animation {
  animation: cardEntry 0.5s forwards;
}


/* Misc elements */
.spacebar-hotkey {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-ui-dark);
  border: 2px solid var(--color-black);
  padding: 6px;
  font-size: 1rem;
  color: white;
  cursor: pointer;
}

.tag-bar {
  display: flex;
  justify-content: center;
  gap: 5px;
  border-bottom: 2px solid var(--color-black);
  padding: 4px 0;
}

.tag-button {
  padding: 6px 12px;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  background-color: var(--color-dirt-clay);
  color: var(--color-beige);
  border: 1px solid var(--color-black);
  border-radius: 0;
  cursor: pointer;
}


.buildOption {
  background-color: var(--color-dirt-dark);
  color: var(--color-beige);
  border: 1px solid var(--color-black);
  padding: 8px;
  font-size: 14px;
  margin: 6px 0;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
  background: var(--color-black);
}

::-webkit-scrollbar-track {
  background: var(--color-ui-dark);
}

::-webkit-scrollbar-thumb {
  background: #555;
  border: 1px solid var(--color-black);
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* ===== Responsive Fixes ===== */
@media (max-width: 768px) {
  .canvas-container {
    width: 100vw;
    height: 100vh;
    flex-direction: column;
  }

  .inventory-panel {
    width: 100%;
    height: 50vh;
  }
}

/* Fullscreen body styling with animated background */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', cursive;
  color: var(--color-ui-dark2);
  overflow: hidden;
  background-image: url('./game/images/floor.png'); /* Your tileable dirt texture */
  background-repeat: repeat;
  background-size: 400px 400px; /* Adjust based on your image */
  animation: scrollDirt 20s linear infinite;
}

@keyframes scrollDirt {
  from { background-position: 0 0; }
  to { background-position: 512px 512px; }
}

@keyframes scrollDirt {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 512px 512px;
  }
}



/* Futuristic Canvas */
canvas {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-color: rgba(20, 20, 20, 0.9);
}



button:active {
  animation: buttonPress 0.1s forwards;
  font-weight: 900;
  border-bottom: none;
}


button:hover::before {
  left: 100%;
}
@keyframes buttonPress {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(0.96) translateY(2px); }
  100% { transform: scale(0.95) translateY(2px); }
}


/* Input focus effect */
input:focus {
  font-size: 2em;
  font-weight: 900;
}


.container {
  padding: 20px;
  border: 2px solid var(--color-dirt-dark);
  background: var(--color-ui-dark);
  border-radius: 10px;
  text-align: center;
  transition: 0.3s ease-in-out;
  flex-grow: calc(10);
}

input:focus {
  font-size: 2em;
  font-weight: 900;
  background-color: var(--color-hover);
  color: var(--color-black);
  outline: none;
  border: #1a1a1a 1px solid;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .canvas-container {
    width: 90vw;
    height: 90vh;
  }

  button {
    font-size: 16px;
    padding: 10px 25px;
  }

  input {
    font-size: 14px;
    padding: 10px;
  }
}


.raceCard {
  background-color: #222;
  color: #fff;
  padding: 20px;
  margin: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  font-size: 1em;
  min-width: 300px;
  border: #222 2px solid;
}

.raceCard:hover {

  background-color: #222;
  border: white 2px solid;
}

.serverEntry:hover {
  border: black 5px solid;

}

/* Set scrollbar width (and optional background for the track area) */
::-webkit-scrollbar {
  width: 8px;
  /* Adjust for desired width */
  background: #111;
  /* Dark background for the scrollbar track */
}

/* Style of the scrollbar track (behind the draggable thumb) */
::-webkit-scrollbar-track {
  background: #111;
  /* Match the main scrollbar background */
  border-radius: 4px;
  /* Gives a subtle rounded track */
}

/* The draggable scrollbar thumb */
::-webkit-scrollbar-thumb {
  background: #555;
  /* Medium gray thumb for a futuristic vibe */
  border-radius: 4px;
  /* Slight rounding for a modern look */
  border: 1px solid #222;
  /* A subtle border that frames the thumb */
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}




/* Tag bar styling */
.tag-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-bottom: 2px solid black;
  height: 2rem;
  /* or auto */
}

tag-bar:hover {
  background-color: var(--color-gold);
}

.tag-button.selected {
  background-color: var(--color-gold);
  color: var(--color-dirt-dark);
}

.bottom-area {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  flex: 1;
}

.item-list {
  flex: 1;
  overflow-y: auto;
  height: 60vh;
}

.item-details {
  flex: 1;
  border-left: 2px solid black;
  overflow-y: clip;
  height: 60vh;
}

@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  .tag-button,
  .buildOption,
  .raceCard,
  .serverEntry {
    font-size: 12px;
    padding: 6px;
  }
  #raceTitle {
    font-size: calc(1vw + 4px);
    top: 20%;
    padding: 6px 12px;
  }

  .inventory-title {
    font-size: 1rem;
  }

  .serverEntry {
    min-width: 40px;
    flex-direction: column;
  }
  input,
  textarea,
  select {
    font-size: 12px;
    padding: 6px;
  }

  button {
    font-size: 12px;
    padding: 8px 12px;
  }
  #inventory.container {
    width: 95vw;
    max-height: 80vh;
    padding: 10px;
    overflow-y: auto;
  }
}


#chatToggle:hover {
  animation:none !important;
  transform: translateY(0px) rotate(0deg) !important; 
  background-color: var(--color-ui-dark2);
  border: white 1px solid;
}


/* Bigger, brighter caret */
#Sign_Text_Div {
    caret-color: #00ffff !important;
}

#Sign_Text_Div:focus {
    border: 1px solid #00ffff !important;
    box-shadow: 0 0 8px #00ffff88;
}

/* Force bold/underline styles live preview */
.fmt-bold:checked ~ input,
input.fmt-bold-apply {
    font-weight: bold;
}

.fmt-underline:checked ~ input,
input.fmt-underline-apply {
    text-decoration: underline;
}

.fmt-italic:checked ~ input,
input.fmt-italic-apply {
    font-style: italic;
}

/* ===== System UI Classes ===== */

/* Settings/Pause Container */
.settings-container {
    position: absolute;
    font-family: Arial, sans-serif;
    margin: 0 auto;
    width: 300px;
    background-color: #222;
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

/* Pause Menu Container */
.pause-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 30%;
    height: 40%;
    border: 2px solid black;
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
}

/* System UI Button */
.system-button {
    width: 80%;
    padding: 10px;
    margin: 10px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    background-color: #333;
    border: none;
}

.system-button:hover {
    background-color: #555;
}

/* Settings Button */
.settings-button {
    padding: 10px;
    margin-top: 20px;
    background-color: #444;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.settings-button:hover {
    background-color: #666;
}

/* Slider Container Row */
.slider-row {
    display: flex;
    align-items: center;
}

.slider-label {
    font-size: 16px;
    margin-right: 10px;
    color: white;
}

.slider-input {
    width: 150px;
}

/* Control Label */
.control-label {
    padding: 10px 5px;
    margin: 0;
    text-align: end;
    font-size: 20px;
    color: white;
}

/* Control Button */
.control-button {
    min-width: 90px;
    cursor: pointer;
    padding: 10px 10px;
}

/* Binding UI Container */
.binding-container {
    background-color: var(--color-ui-dark);
    border: 2px solid var(--color-dirt-dark);
    border-radius: 10px;
    padding: 10px;
    z-index: 1001;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Binding Title */
.binding-title {
    padding: 10px 5px;
    margin: 0;
    text-align: center;
    font-size: 30px;
    color: white;
}

/* Content Wrapper */
.binding-content {
    display: flex;
    gap: 20px;
}

/* Names Column */
.binding-names {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Keys Column */
.binding-keys {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Done Button */
.done-button {
    font-size: 25px;
    background-color: rgb(76, 175, 80);
    border-radius: 10px;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    margin-top: 20px;
}

/* Player Status Container */
.player-status-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    min-width: 400px;
    height: 40%;
    border: 2px solid black;
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    overflow: hidden;
    background-color: #222;
    z-index: 999;
    display: none;
}

.player-status-table {
    width: 100%;
    color: white;
    border-collapse: collapse;
    font-size: 1rem;
}

.player-status-table thead {
    background-color: #333;
}

.player-status-table tbody tr {
    border-bottom: 1px solid #444;
}

.player-status-title {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: underline;
}

.player-status-age {
    font-size: 16px;
    color: #00ff00;
    margin-bottom: 15px;
}

.player-status-wrapper {
    overflow-y: auto;
    max-height: 70%;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* SWAP INVENTORY UI - Modern Reactive */
/* ═══════════════════════════════════════════════════════════════ */

.swap-inv-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    height: 70vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    border: 3px solid var(--color-dirt-dark);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.swap-inv-titlebar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: center;
    padding: 16px;
    border-bottom: 2px solid var(--color-dirt-dark);
    background: rgba(0, 0, 0, 0.3);
    gap: 10px;
}

.swap-inv-section-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.swap-inv-close-btn {
    width: 36px;
    height: 36px;
    font-size: 28px;
    padding: 0;
    background: #d32f2f;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.swap-inv-close-btn:hover {
    background: #f44336;
}

.swap-inv-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px;
    flex: 1;
    overflow: hidden;
}

.swap-inv-column {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow-y: auto;
}

.swap-inv-column.swap-inv-middle {
    align-items: center;
    justify-content: flex-start;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.swap-inv-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.swap-inv-item-row:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateX(4px);
}

.swap-inv-item-row.selected {
    background: rgba(76, 175, 80, 0.4);
    border-left: 4px solid var(--color-gold);
}

.swap-inv-item-image {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    flex-shrink: 0;
}

.swap-inv-img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.swap-inv-placeholder {
    font-size: 24px;
    opacity: 0.5;
}

.swap-inv-item-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.swap-inv-item-name {
    font-size: 14px;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swap-inv-item-amount {
    font-size: 12px;
    color: #00ff00;
    margin: 0;
    flex-shrink: 0;
    margin-left: 8px;
}

.swap-inv-detail-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-bottom: 16px;
}

.swap-inv-detail-img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    object-fit: contain;
}

.swap-inv-detail-placeholder {
    font-size: 64px;
    opacity: 0.3;
}

.swap-inv-detail-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin: 8px 0;
    text-align: center;
}

.swap-inv-detail-amount {
    font-size: 14px;
    color: #00ff00;
    margin: 4px 0 12px;
    text-align: center;
}

.swap-inv-detail-desc {
    font-size: 12px;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.swap-inv-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* CRAFTING UI - Modern Reactive */
/* ═══════════════════════════════════════════════════════════════ */

.craft-container {
    position: absolute;
    top: 45%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 1100px;
    height: 75vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    border: 3px solid var(--color-dirt-dark);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.craft-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 2px solid var(--color-dirt-dark);
    background: rgba(0, 0, 0, 0.3);
    gap: 10px;
}

.craft-tab-btn {
    padding: 8px 16px;
    background: #333;
    border: 2px solid transparent;
    color: #999;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.craft-tab-btn:hover {
    color: #fff;
    background: #444;
}

.craft-tab-btn.craft-tab-active {
    color: var(--color-gold);
    background: rgba(255, 193, 7, 0.2);
    border-color: var(--color-gold);
}

.craft-close-btn {
    width: 36px;
    height: 36px;
    font-size: 28px;
    padding: 0;
    background: #d32f2f;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.2s;
}

.craft-close-btn:hover {
    background: #f44336;
}

/* Generic icon button hover/press effects for image-based buttons */
.icon-btn {
  right:10px !important;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.icon-btn:hover {
  transform: translateY(-1px) scale(1.06);
  filter: brightness(1.2) drop-shadow(0 0 6px rgba(255, 0, 0, 0.4));
}
.icon-btn:active {
  transform: translateY(1px) scale(0.95);
  filter: brightness(0.9);
}

.craft-category-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    flex-wrap: wrap;
}

.craft-category-btn {
    padding: 6px 14px;
    background: #333;
    border: 2px solid transparent;
    color: #999;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.craft-category-btn:hover {
    background: #444;
    color: #fff;
}

.craft-category-btn.craft-category-active {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    color: #4caf50;
    font-weight: bold;
}

.craft-search-input {
    margin: 10px 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border 0.2s;
}

.craft-search-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

.craft-search-input::placeholder {
    color: #666;
}

.craft-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    flex: 1;
    overflow: hidden;
}

.craft-column {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow-y: auto;
}

.craft-recipe-list {
    padding: 0;
}

.craft-recipe-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.craft-recipe-row:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateX(4px);
}

.craft-recipe-row.selected {
    background: rgba(76, 175, 80, 0.4);
    border-left: 4px solid var(--color-gold);
}

.craft-recipe-image {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    flex-shrink: 0;
}

.craft-recipe-img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.craft-recipe-placeholder {
    font-size: 24px;
    opacity: 0.5;
}

.craft-recipe-name {
    font-size: 14px;
    color: #fff;
    margin: 0;
    flex: 1;
}

.craft-recipe-details {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.craft-detail-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-bottom: 16px;
}

.craft-detail-img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    object-fit: contain;
}

.craft-detail-placeholder {
    font-size: 64px;
    opacity: 0.3;
}

.craft-detail-name {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 8px 0;
    text-align: center;
}

.craft-detail-desc {
    font-size: 13px;
    color: #ccc;
    margin: 0 0 16px 0;
    line-height: 1.5;
    text-align: center;
}

.craft-detail-ingredients-title {
    font-size: 13px;
    color: var(--color-gold);
    font-weight: bold;
    margin: 8px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.craft-detail-ingredient {
    font-size: 12px;
    color: #4caf50;
    margin: 4px 0;
    padding: 4px 8px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 2px solid rgba(76, 175, 80, 0.5);
}

.craft-detail-ingredient.craft-detail-missing {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
}

.craft-detail-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.craft-detail-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.craft-detail-btn:active:not(:disabled) {
    transform: translateY(0);
}

.craft-detail-btn.craft-detail-btn-disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.craft-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin: auto;
}
