/* === NexTrack Brand Variables (centralized) === */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: black;
    color: #e0e0e0;
}

#icons-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar {
    background-color: #333;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    z-index: 1000;
}

main {
    width: 100%;            /* ⬅️ important */    
    padding-top: 80px;   
    z-index: 1;
    position: relative;
}

.artist-streams-main {
    padding-top: 40px;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--brand);
    text-decoration: none;
}

.app-version {
    font-size: 12px;
    color: #bbb;
    margin-left: 0px;
    vertical-align: super;
}

.navbar-links {
    list-style-type: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding-right: 20px;
    align-items: center;
}

.navbar-links li {
    display: inline;
}

.navbar-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.navbar-links a:hover {
    background-color: var(--brand);
    color: var(--text);
}

.pricing-cta {    
    color: var(--text);
    padding: 6px 14px;
    border-radius: 20px;    
    font-size: 15px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;    
}

.favorites-img,
.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid transparent;
}

#favorites-link,
#profile-link {
    display: inline-block;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text);
    padding-right: 30px;
}

.plus-badge {
    display: inline-block;
    margin-left: -4px;
    font-size: 22px;
    font-weight: bold;
    color: #d4af37; /* gold */
    vertical-align: middle;
    animation: gold-glow 2s infinite ease-in-out;
}

@keyframes gold-glow {
    0%, 100% {
        text-shadow: 0 0 4px rgba(212, 175, 55, 0.5);
    }
    50% {
        text-shadow: 0 0 8px rgba(212, 175, 55, 1);
    }
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
        position: absolute;
        top: 60px;
        right: 30px;
        background-color: #333;
        width: 220px; /* increase width a bit */
        flex-direction: column;
        padding: 8px 12px; /* added side padding */
        border-radius: 4px;
        box-sizing: border-box; /* ensures padding doesn't overflow */
        z-index: 999;
        max-width: calc(100% - 32px); 
    }

    .navbar-links a {
        word-wrap: break-word;
        white-space: normal;
    }

    .navbar-links.active {
        display: flex;
    }

    .hamburger-menu {
        display: block;
    }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: #333232;
    color: #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.iframe-container {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(var(--brand-rgb), 0.1);
    margin: 0;
    padding: 0;
}

#soundcloud-widget {
    width: 100%;
    height: 130px;
    border: none;
    border-radius: 8px;
}

.now-playing-text {
    font-size: 12px;    
    text-align: center;
    margin-bottom: 2px;
    font-weight: bold;
}

footer h1 {
    color: #333;
}

footer iframe {
    width: 100%;
    max-width: 600px;
    height: 100px;
    border: none;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    max-width: 600px;
}

.control-left {
    padding-right: 20px;
}

.control-right {
    padding-left: 20px;
}

button {
    background-color: var(--brand);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

button:hover {
    background-color: var(--brand-strong);
}

.footer-links {
    text-align: center;
}

.footer-links a {
    color: var(--brand);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .page-container {        
        width: 100%;
        margin: 0 auto;
        padding: 0 16px;
        box-sizing: border-box;
    }

    body {
        font-size: 15px;
        line-height: 1.6;
    }

    h1 {
        font-size: 22px;
    }

    h2,
    .page-title {
        font-size: 18px;
    }

    .navbar-logo {
        font-size: 20px;
    }

    .custom-submit-btn,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    button {
        font-size: 15px;
        padding: 10px;
    }

    .playlist-history-title {
        font-size: 15px;
    }

    .playlist-history-meta {
        font-size: 12px;
    }

    .footer-links a {
        font-size: 14px;
    }

    footer {
        flex-direction: column;
        padding: 4px 0;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0 16px;
        max-width: 100%;
    }

    .control-left,
    .control-right {
        padding: 0;
        display: flex;
        justify-content: center;
    }

    .iframe-container {
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: 0 2px 6px rgba(var(--brand-rgb), 0.1); /* or none if you prefer flat */
        border-radius: 8px;
    }

    .footer-links {
        margin-top: 10px;
    }

    #soundcloud-widget {
        height: 140px;
    }

    .controls {
        flex-direction: row;
        justify-content: space-around;
        padding: 0 12px;
    }

    .controls button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

#dynamic-player-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 0;  
  background-color: #333232;
  color: #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  justify-content: center;
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  padding: 0 16px;
  box-sizing: border-box;
}

