body {
  background: #0f172a;
  color: #e2e8f0;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 700px;
  padding: 10px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.card {
  background: #1e293b;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.headerlabel {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

label {
  display: block;
  margin-bottom: 5px;
}

select {
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  border: none;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.region {
  display: flex;
  flex-direction: column;
}

.region.disabled {
  opacity: 0.3;
}

canvas {
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 10px;
  background: black;
}

.admin-wrapper {
  position: relative;
  width: 100%;
}

.admin-wrapper textarea {
  width: 100%;
  padding: 10px 44px 10px 10px; 
  resize: none;
  border-radius: 6px;
  border: none;
  box-sizing: border-box;
  display: block; 
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;

  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  opacity: 0.7;

  padding: 4px 6px;
  font-size: 14px;
  border-radius: 6px;

  min-width: unset;
  line-height: 25px;

  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: #1e293b;
  color: #e2e8f0;
  opacity: 100;
}

textarea {
  width: 100%;
  height: 80px;
  resize: none;
  border-radius: 6px;
  border: none;
  padding: 8px;
  box-sizing: border-box;
}

button {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #e2e8f0;
  transition: all 0.15s ease;
  min-width: 90px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button:hover {
  background: #334155;
  border-color: #475569;
}

button:active {
  transform: scale(0.97);
}

button.primary {
  background: transparent;
  border-color: #475569; 
}

button.subtle {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
}

button.subtle:hover,
button.primary:hover {
  background: #334155;
  color: #fff;
  border-color: #64748b;
  font-weight: 600;
}

#copyTooltip {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #22c55e;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  opacity: 0;
  transition: 0.3s;
}

#copyTooltip.show {
  opacity: 1;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-row select {
  min-width: 180px;
}

.preset-container {
  position: relative;
  display: flex;
  align-items: center;
}

.preset-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  margin-top: 4px;
  z-index: 10;
}

.preset-dropdown div {
  padding: 6px 10px;
  cursor: pointer;
  margin: 3px 5px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  transition: background 0.15s ease;
  min-width: 120px;
}

.preset-dropdown div:hover {
  filter: brightness(1.2);
}

.hidden {
  display: none;
}

.preset-display {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;

  text-align: center;
  transition: all 0.15s ease;

  display: inline-block;
  line-height: normal;
  font: inherit;

  flex: 1 1 0;
  min-width: 0;
  width: auto;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-display:hover {
  background: #334155;
  border-color: #475569;
  font-weight: 600;
}

.preset-display:active {
  transform: scale(0.97);
}

.searchable-dropdown {
  position: relative;
  width: 100%;
}

#dinoInput {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: white;
}

.dropdown-content {
  position: absolute;
  width: 100%;
  max-height: 300px; 
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  z-index: 100;
  margin-top: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.dropdown-item {
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #3b82f6;
}

.hidden {
  display: none;
}

.ad-banner {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  position: relative;

  width: 100%;
  aspect-ratio: 4 / 1; 
}

.ad-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(15,23,42,0.6),
    transparent 30%,
    transparent 70%,
    rgba(15,23,42,0.6)
  );
  pointer-events: none;
}

.ad-banner img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

.ad-banner:hover {
  filter: brightness(1.1);
}

.ad-cta {
  display: flex;
  justify-content: center;
  margin-top: -15px;
}

.canvas-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dino-title {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.flip {
  display: inline-block;
  transform: scaleX(-1);
}

.ad-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 600px;
  opacity: 0;
  transition: opacity 0.4s ease;

  display: none; /* hidden by default */
  z-index: 5;
}

.ad-rail.left {
  left: 10px;
}

.ad-rail.right {
  right: 10px;
}

.ad-rail.loaded {
  opacity: 1;
}

.site-nav {
  padding: 10px 14px;
}

.site-nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.site-nav-links a:hover {
  background: #334155;
  color: #e2e8f0;
}




/* Responsive Design */
@media (max-width: 600px) {
  button .emoji {
    display: none;
  }

  .regions-grid {
  display: grid;
  grid-template-columns: repeat(2, 2fr);
  gap: 10px;
  }

  .button-row {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
  }

  .button-row button {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .preset-container {
    flex-shrink: 0;
  }

  .preset-display {
    min-width: 90px;
    padding: 6px 8px;
    font-size: 12px;
  }

    .site-nav {
    padding: 8px 10px;
  }

  .site-nav-links {
    gap: 6px;
  }

  .site-nav-links a {
    font-size: 12px;
    padding: 5px 8px;
  }
}


/* Only show on larger screens */
@media (min-width: 1000px) {
  .ad-rail {
    display: block;
  }

  .app {
    margin: 0 auto;
  }
}