/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

body {
  font-family: 'Georgia', serif;
  background-color: #f4f1ea;
  color: #2c3e50;
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style-type: none;
}

header {
  text-align: center;
  padding: 20px;
  background-color: #2c3e50;
  color: #ecf0f1;
}

nav a {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.song-card {
  border: 2px solid #bdc3c7;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2;
  cursor: pointer;
  background-color: #fff;
} 

.song-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-inner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  position: relative;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.card-controls {
  display: flex;
  gap: 10px;
  padding: 15px 20px 20px 20px;
  background-color: #fff;
  border-top: 1px solid #bdc3c7;
}

.song-title {
  position: relative;
  z-index: 2;
  font-size: 1.4rem;
  margin-top: auto;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5); 
  border-radius: 8px;
  width: 100%;
  align-self: center;
}

.audio-player {
  flex: 3;
  min-width: 0; 
  height: 40px;
  border-radius: 20px;
}

.lyrics-btn {
  flex: 1;
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-family: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 70px;
}

.lyrics-btn:hover {
  background-color: #2980b9;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#modal-image {
    text-align: center;
    margin: 20px 0;
}

#modal-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

#modal-lyrics {
    white-space: pre-wrap;
    font-family: 'Georgia', serif;  /* change to match body font */
    background: #f0f0f0;
    padding: 20px 25px;              /* more horizontal padding */
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2c3e50;                  /* match body text color */
}