.iframe-container {
  flex: 1;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(var(--brand-rgb), 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-controls-row button {
  background-color: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.player-controls-row button:hover {
  background-color: var(--brand);
  color: var(--text);
}

@media (max-width: 600px) {
  .player-controls-row {
    padding: 0 10px;
    gap: 8px;
  }

  .player-controls-row button {
    padding: 6px 10px;
    font-size: 12px;
  }

  #soundcloud-widget {
    height: 110px;
  }
  
  #dynamic-player-footer {
    padding-bottom: -20px;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 0 16px; /* <-- this ensures padding on small screens */
  box-sizing: border-box;
}

.modal-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
  padding: 24px;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 0 20px rgba(var(--brand-rgb), 0.3);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  justify-content: center;

  /* ADD THESE */
  display: flex;               /* allow flexbox centering */
  flex-direction: column;      /* stack title/body/buttons vertically */
  align-items: center;         /* center horizontally */
  text-align: center;          /* center text content */
}

.modal-content h2 {
  color: var(--brand);
  margin-top: 0;
  font-size: 22px;
  text-align: center;
}

.modal-description {
  text-align: center;
  line-height: 1.8;
  font-size: 16px;
  margin-top: 10px;
}
.modal-content p {
  line-height: 1.6;
  font-size: 15px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: var(--brand);
  cursor: pointer;
}

.close-button:hover {
  color: var(--brand-strong);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {

.pricing-cta {
    font-size: 14px;
    padding: 6px 12px;
}
  .modal-content {
    max-width: 100%;
    padding: 20px;
    font-size: 14px;
  }

  .modal-content h2 {
    font-size: 18px;
  }
}

/* Size the SVG logo nicely inside the 35px navbar */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;            /* space between logo, +, and version */
  text-decoration: none;
}

.navbar-logo-img {
  height: 20px;        /* fits comfortably in 35px navbar */
  width: auto;
  display: block;
}

/* Optional: slightly smaller on mobile */
@media (max-width: 768px) {
  .navbar-logo-img { height: 18px; }
}

/* Reusable button styles for modal actions */
.nt-btn {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nt-btn:hover { background: var(--brand); color: var(--text); }

.nt-btn--secondary {
  border-color: #555;
  color: #ddd;
}
.nt-btn--secondary:hover { background: #333; color: #fff; }

.nt-btn--danger {
  border-color: #b00020;
  color: #ffb3b3;
}
.nt-btn--danger:hover { background: #b00020; color: #fff; }

/* Optional: accent the overlay by variant (subtle glow) */
#app-modal.variant-success .modal-content { box-shadow: 0 0 20px rgba(76, 175, 80, .25); }
#app-modal.variant-warn    .modal-content { box-shadow: 0 0 20px rgba(255, 193, 7, .25); }
#app-modal.variant-error   .modal-content { box-shadow: 0 0 20px rgba(244, 67, 54, .25); }


/* Make the close button an icon-style "X", not a pill */
#app-modal #app-modal-close {
  all: unset;                 /* wipe inherited .nt-btn styles */
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
  border-radius: 6px;
}

#app-modal #app-modal-close:hover {
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-strong);
}

/* Safety: if the markup accidentally has .nt-btn on the close button */
#app-modal #app-modal-close.nt-btn {
  border: 0 !important;
  background: transparent !important;
  color: var(--brand) !important;
  padding: 0 !important;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea,
.modal-content select {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  margin: 10px 0 0 0; /* no weird side margins */
  border-radius: 6px;
  border: 1px solid #444;
  background: #1e1e1e;
  color: #e0e0e0;
  box-sizing: border-box;
}

/* 1) Use dynamic viewport to avoid iOS 100vh bugs */
.modal-overlay {
  height: 100dvh;                 /* was 100vh */
  padding: 0 16px;                /* good for edge taps */
  overscroll-behavior: contain;   /* prevent rubber-band scroll bleed */
}

/* 2) Keep modal fully visible on small screens */
.modal-content {
  max-width: 520px;               /* desktop cap */
  width: 100%;
  max-height: calc(100dvh - 48px);/* allow internal scroll if long */
  overflow: auto;                 /* scroll inside modal on small screens */
  -webkit-overflow-scrolling: touch;
}

/* 3) Inputs: prevent iOS zoom (>=16px), full width, no weird margins */
.modal-content input,
.modal-content textarea,
.modal-content select,
.modal-content button {
  font-size: 16px;                /* avoids iOS zoom-on-focus */
}
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea,
.modal-content select {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 10px 0 0 0;
  box-sizing: border-box;
}

/* 4) Big enough tap targets for actions */
.nt-btn {
  min-height: 40px;               /* finger friendly */
  min-width: 44px;
}

/* 5) Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .modal-content { animation: none; }
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}

#app-modal.variant-contact .modal-content {
  align-items: stretch;
  text-align: left;
}
