@font-face {
  font-family: 'MINECRAFT';
  src: url('fonts/Minecraft.ttf') format('truetype');
}

@font-face {
  font-family: 'DAYDREAM';
  src: url('fonts/Daydream.ttf') format('truetype');
}

body {
  margin: 0;
  font-family: 'MINECRAFT', sans-serif;
  background-image: url('images/nightsky5.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  color: white;
  padding-bottom: 100px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded {
  opacity: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

/* Fade-in elements */
.fadein-1,
.fadein-2,
.fadein-3 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.loaded .fadein-1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

body.loaded .fadein-2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

body.loaded .fadein-3 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}

/* Header section */
.music-player-container {
  text-align: center;
  padding: 60px 20px 30px;
}

h1 {
  font-family: 'DAYDREAM', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffd700;
}

.subtitle {
  font-size: 1rem;
  color: whitesmoke;
  margin-bottom: 30px;
}

/* Spotify embed */
.spotify-embed-wrapper {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.spotify-player {
  width: 100%;
  height: 352px;
  border: none;
  border-radius: 20px;
  box-shadow:
    0 0 15px #c297ff,
    0 0 30px rgba(194, 151, 255, 0.5),
    0 0 45px rgba(194, 151, 255, 0.3);
  transition: box-shadow 0.3s ease;
}

.spotify-player:hover {
  box-shadow:
    0 0 20px #dab9ff,
    0 0 40px rgba(218, 185, 255, 0.6),
    0 0 60px rgba(218, 185, 255, 0.4);
}

/* Journal Section */
.music-journal {
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  text-align: center;
}

.music-journal h2 {
  font-size: 2rem;
  color: #ffe066;
  margin-bottom: 30px;
  font-family: 'DAYDREAM', sans-serif;
}

/* Journal Entry Styles */
.journal-entries {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto 30px;
}

.journal-entry {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #ffd700;
  padding: 15px 20px;
  border-radius: 10px;
  position: relative;
  text-align: left;
  line-height: 1.6;
  font-family: 'MINECRAFT', sans-serif;
}

.entry-label {
  display: block;
  font-size: 0.9rem;
  color: #c297ff;
  margin-bottom: 5px;
}

.entry-text {
  margin: 0;
  word-wrap: break-word;
}

.edit-area {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  border: 2px solid #ffd700;
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  font-family: 'MINECRAFT', sans-serif;
  margin-top: 5px;
}

/* Entry Buttons */
.edit-btn,
.delete-btn {
  position: absolute;
  top: 10px;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'MINECRAFT', sans-serif;
}

.edit-btn {
  right: 40px;
  color: #ffd700;
}

.delete-btn {
  right: 10px;
  color: #ff8f8f;
}

/* Entry Controls */
.journal-controls {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#newEntryText {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 2px solid #ffd700;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  resize: vertical;
  margin-bottom: 10px;
  font-family: 'MINECRAFT', sans-serif;
}

#entryCategory {
  margin-bottom: 15px;
  font-family: 'MINECRAFT', sans-serif;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid #ffd700;
  background: #222;
  color: #ffd700;
}

.dropdown-label {
  font-family: 'MINECRAFT', sans-serif;
  color: #c297ff;
  margin-bottom: 5px;
  display: block;
  font-size: 0.95rem;
}

.journal-controls button {
  padding: 10px 20px;
  font-family: 'MINECRAFT', sans-serif;
  background: #ffd700;
  color: #222;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.journal-controls button:hover {
  background: #ffec80;
}

/* Bottom Navigation Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  height: 80px;
  z-index: 10;
}

.circle-group {
  display: flex;
  gap: 20px;
}

.circle,
.nav-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.circle {
  background: white;
  color: #222;
  font-family: 'DAYDREAM', sans-serif;
  transition: transform 0.2s, background 0.2s;
}

.circle:hover {
  background: #ffd700;
  transform: scale(1.1);
}

.nav-icon {
  font-size: 24px;
  background: #ffd700;
  color: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nav-icon:hover {
  background-color: #ffec80;
}

/* Help Button & Tooltip */
.help-wrapper {
  position: relative;
  margin-right: 50px;
}

.help-button {
  font-family: 'DAYDREAM', sans-serif;
  font-size: 24px;
  background: #ffd700;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  color: #222;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.help-button:hover {
  background-color: #ffec80;
}

.help-cloud {
  display: none;
  position: absolute;
  bottom: 60px;
  right: -10px;
  background: #fff;
  color: #222;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  width: 200px;
  text-align: center;
  z-index: 5;
}

.help-cloud::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 10px;
  border-width: 10px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

@media (max-width: 600px) {
  .help-wrapper {
    margin-right: 5px;
  }

  .help-cloud {
    width: 180px;
    font-size: 0.85rem;
  }
}
