/* styling vibecheck, my complete stylesheet */

/* global reset, removes default browser spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', Arial, sans-serif;
  background-color: #f8f5f0;
  color: #1a1a1a;
}

/* header, the top section with my title */
.main-header {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  padding: 40px 20px 30px;
  text-align: center;
}

.title {
  font-size: 3.5em;
  color: white;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
}

.subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1em;
  letter-spacing: 1px;
}

/* stats bar, shows live song count */
.stats-bar {
  background-color: #1a1a2e;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 8px;
  font-size: 0.85em;
  letter-spacing: 1px;
}

/* mood section, the emoji buttons at the top */
.mood-section {
  background-color: white;
  padding: 25px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.mood-title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.mood-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mood-btn {
  background-color: #f0f0f0;
  border: 2px solid transparent;
  border-radius: 25px;
  padding: 8px 16px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-family: 'Outfit', Arial, sans-serif;
}

.mood-btn:hover {
  background-color: #1a1a2e;
  color: white;
  transform: translateY(-2px);
}

.mood-btn.active {
  background-color: #1a1a2e;
  color: white;
  border-color: #0f3460;
}

/* controls, search bar, genre filter, sort, view toggle */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  background-color: white;
  border-bottom: 1px solid #eee;
  align-items: center;
  justify-content: center;
}

.controls input {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.9em;
  width: 280px;
  outline: none;
  transition: border 0.2s;
  font-family: 'Outfit', Arial, sans-serif;
}

.controls input:focus {
  border-color: #1a1a2e;
}

.controls select {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.9em;
  background-color: white;
  cursor: pointer;
  outline: none;
  font-family: 'Outfit', Arial, sans-serif;
}

.view-toggle-btn {
  background-color: #1a1a2e;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', Arial, sans-serif;
}

.view-toggle-btn:hover {
  background-color: #0f3460;
  transform: translateY(-2px);
}

/* card grid, makes cards stack vertically like pinterest */
#card-container {
  columns: 4;
  column-gap: 20px;
  padding: 30px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  break-inside: avoid;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* mood color banners, each mood gets its own color strip at the top of the card */
.card-color-banner {
  height: 8px;
  width: 100%;
}

.mood-peaceful { background-color: #A8D8EA; }
.mood-worshipful { background-color: #C9B8E8; }
.mood-joyful { background-color: #FFE66D; }
.mood-hopeful { background-color: #87CEEB; }
.mood-grateful { background-color: #98D8C8; }
.mood-chill { background-color: #B2D8B2; }
.mood-romantic { background-color: #F4A7B9; }
.mood-emotional { background-color: #6B8CAE; }
.mood-happy { background-color: #FF8B6A; }
.mood-empowered { background-color: #E8B86D; }

/* card content, everything inside each song card */
.card-content {
  padding: 16px;
}

.card-title {
  font-size: 1em;
  font-weight: 700;
  margin-bottom: 4px;
  color: #1a1a1a;
  line-height: 1.3;
}

.card-artist {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 10px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.genre-tag {
  background-color: #1a1a2e;
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.mood-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  color: #333;
}

.mood-color-peaceful { background-color: #A8D8EA; }
.mood-color-worshipful { background-color: #C9B8E8; }
.mood-color-joyful { background-color: #FFE66D; }
.mood-color-hopeful { background-color: #87CEEB; }
.mood-color-grateful { background-color: #98D8C8; }
.mood-color-chill { background-color: #B2D8B2; }
.mood-color-romantic { background-color: #F4A7B9; }
.mood-color-emotional { background-color: #6B8CAE; color: white; }
.mood-color-happy { background-color: #FF8B6A; }
.mood-color-empowered { background-color: #E8B86D; }

.tag {
  background-color: #f0f0f0;
  color: #666;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.72em;
}

.card-year {
  font-size: 0.8em;
  color: #999;
  margin-bottom: 8px;
}

/* card actions, spotify button and heart button at the bottom of each card */
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.spotify-btn {
  background-color: #1DB954;
  color: white;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.78em;
  font-weight: 600;
  transition: background-color 0.2s;
  font-family: 'Outfit', Arial, sans-serif;
}

.spotify-btn:hover {
  background-color: #17a349;
}

.heart-btn {
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0;
}

.heart-btn:hover {
  transform: scale(1.3);
}

/* notes section, where users can write a personal note on each song */
.card-note-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.note-label {
  font-size: 0.78em;
  color: #999;
  margin-bottom: 6px;
  display: block;
}

.note-display {
  font-size: 0.82em;
  color: #555;
  font-style: italic;
  margin-bottom: 8px;
  min-height: 20px;
}

.note-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.82em;
  resize: none;
  height: 60px;
  outline: none;
  font-family: 'Outfit', Arial, sans-serif;
  margin-bottom: 6px;
}

.note-input:focus {
  border-color: #1a1a2e;
}

.save-note-btn {
  background-color: #1a1a2e;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 5px 14px;
  font-size: 0.78em;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Outfit', Arial, sans-serif;
}

.save-note-btn:hover {
  background-color: #0f3460;
}

/* no results, shows when search finds nothing */
.no-results {
  text-align: center;
  color: #999;
  font-size: 1.1em;
  padding: 60px;
  width: 100%;
}

/* my playlist, the section at the bottom showing hearted songs */
.playlist-section {
  background-color: white;
  padding: 30px 20px;
  border-top: 3px solid #f0f0f0;
  max-width: 1400px;
  margin: 0 auto;
}

.playlist-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.playlist-container {
  columns: 4;
  column-gap: 20px;
}

.empty-playlist {
  color: #999;
  font-size: 0.9em;
  font-style: italic;
}

/* mood board view, groups songs by mood with colored sections */
.mood-board-section {
  margin-bottom: 40px;
}

.mood-board-heading {
  font-size: 1.2em;
  font-weight: 700;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  display: inline-block;
}

/* mood board grid layout */
.mood-board-grid {
  columns: 4;
  column-gap: 20px;
}

/* card photo, shows when user uploads an image */
.card-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* photo section on each card */
.card-photo-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.photo-input {
  width: 100%;
  font-size: 0.78em;
  margin-top: 6px;
  cursor: pointer;
}

.remove-photo-btn {
  background-color: #ff6b6b;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 0.75em;
  cursor: pointer;
  margin-top: 6px;
  margin-bottom: 6px;
}

/* responsive, adjusts columns based on screen size */
@media (max-width: 1100px) {
  #card-container { columns: 3; }
  .playlist-container { columns: 3; }
  .mood-board-grid { columns: 3; }
}

@media (max-width: 750px) {
  #card-container { columns: 2; }
  .playlist-container { columns: 2; }
  .mood-board-grid { columns: 2; }
  .title { font-size: 2.5em; }
}

@media (max-width: 480px) {
  #card-container { columns: 1; }
  .playlist-container { columns: 1; }
  .mood-board-grid { columns: 1; }
}