
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  pointer-events: none;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: none; 
}

.modal-overlay.active .modal-content {
  pointer-events: all;
}

.modal-content {
  background: #006938;
  border-radius: 20px;
  padding: 0;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  border: none;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../img/SpotifyBg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
  animation: cuteBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cuteBounce {
  0% { transform: translateY(20px) scale(0.95); }
  50% { transform: translateY(-5px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.15);
}

.modal-inner {
  position: relative;
  padding: 24px;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.playlist-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  margin-top: 20px;
}

.playlist-cover {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.playlist-cover-spotify-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  z-index: 2;
  display: block; 
}

.playlist-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.playlist-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

.playlist-cover-badge {
  display: none;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
  z-index: 2;
}

.playlist-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.playlist-subtitle {
  font-size: 14px;
  color: #ecff00;
  margin-bottom: 8px;
  margin-top: -2px;
}

.playlist-stats {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: -6px;
}

.playlist-stats .dot {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.modal-content .spotify-bold,
.modal-content strong {
  font-weight: 700 !important;
  font-style: normal !important;
  text-decoration: none !important;
  background: none !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  display: inline !important;
}

.email-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.form-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.form-group {
  margin-bottom: 12px;
}

.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1DB954;
  flex-shrink: 0;
  background-color: #1DB954;
  border: 2px solid #1DB954;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

.checkbox-input:checked {
  background-color: #1DB954;
  border-color: #1DB954;
}

.checkbox-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

.checkbox-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  flex: 1;
}

.checkbox-label:hover .checkbox-text {
  color: #fff;
}

.checkbox-input:focus {
  outline: 2px solid rgba(29, 185, 84, 0.5);
  outline-offset: 2px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 11px;
  background: #1eed6b;
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@keyframes musicShake {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  5% {
    transform: translateX(-2px) translateY(1px) rotate(-1deg);
  }
  10% {
    transform: translateX(2px) translateY(-1px) rotate(1deg);
  }
  15% {
    transform: translateX(-1px) translateY(0) rotate(-0.5deg);
  }
  20% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  25% {
    transform: translateX(3px) translateY(-2px) rotate(1.5deg);
  }
  30% {
    transform: translateX(-3px) translateY(2px) rotate(-1.5deg);
  }
  35% {
    transform: translateX(1px) translateY(-1px) rotate(0.8deg);
  }
  40% {
    transform: translateX(-2px) translateY(1px) rotate(-0.8deg);
  }
  45% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  50% {
    transform: translateX(-1px) translateY(-1px) rotate(-0.5deg);
  }
  55% {
    transform: translateX(2px) translateY(2px) rotate(1deg);
  }
  60% {
    transform: translateX(-2px) translateY(-1px) rotate(-1.2deg);
  }
  65% {
    transform: translateX(1px) translateY(1px) rotate(0.6deg);
  }
  70% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  75% {
    transform: translateX(2px) translateY(-2px) rotate(1.2deg);
  }
  80% {
    transform: translateX(-3px) translateY(1px) rotate(-1.5deg);
  }
  85% {
    transform: translateX(1px) translateY(-1px) rotate(0.7deg);
  }
  90% {
    transform: translateX(-1px) translateY(1px) rotate(-0.7deg);
  }
  95% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
}

.submit-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  background: #47ff8c;
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success-message {
  display: none;
  text-align: center;
  padding: 12px;
  background: rgba(144, 238, 144, 0.25);
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  margin-top: 12px;
  border: 1px solid rgba(144, 238, 144, 0.3);
}

.success-message.show {
  display: block;
  animation: cuteSlideIn 0.4s ease;
}

@keyframes cuteSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spotify-float-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #1DB954;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(29, 185, 84, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.spotify-float-icon.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
  animation: floatBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spotify-float-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.6);
}

.spotify-float-icon:active {
  transform: scale(0.95);
}

.spotify-float-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

@keyframes floatBounce {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  50% {
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 640px) {
  .spotify-float-icon {
    display: none !important;
  }
}

body.spotify-modal-open {
  position: fixed !important;
  width: 100% !important;
  overflow: hidden !important;
  touch-action: none; 
  -webkit-overflow-scrolling: none; 
}

@media (max-width: 640px) {
  .modal-overlay {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    touch-action: none; 
    -webkit-overflow-scrolling: none;
    padding: 5px;
  }

  .modal-overlay.active {
    pointer-events: all; 
    touch-action: none; 
  }
  
  .modal-content {
    touch-action: pan-y; 
    -webkit-overflow-scrolling: touch;
    max-width: calc(100% - 10px);
    margin: 0 5px;
  }

  .modal-inner {
    padding: 18px;
  }

  .playlist-header {
    flex-direction: column;
    align-items: center;
  }

  .playlist-cover {
    width: 100px;
    height: 100px;
    margin-bottom: 0px;
    margin-top: 20px;
  }

  .playlist-title {
    font-size: 24px;
    justify-content: center;
  }

  .playlist-subtitle {
    font-size: 18px;
  }

  .playlist-stats {
    font-size: 12px;
    justify-content: center;
  }

  .playlist-cover-badge {
    display: block;
    margin-top: -30px;
  }

  .playlist-info .playlist-badge {
    display: none;
  }

  .playlist-info {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .modal-content {
    max-width: 360px;
  }

  .modal-inner {
    padding: 16px;
  }

  .playlist-cover {
    width: 110px;
    height: 110px;
  }

  .submit-btn {
    font-size: 14px;
  }

  .checkbox-text {
    font-size: 13px;
  }
}

