:root { --primary-color: #4CAF50; --primary-hover: #45a049; --bg-color: #0a0a0a; --surface-color: rgba(15, 23, 42, 0.8); --text-primary: #ffffff; --text-secondary: rgba(255, 255, 255, 0.7); --error-color: #ff4444; } /* Light theme variables */ [data-theme="light"] { --bg-color: #f5f5f5; --surface-color: rgba(255, 255, 255, 0.9); --text-primary: #1a1a1a; --text-secondary: rgba(0, 0, 0, 0.7); } .app-header { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.5rem; background: var(--surface-color); backdrop-filter: blur(12px); z-index: 100; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 700; color: var(--primary-color); } .controls-container { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; z-index: 100; background: var(--surface-color); backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); padding: 1.5rem; } .upload-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; } .upload-content i { font-size: 3rem; color: var(--primary-color); } .upload-text h3 { margin: 0; font-size: 1.2rem; font-weight: 600; } .upload-text p { margin: 0.5rem 0; color: var(--text-secondary); } .file-types { font-size: 0.8rem; color: var(--text-secondary); } .error-toast { position: fixed; top: 90px; left: 50%; transform: translateX(-50%) translateY(-150%); background: rgba(255, 68, 68, 0.95); color: white; padding: 0.75rem 2rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1001; text-align: center; max-width: 90%; pointer-events: none; font-size: 0.9rem; font-weight: 500; backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.1); opacity: 0; } .error-toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; } select { padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; cursor: pointer; font-size: 14px; -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; } select:focus { outline: none; border-color: #4CAF50; } select option { background-color: #1a1a1a; color: white; padding: 8px; } select::-ms-expand { display: none; } input[type="range"] { /* ... existing properties ... */ -webkit-appearance: none; -moz-appearance: none; appearance: none; /* Add standard property */ /* ... rest of properties ... */ } .track-title { display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; } .track-duration { font-size: 0.85rem; color: var(--text-secondary); margin-left: 8px; } .track-metadata { font-size: 0.85rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .playlist-item { padding: 8px 12px; cursor: pointer; border-radius: 4px; transition: background-color 0.2s; } .playlist-item:hover { background: rgba(255, 255, 255, 0.1); } .playlist-item.active { background: rgba(76, 175, 80, 0.3); } .music-controls { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; } .control-btn { background: transparent; border: none; color: white; padding: 8px; min-width: auto; border-radius: 50%; cursor: pointer; transition: all 0.2s ease; } .control-btn:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); } .control-btn:active { transform: scale(0.95); } .play-pause-btn { background: #4CAF50; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; } .play-pause-btn:hover { background: #45a049; } .previous-btn, .next-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; } .control-btn i { font-size: 1.2em; } .play-pause-btn i { font-size: 1.4em; } .control-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } /* Update volume control styles */ .volume-control { position: relative; display: flex; align-items: center; gap: 0.5rem; margin-left: auto; min-width: 120px; } .volume-btn { background: transparent; border: none; padding: 8px; min-width: auto; color: var(--text-primary); } .volume-slider-container { position: relative; width: 80px; height: 4px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; } .volume-progress { position: absolute; left: 0; top: 0; height: 100%; background: var(--primary-color); border-radius: 2px; pointer-events: none; width: 50%; } #volume { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; } /* Add tooltip styles */ .tooltip { position: fixed; background: rgba(0, 0, 0, 0.8); color: white; padding: 0.5rem 1rem; border-radius: 0.25rem; font-size: 0.8rem; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 1002; } .tooltip.visible { opacity: 1; } .playlist-container { background: var(--surface-color); border-radius: 1rem; margin: 0; max-height: 100%; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .playlist-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .playlist-header h3 { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--text-primary); } .tracks-list { max-height: 300px; overflow-y: auto; padding: 0.5rem; } .playlist-item { padding: 0.75rem; border-radius: 0.5rem; cursor: pointer; transition: background-color 0.2s; } .playlist-item:hover { background: rgba(255, 255, 255, 0.1); } .playlist-item.active { background: rgba(76, 175, 80, 0.2); } .track-info { display: flex; align-items: center; gap: 1rem; } .track-number { color: var(--text-secondary); min-width: 2rem; text-align: right; } .track-content { flex: 1; } .track-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; } .track-duration { color: var(--text-secondary); font-size: 0.9rem; } .track-metadata { color: var(--text-secondary); font-size: 0.9rem; } .track-controls { opacity: 0; transition: opacity 0.2s; } .playlist-item:hover .track-controls, .playlist-item.active .track-controls { opacity: 1; } /* Add custom scrollbar for the tracks list */ .tracks-list::-webkit-scrollbar { width: 6px; } .tracks-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); border-radius: 3px; } .tracks-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; } .tracks-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); } @media screen and (max-width: 768px) { .app-header { padding: 0.75rem 1rem; } .logo span { display: none; /* Hide logo text on mobile */ } .main-content { position: fixed; top: auto; right: 0; bottom: 140px; /* Position above player controls */ width: 100%; max-height: 40vh; padding: 0 1rem; z-index: 10; } .upload-area { margin: 0.5rem 0; padding: 1rem; } .controls-container { bottom: 0; width: 100%; border-radius: 1rem 1rem 0 0; padding: 1rem; } .music-controls { gap: 12px; } .control-btn { padding: 6px; } .volume-control { display: none; /* Hide volume control on mobile */ } .playlist-container { border-radius: 1rem; max-height: 100%; } .tracks-list { max-height: calc(40vh - 60px); /* Adjust based on playlist header height */ } .track-metadata { max-width: 200px; /* Prevent long metadata from breaking layout */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } /* Add specific adjustments for very small screens */ @media screen and (max-width: 380px) { .music-controls { gap: 8px; } .control-btn { width: 28px; height: 28px; } .play-pause-btn { width: 36px; height: 36px; } .track-title { font-size: 0.9rem; } .track-metadata { font-size: 0.8rem; max-width: 150px; } } /* Add these styles for the now playing info */ .now-playing-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .now-playing-text { display: flex; flex-direction: column; overflow: hidden; flex: 1; margin-right: 16px; } .now-playing-title { font-size: 1rem; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .now-playing-artist { font-size: 0.9rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .time-display { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; } /* Update mobile styles */ @media screen and (max-width: 768px) { .now-playing-info { flex-direction: column; align-items: flex-start; gap: 4px; } .now-playing-text { width: 100%; margin-right: 0; } .time-display { align-self: flex-end; } } /* Update very small screen styles */ @media screen and (max-width: 380px) { .now-playing-title { font-size: 0.9rem; } .now-playing-artist { font-size: 0.8rem; } } /* Add these styles at the appropriate location in your CSS file */ /* Ensure the canvas container takes full viewport */ body { position: relative; width: 100vw; height: 100vh; margin: 0; overflow: hidden; } /* Position the THREE.js canvas */ canvas { position: fixed !important; top: 0; left: 0; z-index: 1; } /* Adjust the header positioning */ .app-header { /* ... existing styles ... */ z-index: 100; } /* Create a main content area for the playlist */ .main-content { position: fixed; top: 80px; /* Adjust based on your header height */ right: 2rem; width: 400px; max-height: calc(100vh - 260px); /* Adjust based on your controls height */ z-index: 10; overflow: visible; } /* Adjust the playlist container */ .playlist-container { margin: 0; max-height: 100%; background: var(--surface-color); backdrop-filter: blur(12px); } /* Adjust the controls container */ .controls-container { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; z-index: 100; background: var(--surface-color); backdrop-filter: blur(12px); } /* Adjust the upload area to be inside the playlist */ .upload-area { margin: 1rem; } /* Add these styles for the progress bar */ .progress-bar { position: relative; width: 100%; height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; margin: 8px 0; cursor: pointer; } .progress { position: absolute; left: 0; top: 0; height: 100%; background: var(--primary-color); border-radius: 2px; pointer-events: none; width: 0; } .seek-slider { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; } /* Add styles for the playlist buttons */ .playlist-btn { background: transparent; border: none; color: var(--text-primary); padding: 8px; cursor: pointer; border-radius: 50%; transition: all 0.2s ease; } .playlist-btn:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); } .playlist-btn.active { color: var(--primary-color); } /* Add loading spinner styles */ .loading { display: none; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; } .loading.visible { display: flex; } .spinner { width: 20px; height: 20px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Add styles for dragover state */ .upload-area.dragover { border-color: var(--primary-color); background: rgba(76, 175, 80, 0.1); } /* Add styles for the main container */ .container { display: flex; flex-direction: column; height: 100vh; padding: 80px 2rem 2rem; max-width: 1200px; margin: 0 auto; box-sizing: border-box; } /* Update body styles */ body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-primary); overflow-x: hidden; line-height: 1.5; } /* Add styles for buttons */ button { font-family: 'Inter', sans-serif; border: none; background: none; cursor: pointer; padding: 0; color: inherit; } button:disabled { opacity: 0.5; cursor: not-allowed; } /* Hide file input */ input[type="file"] { display: none; } /* Add transition for theme changes */ * { transition: background-color 0.3s, color 0.3s; } /* Add styles for mobile responsiveness */ @media (max-width: 768px) { .container { padding: 60px 1rem 1rem; } .controls-container { padding: 1rem; } .music-controls { flex-wrap: wrap; gap: 8px; } .volume-control { width: 100%; order: 3; } #visualization-type { width: 100%; order: 4; } } /* Add styles for the error message */ #error-message { color: var(--error-color); text-align: center; margin: 8px 0; font-size: 0.9rem; } /* Add styles for file name display */ #file-name { margin-top: 8px; font-size: 0.9rem; color: var(--text-secondary); text-align: center; word-break: break-word; } /* Add styles for header buttons */ .header-controls { display: flex; align-items: center; gap: 8px; } .header-btn { background: transparent; border: none; color: var(--text-primary); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; } .header-btn:hover { background: rgba(255, 255, 255, 0.1); } .header-btn.active { color: var(--primary-color); background: rgba(76, 175, 80, 0.1); } /* Update main content styles */ .main-content { position: fixed; top: 80px; right: -420px; /* Hide by default */ width: 400px; max-height: calc(100vh - 260px); z-index: 10; overflow: visible; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .main-content.visible { right: 2rem; } /* Update upload area styles */ .upload-area { display: none; margin: 1rem; opacity: 0; transform: translateY(-20px); transition: all 0.3s ease; } .upload-area.visible { display: block; opacity: 1; transform: translateY(0); } /* Update playlist container styles */ .playlist-container { display: none; opacity: 0; transform: translateY(-20px); transition: all 0.3s ease; } .playlist-container.visible { display: block; opacity: 1; transform: translateY(0); } /* Add these styles for the visualization type dropdown */ .viz-type-dropdown { position: fixed; top: 60px; right: -200px; background: var(--surface-color); backdrop-filter: blur(12px); border-radius: 8px; padding: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transition: right 0.3s ease; z-index: 99; width: 200px; } .viz-type-dropdown.visible { right: 16px; } .viz-type-options { display: flex; flex-direction: column; gap: 8px; } .viz-type-options button { background: transparent; border: none; color: var(--text-primary); padding: 8px 16px; text-align: left; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; width: 100%; } .viz-type-options button:hover { background: rgba(255, 255, 255, 0.1); } .viz-type-options button.active { background: var(--primary-color); color: white; } /* Update mobile styles */ @media screen and (max-width: 768px) { .header-controls { gap: 4px; } .header-btn { width: 32px; height: 32px; } .viz-type-dropdown { top: 50px; width: calc(100% - 32px); right: -100%; } .viz-type-dropdown.visible { right: 16px; } } /* Fix the main content positioning */ .main-content { position: fixed; top: 60px; /* Adjust based on header height */ right: -420px; width: 400px; max-height: calc(100vh - 180px); /* Adjust for header and player */ z-index: 10; overflow: visible; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: 16px; box-sizing: border-box; } /* Update the mobile layout */ @media screen and (max-width: 768px) { .main-content { width: 100%; right: -100%; padding: 8px; } .main-content.visible { right: 0; } .playlist-container, .upload-area { margin: 0; border-radius: 8px; } }