/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: url('../img/bg splash.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
}

body.dashboard-bg {
  background: url('../img/bg1.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.dashboard-bg .site-header {
  top: 10px; /* Original position for dashboard */
}

#app {
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Add to styles.css - Playlist links styling */
#playlists-to-follow div {
    margin-bottom: 4px;
    line-height: 1.2;
}

#playlists-to-follow div:last-child {
    margin-bottom: 0;
}

#playlists-to-follow a {
    color: #2D8C4A !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    word-break: break-word;
}

#playlists-to-follow a:hover {
    text-decoration: underline !important;
}

/* Tutorial Styles */
.tutorial-arrow {
    position: fixed;
    font-size: 3rem;
    color: #2D8C4A;
    z-index: 10000;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    animation: bounce 1s infinite alternate;
    pointer-events: none;
}

@keyframes bounce {
    from { transform: translateX(0); }
    to { transform: translateX(10px); }
}

.tutorial-highlight {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 3px solid #2D8C4A !important;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(45, 140, 74, 0.8);
    position: relative;
    z-index: 2500 !important;
    padding: 4px !important; /* Add 4px padding to expand the area */
    margin: -4px !important; /* Compensate for the padding to maintain layout */
}

#tutorial-popup .popup-card.force-center {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Ensure highlighted elements and arrows are above the dimmed background */
.popup-overlay.active ~ #dashboard .tutorial-highlight,
.popup-overlay.active ~ .tutorial-arrow {
    z-index: 2500 !important;
}
.popup-overlay.active.has-arrow {
    background: rgba(0, 0, 0, 0.7);
    -webkit-mask-image: radial-gradient(circle at var(--arrow-x) var(--arrow-y), transparent 30px, black 31px);
    mask-image: radial-gradient(circle at var(--arrow-x) var(--arrow-y), transparent 30px, black 31px);
}

/* Specifically ensure arrows are not affected by the dimmed overlay */
.tutorial-arrow {
    pointer-events: none; /* Allow clicks to pass through */
}

/* Remove the dimming overlay completely */
.tutorial-overlay::before {
    display: none;
}

.tutorial-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    border-radius: 12px;
}

/* Site Header */
.site-header {
  position: absolute;
  top: 110px; /* Changed from 10px to 125px */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  z-index: 1000;
}

.site-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 
    2px 2px 8px rgba(0, 0, 0, 0.4),
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    0.5px 0.5px 0 #000; /* Added black outline */
  margin: 0;
}

#create-account .card {
  display: flex;
  flex-direction: column;
  min-height: 500px; /* Ensure enough height for proper spacing */
}

/* Splash Page Layout */
.splash-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70vh;
  width: 100%;
  gap: 40px;
}

.splash-text {
  flex: 1;
  text-align: center;
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 
    2px 2px 8px rgba(0, 0, 0, 0.4),
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000; /* Added black outline */
  line-height: 1.3;
}


.splash-text-left {
  transform: rotate(-5deg);
  text-align: right;
  padding-right: 40px;
}

.splash-text-right {
  transform: rotate(5deg);
  text-align: left;
  padding-left: 40px;
}

.splash-center {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 280px;
}

.splash-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  /* No text-shadow in base button class */
}

/* .btn-primary gets no black outline */
.btn-primary {
  background: #2D8C4A;
  color: white;
  border: 2px solid #ffffff;
  /* No text-shadow */
}

.btn-primary:hover {
  background: #E8F5E9;
  color: #2D8C4A;
  border: 2px solid #2D8C4A;
  transform: translateY(-2px);
}

/* Only .btn-secondary gets black text outline when NOT hovering */
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid #ffffff;
  text-shadow: 
    -0.5px -0.5px 0 #000,
    0.5px -0.5px 0 #000,
    -0.5px 0.5px 0 #000,
    0.5px 0.5px 0 #000; /* Black outline only for secondary button */
}

.btn-secondary:hover {
  background: #E8F5E9;
  color: #2D8C4A;
  border: 2px solid #2D8C4A;
  text-shadow: none; /* Remove black outline on hover */
  transform: translateY(-2px);
}

/* Back Links */
.back-primary {
  cursor: pointer;
  color: #2D8C4A !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-primary:hover {
  color: #1B5E20 !important;
}

.back-secondary {
  cursor: pointer;
  color: white !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-secondary:hover {
  color: #E8F5E9 !important;
}

/* View Management */
.view {
  display: none !important;
}

.view.active {
  display: block !important;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #E0E0E0;
  max-width: 480px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-title {
  font-size: 2rem;
  color: #1B5E20;
  margin-bottom: 10px;
  font-weight: 600;
}

.form-subtitle {
  color: #666;
  font-size: 1.1rem;
}

/* Input Styles */
.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #2D8C4A;
  box-shadow: 0 0 0 3px rgba(45, 140, 74, 0.1);
}

/* Gateway Styles */
.gateway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.gateway-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  border: 1px solid #E0E0E0;
  transition: all 0.3s ease;
}

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

.gateway-icon {
  font-size: 3rem;
  color: #2D8C4A;
  margin-bottom: 20px;
}

.gateway-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1B5E20;
  margin-bottom: 20px;
}

/* Confirmation Styles */
.confirmation-icon {
  font-size: 4rem;
  color: #2D8C4A;
  margin-bottom: 30px;
}

.confirmation-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1B5E20;
  margin-bottom: 20px;
}

