/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 230px;
    background-color: #000000;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2a2a2a;
}

.logo {
    color: #1DB954;
    font-size: 24px;
    font-weight: 700;
    padding: 0 20px 20px;
    text-decoration: none;
    display: block;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav .nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #b3b3b3;
    transition: color 0.2s;
}

.sidebar-nav .nav-item:hover {
    color: #ffffff;
}

.sidebar-nav .nav-item.active {
    color: #1DB954;
    position: relative;
}

.sidebar-nav .nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #1DB954;
}

.sidebar-nav .nav-item i {
    margin-right: 15px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
header {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(18, 18, 18, 0.8);
    position: relative;
    z-index: 10;
}

.search-container {
    position: relative;
    width: 450px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b3b3b3;
}

#searchInput {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border-radius: 30px;
    border: none;
    background-color: #242424;
    color: white;
    font-size: 14px;
}

#searchInput:focus {
    outline: none;
    background-color: #333;
}

.search-btn {
    margin-left: 0;
    height: 40px;
    min-width: 90px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.search-spinner {
    margin-left: 10px;
    display: inline-block;
}

.user-profile {
    display: flex;
    align-items: center;
}

.login-button {
    padding: 8px 32px;
    background-color: transparent;
    border: 1px solid white;
    border-radius: 30px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.login-button:hover {
    transform: scale(1.05);
}

/* Search Results */
.search-results-container {
    position: absolute;
    top: 60px;
    left: 32px;
    width: 450px;
    max-height: 400px;
    background-color: #282828;
    border-radius: 4px;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.search-results-container.active {
    display: block;
}

.search-results-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.search-result-item {
    display: flex;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    align-items: center;
}

.search-result-item:hover {
    background-color: #333;
}

.search-result-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.search-result-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.search-result-info p {
    font-size: 12px;
    color: #b3b3b3;
}

.search-error {
    padding: 16px;
    text-align: center;
    color: #b3b3b3;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 32px;
    position: relative;
}

.content-section {
    display: none;
    min-height: 200px;
}

.content-section.active {
    display: block;
}

/* Welcome Screen */
/* Compact welcome section so it doesn't dominate the page on desktop */
.welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Remove large min-height so player stays above the fold */
    min-height: auto;
    /* Reduce vertical padding to compact the hero */
    padding: 16px 12px;
    max-width: 760px;
    /* Add a small top/bottom margin for breathing room */
    margin: 12px auto 8px auto;
}

/* Smaller heading on desktop for a tighter hero */
.welcome-section h1 {
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
}

/* Keep copy compact and readable */
.welcome-section p {
    font-size: 16px;
    color: #b3b3b3;
    max-width: 640px;
    margin: 0 auto 12px auto;
    text-align: center;
    line-height: 1.5;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 40px;
}

.music-icon {
    font-size: 64px;
    color: #1DB954;
    margin-bottom: 30px;
}

.welcome-content h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.welcome-content p {
    font-size: 18px;
    color: #b3b3b3;
    max-width: 600px;
    margin-bottom: 32px;
}

.search-prompt {
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin-top: 16px;
}

.search-prompt p {
    font-size: 16px;
    color: #b3b3b3;
    margin: 0;
    text-align: center;
}

.search-prompt input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    background-color: #242424;
    color: white;
    font-size: 16px;
}

/* Player Container */
.player-container {
    background-color: #181818;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.track-info {
    display: flex;
    margin-bottom: 20px;
}

.album-cover {
    width: 180px;
    height: 180px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 24px;
}

.track-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.track-artist {
    font-size: 16px;
    color: #b3b3b3;
    margin-bottom: 4px;
}

.track-album {
    font-size: 14px;
    color: #b3b3b3;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    margin: 0 8px;
}

.control-btn:hover {
    color: white;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1DB954;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    transform: scale(1.1);
    background-color: #1ed760;
}

/* Content Tabs */
.content-tabs {
    display: flex;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.tab-btn:hover {
    color: white;
}

.tab-btn.active {
    color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1DB954;
}

/* Tab Content */
.tab-content {
    position: relative;
    min-height: 300px;
}

.tab-pane {
    display: none;
    position: relative;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s;
}

.content-box {
    background-color: #181818;
    border-radius: 8px;
    padding: 24px;
    line-height: 1.6;
}

.lyrics-text {
    white-space: pre-line;
}

.meaning-text h3, .history-text h3, .personnel-text h3 {
    margin-bottom: 12px;
    color: #1DB954;
}

.guitar-tab-display {
    font-family: monospace;
    white-space: pre;
    overflow-x: auto;
    background-color: #1a1a1a;
    border-radius: 4px;
    padding: 16px;
    line-height: 1.4;
    font-size: 14px;
    color: #e6e6e6;
    margin-bottom: 16px;
}

.tab-disclaimer {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 16px;
    border-top: 1px solid #333;
    padding-top: 16px;
}

/* Loading spinner for async content loading */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #1DB954;
    display: none;
}

.loading-spinner.active {
    display: block;
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.auth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background-color: #282828;
    border-radius: 8px;
    padding: 32px;
    width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #b3b3b3;
}

.close-modal:hover {
    color: white;
}

.auth-modal h2 {
    margin-bottom: 16px;
}

.auth-modal p {
    color: #b3b3b3;
    margin-bottom: 24px;
}

.spotify-auth-btn {
    background-color: #1DB954;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.spotify-auth-btn:hover {
    background-color: #1ed760;
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hide scrollbar but allow scrolling */
.content-area::-webkit-scrollbar,
.search-results-content::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.content-area,
.search-results-content,
.sidebar-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile-specific improvements */
@media (max-width: 900px) {
  /* Smooth scrolling for sidebar navigation */
  .sidebar-nav {
    scroll-behavior: smooth;
  }
  
  /* Better modal sizing on mobile */
  .auth-modal-content {
    width: calc(100vw - 32px);
    max-width: 400px;
    margin: 0 16px;
  }
} 

/* Videos Styles */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Mobile videos grid */
@media (max-width: 600px) {
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.video-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Special styling for official videos */
.official-video {
    box-shadow: 0 2px 20px rgba(29, 185, 84, 0.3);
    border: 1px solid #1DB954;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.official-video:hover {
    box-shadow: 0 5px 20px rgba(29, 185, 84, 0.5);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 12px;
}

.video-info h3 {
    font-size: 16px;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info p {
    font-size: 14px;
    color: var(--muted-text);
    margin: 0;
}

.official-badge {
    background-color: #1DB954;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
    display: inline-block;
}

/* Recommendations styles */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rec-track-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #222;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.rec-track-item:hover {
    background-color: #333;
}

.rec-play-btn {
    background-color: #1DB954;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
    transition: background-color 0.2s;
}

.rec-play-btn:hover {
    background-color: #1ed760;
}

.green-btn {
    background-color: #27ae60;
    color: #fff;
    border: none;
    padding: 0.5em 1.2em;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.green-btn:hover, .green-btn:focus {
    background-color: #219150;
}

.footer {
    width: 100%;
    text-align: center;
    padding: 1.2em 0 1em 0;
    background: #181818;
    color: #aaa;
    font-size: 1em;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.tab-loading-message {
    color: #1DB954;
    background: transparent;
    font-size: 1.1em;
    text-align: center;
    margin: 32px 0 16px 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    height: auto;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .logo {
    padding: 12px 16px;
    font-size: 20px;
    flex-shrink: 0;
  }
  .sidebar-nav {
    flex: 1;
    overflow-x: auto;
  }
  .sidebar-nav ul {
    display: flex;
    flex-direction: row;
    width: max-content;
    min-width: 100%;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    gap: 4px;
  }
  .sidebar-nav .nav-item {
    padding: 8px 6px;
    font-size: 11px;
    justify-content: center;
    flex-direction: column;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
    /* Larger touch targets for mobile */
    min-height: 44px;
  }
  .sidebar-nav .nav-item i {
    margin-right: 0;
    margin-bottom: 2px;
    font-size: 16px;
  }
  .sidebar-nav .nav-item span {
    display: block;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
  }
  /* Improve search results positioning on mobile */
  .search-results-container {
    width: calc(100vw - 64px);
    left: 32px;
    right: 32px;
  }
}

@media (max-width: 600px) {
  /* On small screens, allow the welcome section to take a bit more space */
  .welcome-section {
    padding: 24px 16px;
    margin: 12px auto;
  }
  .main-content {
    padding: 0;
  }
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
  }
  .search-container {
    width: 100%;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
  }
  #searchInput, .search-btn {
    width: 100%;
    min-width: 0;
    font-size: 16px;
    box-sizing: border-box;
    /* Larger touch targets */
    min-height: 44px;
  }
  .search-spinner {
    margin-left: 0;
    margin-top: 8px;
    display: block;
    text-align: center;
  }
  .user-profile {
    justify-content: center;
    margin-top: 12px;
  }
  .login-button {
    /* Larger touch target for mobile */
    min-height: 44px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .content-area {
    padding: 16px 12px;
  }
  .player-container {
    flex-direction: column;
    align-items: center;
    padding: 16px;
    margin-bottom: 16px;
  }
  .track-info {
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    text-align: center;
  }
  .album-cover {
    width: 150px;
    height: 150px;
    margin-right: 0;
    margin-bottom: 16px;
  }
  .track-title {
    font-size: 20px;
    margin-bottom: 8px;
  }
  .track-artist, .track-album {
    font-size: 14px;
  }
  .player-controls {
    gap: 8px;
  }
  .control-btn {
    /* Larger touch targets for mobile controls */
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
  }
  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  .content-tabs {
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    justify-content: center;
  }
  .tab-btn {
    padding: 12px 16px;
    font-size: 14px;
    /* Larger touch targets */
    min-height: 44px;
    flex: 0 0 auto;
  }
  .tab-content {
    min-height: 300px;
  }
  .content-box {
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
  }
  .footer {
    font-size: 0.95em;
    padding: 1em 0;
  }
  /* Better search results on mobile */
  .search-results-container {
    width: calc(100vw - 32px);
    left: 16px;
    right: 16px;
    max-height: 300px;
  }
  /* Welcome section mobile improvements */
  .welcome-section h1 {
    font-size: 28px;
    text-align: center;
  }
  .welcome-section p {
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    padding: 0 8px;
  }
  .search-prompt p {
    font-size: 14px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .logo {
    font-size: 16px;
    padding: 10px 8px;
  }
  .sidebar-nav .nav-item {
    min-width: 50px;
    padding: 6px 4px;
  }
  .sidebar-nav .nav-item span {
    font-size: 9px;
  }
  .tab-btn {
    font-size: 12px;
    padding: 10px 8px;
    /* Maintain touch target size */
    min-height: 44px;
  }
  .content-box {
    font-size: 14px;
    padding: 12px;
  }
  .album-cover {
    width: 120px;
    height: 120px;
  }
  .track-title {
    font-size: 18px;
  }
  /* Ensure header elements are properly spaced */
  header {
    padding: 8px 12px;
  }
  .content-area {
    padding: 12px 8px;
  }
}

/* Recently Played Section */
.recently-played-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.recently-played-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recently-played-track {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.recently-played-track:hover {
    background: rgba(255, 255, 255, 0.1);
}

.recently-played-track img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    margin-right: 16px;
}

.recently-played-track-info {
    flex: 1;
}

.recently-played-track-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.recently-played-track-artist {
    color: #b3b3b3;
    font-size: 0.9em;
}

.recently-played-track-album {
    color: #b3b3b3;
    font-size: 0.8em;
    margin-top: 2px;
}

.recently-played-track-time {
    color: #b3b3b3;
    font-size: 0.8em;
    margin-left: 16px;
}

.recently-played-track-play {
    margin-left: 16px;
    color: #1DB954;
    opacity: 0;
    transition: opacity 0.2s;
}

.recently-played-track:hover .recently-played-track-play {
    opacity: 1;
}

/* Album Artwork Modal */
.album-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.album-modal.active {
    display: flex;
}

.album-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.album-modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.album-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    transition: transform 0.2s;
}

.album-modal-close:hover {
    transform: scale(1.1);
}

.album-cover {
    cursor: pointer;
    transition: transform 0.2s;
}

.album-cover:hover {
    transform: scale(1.05);
}

/* Access Banner */
.access-banner {
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid #1DB954;
    border-radius: 8px;
    padding: 16px 24px;
    margin: 24px auto;
    max-width: 600px;
    text-align: center;
    width: fit-content;
}

.access-banner p {
    color: #ffffff;
    margin: 0;
    font-size: 16px;
}

.access-banner a {
    color: #1DB954;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.access-banner a:hover {
    color: #1ed760;
    text-decoration: underline;
} 