@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:wght@400;700&display=swap');

:root {
  --bg-color: #47006dff;
  --container-color: #5e00b0ff;
  --primary-color: #f700ffff;
  --secondary-color: #9900ffff;
  --text-color: #b797ffff;
  /* UPDATED font variables */
  --header-font: 'Bebas Neue', sans-serif;
  --body-font: 'Roboto', sans-serif;
}

body {
  background-color: var(--bg-color);
  background-image: url("https://landwolf.com/img/hero/bg.png");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--body-font);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.top-menu { width: 100%; background: var(--container-color); backdrop-filter: blur(5px); padding: 10px 20px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; overflow-x: auto; white-space: nowrap; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
.top-menu a { color: var(--text-color); text-decoration: none; font-family: var(--header-font); font-size: 1em; margin: 0 15px; transition: color 0.3s ease; display: inline-flex; align-items: center; gap: 8px; }
.top-menu a:hover { color: var(--primary-color); }
.menu-icon { height: 1.2em; width: auto; }

header h1 { font-family: var(--header-font); color: var(--primary-color); text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.2); text-align: center; font-size: 3em; margin: 30px 0; }
main.generator { display: grid; grid-template-columns: 250px 1fr 450px; gap: 30px; width: 100%; max-width: 1400px; z-index: 10; padding: 0 20px; box-sizing: border-box; }
.categories, .traits, .preview-container { background-color: var(--container-color); backdrop-filter: blur(5px); border-radius: 15px; padding: 25px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); }
h2 { font-family: var(--header-font); color: var(--primary-color); border-bottom: 2px dashed var(--primary-color); padding-bottom: 10px; margin-top: 0; text-align: center; font-size: 1.8em; }
#category-buttons, #trait-buttons { display: flex; flex-direction: column; gap: 10px; }
button { background-color: var(--primary-color); color: white; border: none; padding: 12px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; font-family: var(--body-font); font-weight: 700; font-size: 1.1em; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
button:hover { background-color: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 6px 8px rgba(0,0,0,0.15); }
.preview-container { display: flex; flex-direction: column; align-items: center; gap: 15px; }
#preview { width: 400px; height: 400px; aspect-ratio: 1 / 1; border: 5px  solid var(--primary-color); background-color: rgba(0,0,0,0.05); position: relative; overflow: hidden; border-radius: 15px; box-shadow: inset 0 0 15px rgba(0,0,0,0.1); }
.preview-layer { position: absolute; top: 0; left: 0; object-fit: cover; width: 100%; height: 100%; }
#download-btn, #random-btn, #reset-btn { width: 100%; padding: 15px; }

.music-player { width: 100%; background: rgba(0,0,0,0.1); border-radius: 15px; padding: 10px 15px; text-align: center; box-sizing: border-box; }
.music-player .song-artist { font-size: 0.9em; opacity: 0.8; margin-bottom: 2px; }
.music-player .song-title { font-weight: 700; margin-bottom: 10px; font-size: 1.1em; }
.music-player .controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.music-player button { padding: 8px 12px; border-radius: 50%; width: 40px; height: 40px; }
#prev-btn, #next-btn { padding: 8px; width: 35px; height: 35px; }
#volume-slider { -webkit-appearance: none; appearance: none; width: 50%; height: 8px; background: rgba(0,0,0,0.2); border-radius: 5px; outline: none; opacity: 0.7; transition: opacity .2s; }
#volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: var(--primary-color); border-radius: 50%; cursor: pointer; }

.showcase-container { width: 100%; margin-top: 50px; padding: 20px 0; background: var(--container-color); backdrop-filter: blur(5px); overflow: hidden; }
.marquee { width: 100%; white-space: nowrap; }
.marquee-content { display: flex; animation: marquee 60s linear infinite; }
.marquee-content img { height: 120px; width: 120px; border-radius: 15px; margin: 0 15px; border: 4px solid var(--container-color); box-shadow: 0 4px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

body.preloader-active { overflow: hidden; }
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100dvh; background-color: var(--bg-color); z-index: 9999; display: flex; justify-content: center; align-items: center; text-align: center; transition: opacity 0.75s ease, visibility 0.75s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-content { color: var(--text-color); }
.preloader-instructions { font-family: var(--header-font); font-size: 1.5em; margin-bottom: 20px; }
#strawberry-clicker { width: 300px; cursor: pointer; transition: transform 0.1s ease-out; margin-bottom: 20px; }
#strawberry-clicker:active { transform: scale(0.9); }
.preloader-score { font-weight: 700; font-size: 1.2em; }
.loading-indicator { transition: opacity 0.3s ease; }
.loading-bar-container { width: 250px; height: 10px; background-color: rgba(255, 255, 255, 0.2); border-radius: 5px; margin: 20px auto; overflow: hidden; }
.loading-bar { width: 100%; height: 100%; background: var(--primary-color); animation: loading-pulse 2s infinite ease-in-out; }
.preloader-status { font-size: 0.9em; opacity: 0.8; }
@keyframes loading-pulse { 0% { transform: translateX(-100%); } 50% { transform: translateX(0%); } 100% { transform: translateX(100%); } }
#enter-btn { display: none; margin-top: 30px; padding: 15px 30px; font-size: 1.5em; font-family: var(--header-font); border-radius: 30px; cursor: pointer; }
#preloader.loaded .loading-indicator { opacity: 0; }
#preloader.loaded #enter-btn { display: inline-block; animation: fade-in 0.5s ease; }
@keyframes fade-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.berry-pop { position: absolute; z-index: 10000; pointer-events: none; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); animation: floatAndFade 2s ease-out forwards; }
@keyframes floatAndFade { from { opacity: 1; transform: translateY(0) rotate(0deg); } to { opacity: 0; transform: translateY(-150px) rotate(15deg) scale(0.5); } }

.bubbles-container { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; overflow: hidden; z-index: -1; }
.bubble { position: absolute; bottom: -150px; background: var(--primary-color); opacity: 0.1; border-radius: 50%; animation: float-up 25s linear infinite; }
@keyframes float-up { 0% { transform: translateY(0) translateX(0); } 100% { transform: translateY(-120vh) translateX(100px); opacity: 0; } }

.mobile-controls { display: none; width: 100%; padding: 0 20px 20px 20px; box-sizing: border-box; gap: 15px; }
@media (max-width: 900px) {
    main.generator { grid-template-columns: 1fr; max-width: 100%; padding: 0 20px; gap: 20px; }
    .mobile-controls { display: flex; }
    .categories, .traits { display: none; }
    .categories.visible, .traits.visible { display: block; }
    header h1 { font-size: 2.5em; margin: 20px 0; } /* Adjusted for mobile */
    #preview { width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 400px; }
    .top-menu a { font-size: 1em; margin: 0 10px; } /* Adjusted for mobile */
    .showcase-container { margin-top: 30px; }
    .marquee-content img { height: 100px; width: 100px; }

}
#back-to-categories-btn { display: none; margin-bottom: 15px; background-color: #78909c; }
@media (max-width: 900px) { #back-to-categories-btn { display: block; } }