@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
  font-family: 'VT323', monospace;
  background-color: black;
  background-image: url('images/bg-ovaloffice.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 35%;
  margin: 0;
  padding: 0;
  height: 160vh;
}

body.light-mode {
  background-image: url('images/bg-ovaloffice-day.png');
  background-color: #ddd;
  color: black;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.header-image {
  display: block;
  margin: 20px auto 40px auto; /* adds extra bottom spacing */
  max-width: 850px;
  height: auto;
}


.app-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  margin-top: -120px;
  gap: 40px;
  padding: 0 16px;
}

.canvas-column {
  .canvas-title {
  color: white;
}
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  
}

#canvas {
  position: relative;
  width: 384px;
  height: 384px;
  background-color: white;
  border: 2px solid #ccc;
}

#canvas img {
  position: absolute;
  top: 0;
  left: 0;
  width: 384px;
  height: 384px;
  image-rendering: pixelated;
}

#canvas img:not([src]):not([src=""]) {
  visibility: hidden;
}

.controls-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 85px;
  flex: 1;
  max-width: 1000px;
}

.trait-section {
  background: #fff;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 100%;
  margin-bottom: 2px;
}

.trait-section h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: black;
}

.thumbnails {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  background-color: #e5e5e5;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-top: 6px;
}

.thumbnail {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

#download-btn, #randomize-btn, #clear-btn, #save-fav-btn, #load-fav-btn, #theme-toggle-btn {
  flex: 1;
  min-width: 120px;
  height: 44px;
  padding: 0;
  font-size: 14px;
  font-family: 'VCR OSD Mono', monospace;
  border: 2px solid white;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

#download-btn {
  background-color: #555;
  color: white;
}

#randomize-btn { background-color: #0066cc; }
#clear-btn { background-color: #cc0000; }
#save-fav-btn {
  background-color: #f0b400;
  border-color: #f0b400;
  font-family: 'Courier New', monospace;
}
#load-fav-btn {
  background-color: #3c4d63;
  border-color: #3c4d63;
  font-family: 'Courier New', monospace;
}
#theme-toggle-btn {
  background-color: #666;
  color: white;
  font-family: 'Courier New', monospace;
}

button:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.trait-tooltip {
  position: absolute;
  display: none;
  z-index: 10;
  pointer-events: none;
  border: 2px solid white;
  background: #111;
  padding: 4px;
  border-radius: 4px;
  max-width: 100px;
}

body.light-mode .controls-column h2,
body.light-mode .canvas-column h1 {
  color: black;
}

body.light-mode #download-btn,
body.light-mode #randomize-btn,
body.light-mode #clear-btn,
body.light-mode #theme-toggle-btn,
body.light-mode #save-favorite-btn,
body.light-mode #load-favorite-btn {
  border: 2px solid #333;
  background-color: #ddd;
  color: black;
}

@media screen and (max-width: 768px) {
  .app-container {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .controls-column {
    padding-top: 0;
    max-width: 90%;
  }

  .trait-section {
    width: 100%;
  }
}
.social-links {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 16px;
  z-index: 999;
}

.social-links img {
  width: 36px;
  height: 36px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.social-links img:hover {
  transform: scale(1.15);
}
