:root {
    --zip-tree-width: 100%;   /* adjustable tree width */
}

body {
    font-family: Arial;
    background: #101010;
    color: #fff;
    padding: 20px;
    padding-bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4)), linear-gradient(346deg, rgba(55, 55, 55,0.04) 0%, rgba(55, 55, 55,0.04) 22%,rgba(140, 140, 140,0.04) 22%, rgba(140, 140, 140,0.04) 69%,rgba(225, 225, 225,0.04) 69%, rgba(225, 225, 225,0.04) 100%),linear-gradient(31deg, rgba(55, 55, 55,0.04) 0%, rgba(55, 55, 55,0.04) 42%,rgba(140, 140, 140,0.04) 42%, rgba(140, 140, 140,0.04) 85%,rgba(225, 225, 225,0.04) 85%, rgba(225, 225, 225,0.04) 100%),linear-gradient(55deg, rgba(55, 55, 55,0.04) 0%, rgba(55, 55, 55,0.04) 13%,rgba(140, 140, 140,0.04) 13%, rgba(140, 140, 140,0.04) 72%,rgba(225, 225, 225,0.04) 72%, rgba(225, 225, 225,0.04) 100%),linear-gradient(90deg, rgb(0,0,0),rgb(0,0,0));

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.builder-logo {
  height: 60px;           /* matches logo height */
  width: auto;           /* preserve aspect ratio */
}

.footer-txt {
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: #aaa;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-link:hover {
  color: #fff;
  opacity: 0.95;
}

.last-updated {
    margin-top: -30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
    text-align: left;
}

.container {
    position: relative;
    max-width: 900px;
    margin: auto;
}

h1 {
    margin-top: 15px;
    border-bottom: 0px solid #444;
    padding-bottom: 0px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
}

h2 {
    margin-top: 30px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
}

.search-tip {
  margin-left: 5px;
  font-size: 13px;
  color: #aaa;
}

.input-tip {
  margin-left: 5px;
  font-size: 13px;
  color: #aaa;
}

.input-current {
  color: #0099ff;      /* Stand-out accent color */
  font-weight: 600;
  transition: color 0.15s ease, transform 0.15s ease;
}

input, select, button {
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    border: none;
    width: 100%;
}

button {
    background: #6a11cb;
    color: white;
    cursor: pointer;
}

#results {
    position: absolute;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;

    margin-top: 0px;
    padding: 4px 0;

    background: #151515;
    border-radius: 6px;
    border: 1px solid #222;

    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    z-index: 9999;
    isolation: isolate;
}

#results:empty {
    display: none;
}

.game-item {
    padding: 8px;
    border-bottom: 1px solid #222;
    cursor: pointer;
}

.game-item:hover {
    background: #1E65D2;
}

.game-item {
    padding: 8px 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;

    display: flex;              /* <-- THIS is the missing piece */
    justify-content: space-between;
    align-items: center;
}

.game-title {
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-year {
    color: #888;
    font-size: 14px;
    margin-left: 10px;
    white-space: nowrap;
}

.game-item:hover .game-year {
    color: #fff;
}

.game-dev {
  color: #888;
  font-size: 13px;
  font-style: normal;
  margin-left: 10px;
}

.game-item:hover .game-dev {
  color: #d0d7e2;
}

#previewBoxArt {
    width: 200px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

/* Code preview textarea */
textarea {
    width: 100%;
    height: 500px;
    margin-top: 15px;
    border-radius: 6px;
    padding: 10px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}

/* Fields */
.field-label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ccc;
    font-size: 14px;
}

/* ==============================
   OUTER TWO-COLUMN LAYOUT
   ============================== */

.preview-wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: auto var(--zip-tree-width);
    gap: 20px;
    justify-content: center;
    align-items: start;
}

.preview-main {
    max-width: 900px;
    width: 100%;
}

#output {
    width: 100%;
    height: 500px;
}

/* ZIP PANEL */
#zipTreeWrapper {
    width: var(--zip-tree-width);
    background: #151515;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    margin-top: 20px;
    font-family: Consolas, monospace;
}

#zipTreeWrapper h3 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 14px;
    color: #aaa;
}

#zipTree {
    white-space: pre;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
    font-size: 13px;
}


input,
select,
textarea {
  background: #161616;      /* darker field background */
  color: #ffffff;          /* text color */
  border: 1px solid #333;  /* subtle outline */
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}

input::placeholder {
  color: #777;             /* softer placeholder */
}

input:hover,
select:hover,
textarea:hover {
  border-color: #555;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0099ff;  /* matches your current accent color */
  box-shadow: 0 0 0 1px rgba(255,102,0,0.5);
}