.confirmation-message {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Updated Dashboard Styles */
.dashboard-header-spacer {
    height: 65px; /* Was 95px, now 85px (another 10px up) */
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-section.compact {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #000000; /* Changed to 1px black outline */
  min-height: auto;
}

.dashboard-section.compact .section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1B5E20;
  margin-bottom: 15px;
  text-align: left;
  border-bottom: 2px solid #E8F5E9;
  padding-bottom: 8px;
}

.info-grid.compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-grid.compact .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
  margin: 0;
}

.info-grid.compact .info-item:last-child {
  border-bottom: none;
}

.info-grid.compact .info-label {
  font-weight: 500;
  color: #333;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.info-grid.compact .info-value {
  color: #666;
  font-size: 0.85rem;
  text-align: right;
  flex: 1;
  margin-left: 10px;
  word-break: break-word;
}

/* Dashboard Actions */
.dashboard-actions {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.dashboard-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 25px;
}

.dashboard-btn {
  background: white;
  border: 1px solid #000000; /* Changed to 1px black outline */
  border-radius: 16px;
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  min-height: 140px;
  justify-content: center;
}

.dashboard-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: #E8F5E9;
  border: 1px solid #000000; /* Changed to 1px black outline */
}

.btn-icon {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.btn-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1B5E20;
  text-align: center;
}

.dashboard-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #E8F5E9;
}

/* Warning Message Styles */
.warning-message {
  background: #FFF3CD;
  border: 1px solid #FFEAA7;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.warning-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.warning-content h3 {
  color: #856404;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.warning-content p {
  color: #856404;
  margin-bottom: 15px;
  line-height: 1.5;
}

.warning-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.warning-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* Popup Styles */
.popup-dimming-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

/* Ensure the dimming layer cutout works for all users */
.popup-overlay.active.has-arrow .popup-dimming-layer {
    -webkit-mask-image: radial-gradient(circle at var(--arrow-x, 0) var(--arrow-y, 0), transparent 30px, black 31px);
    mask-image: radial-gradient(circle at var(--arrow-x, 0) var(--arrow-y, 0), transparent 30px, black 31px);
}

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.popup-overlay.active {
  display: flex;
}

.popup-card {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.3s ease-out;
  z-index: 2100 !important; /* ADD THIS LINE */
}

/* Remove the old cutout styles from the main overlay */
.popup-overlay.active.has-arrow {
    background: transparent; /* No background on the main overlay */
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 30px 20px 30px;
  border-bottom: 1px solid #E0E0E0;
}

.popup-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1B5E20;
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: #f5f5f5;
  color: #333;
}

.popup-content {
  padding: 30px;
  flex: 1;
  overflow-y: auto;
  line-height: 1.6;
  color: #333;
}

.popup-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.popup-content p:last-child {
  margin-bottom: 0;
}

.popup-footer {
  padding: 20px 30px 30px 30px;
  border-top: 1px solid #E0E0E0;
  text-align: center;
}

/* Submit Song View Centering */
#submit-song.view.active {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 100vh !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

#submit-song .card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #E0E0E0;
  max-width: 480px;
  width: 90%;
  margin: 0 auto;
  z-index: 1001;
  position: relative;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* Responsive Design */
@media (max-width: 768px) {
  .splash-container {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .splash-text {
    transform: none !important;
    text-align: center !important;
    padding: 0 !important;
    font-size: 1.8rem;
  }
  
  .site-title {
    font-size: 2.8rem;
  }

  .site-header {
    top: 100px; /* Slightly less on mobile to account for smaller screens */
  }
  
  body.dashboard-bg .site-header {
    top: 30px; /* Adjusted for mobile dashboard */
  }

  .gateway-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 15px;
  }
  
  .dashboard-header-spacer {
    height: 100px;
  }
  
  .dashboard-section.compact {
    padding: 15px;
  }
  
  .dashboard-buttons {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .dashboard-btn {
    padding: 20px 15px;
    min-height: 120px;
  }
  
  .btn-icon {
    font-size: 2rem;
  }
  
  .btn-text {
    font-size: 1rem;
  }
  
  .info-grid.compact .info-label,
  .info-grid.compact .info-value {
    font-size: 0.8rem;
  }

  .popup-card {
    max-height: 85vh;
    margin: 10px;
  }
  
  .popup-header {
    padding: 20px 20px 15px 20px;
  }
  
  .popup-content {
    padding: 20px;
  }
  
  .popup-footer {
    padding: 15px 20px 20px 20px;
  }

  #app {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 2.2rem;
  }

  .site-header {
    top: 80px; /* Even less on very small screens */
  }
  
  body.dashboard-bg .site-header {
    top: 20px; /* Further adjusted for very small screens */
  }
  
  .splash-text {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 20px;
  }
  
  .gateway-card {
    padding: 20px;
  }
  
  .dashboard-layout {
    padding: 0 10px;
  }
  
  .dashboard-section.compact {
    padding: 12px;
  }
  
  .dashboard-buttons {
    gap: 12px;
  }
  
  .dashboard-btn {
    padding: 18px 12px;
    min-height: 110px;
  }

  .btn {
    font-size: 1rem;
  }

  .btn-icon {
    font-size: 1.8rem;
  }
  
  .btn-text {
    font-size: 0.9rem;
  }
  
  .popup-title {
    font-size: 1.5rem;
  }
  
  .popup-content p {
    font-size: 1rem;
  }
}