/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  --bg-primary: #0a0712;
  --bg-secondary: #120e24;
  --card-bg: rgba(22, 17, 39, 0.45);
  --card-hover-bg: rgba(30, 24, 53, 0.65);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-border-hover: rgba(139, 92, 246, 0.4);
  
  --accent-violet: #8b5cf6;
  --accent-violet-glow: rgba(139, 92, 246, 0.45);
  --accent-pink: #ec4899;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

/* ==========================================
   GLOBAL RESET & INITIAL SETUP
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet);
}

/* ==========================================
   BACKGROUND GLOW EFFECT
   ========================================== */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-violet);
  top: -10%;
  right: -10%;
  animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: var(--accent-blue);
  bottom: -15%;
  left: -5%;
  animation: floatOrb 20s infinite alternate-reverse ease-in-out;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--accent-pink);
  top: 40%;
  left: 30%;
  animation: floatOrb 30s infinite alternate ease-in-out;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(80px, 50px) scale(1.15);
  }
}

/* ==========================================
   REUSABLE GLASSMORPHISM CLASSES
   ========================================== */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================
   SPINNERS & ANIMATIONS
   ========================================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.neon-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(139, 92, 246, 0.15);
  border-top-color: var(--accent-violet);
  border-right-color: var(--accent-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* ==========================================
   BUTTONS AND INPUTS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet) 0%, #7c3aed 100%);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9061f9 0%, #6d28d9 100%);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-icon-only.rounded {
  border-radius: 50%;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

/* ==========================================
   APP SHELL LAYOUT
   ========================================== */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  min-height: 100vh;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out;
}

/* ==========================================
   LOGIN SCREEN
   ========================================== */
#login-screen {
  justify-content: center;
  align-items: center;
}

.login-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
  animation: fadeIn 0.5s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-pink) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.logo-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-pass-link {
  font-size: 12px;
  color: var(--accent-violet);
  text-decoration: none;
  transition: var(--transition-fast);
}

.forgot-pass-link:hover {
  text-decoration: underline;
  color: #a78bfa;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 42px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-violet);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
  background: rgba(0, 0, 0, 0.35);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.form-footer {
  margin-bottom: 24px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 16px;
  width: 16px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.15);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-violet);
  border-color: var(--accent-violet);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: #f87171;
  font-size: 13px;
  animation: fadeIn 0.25s ease-out;
}

.error-msg svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================
   EXPLORER HEADER
   ========================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon-small {
  width: 24px;
  height: 24px;
  color: var(--accent-violet);
}

.search-wrapper {
  position: relative;
  width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  padding: 10px 16px 10px 40px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--accent-violet-glow);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
  width: 460px;
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

.clear-search-btn svg {
  width: 14px;
  height: 14px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.email-text {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================
   EXPLORER TOOLBAR & BREADCRUMBS
   ========================================== */
.explorer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 8px;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
}

.breadcrumb-item {
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 4px 8px;
  border-radius: 6px;
}

.breadcrumb-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.breadcrumb-item.active {
  color: var(--accent-violet);
  font-weight: 600;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--text-muted);
  user-select: none;
}

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

.btn-icon {
  padding: 8px 16px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   EXPLORER MAIN AREA
   ========================================== */
.explorer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 400px;
}

.loading-container, .empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 60px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.loading-container p {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-secondary);
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-container h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-container p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   GRID LAYOUT OF ITEMS
   ========================================== */
.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  animation: fadeIn 0.4s ease-out;
}

/* Card Style */
.item-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Glass card shine effect on hover */
.item-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.item-card:hover::after {
  left: 125%;
}

.item-card:hover {
  background: var(--card-hover-bg);
  border-color: var(--card-border-hover);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.item-card:active {
  transform: translateY(0) scale(1);
}

/* Icons */
.item-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.item-card[data-type="directory"] .item-icon-wrapper {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-violet);
}

.item-card[data-type="video"] .item-icon-wrapper {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}

.item-card[data-type="file"] .item-icon-wrapper {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-secondary);
}

.item-card:hover .item-icon-wrapper {
  transform: scale(1.1);
}

.item-card[data-type="directory"]:hover .item-icon-wrapper {
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.2);
}

.item-card[data-type="video"]:hover .item-icon-wrapper {
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.2);
}

.item-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

/* Card details */
.item-details {
  flex: 1;
  min-width: 0; /* Enables text overflow truncation */
}

.item-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

/* Finished Watching Progress Indicator */
.item-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-violet));
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

/* ==========================================
   IMMERSIVE VIDEO PLAYER MODAL
   ========================================== */
.player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: rgba(4, 2, 8, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.player-overlay.active {
  display: flex;
  opacity: 1;
}

.player-modal-container {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: max-width 0.4s ease, aspect-ratio 0.4s ease;
}

/* Theater Mode adjustments */
.player-modal-container.theater-mode {
  max-width: 95vw;
  aspect-ratio: 16/9;
}

.player-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.video-title-text {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  color: var(--text-primary);
}

/* Video Wrapper */
.video-player-container {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.video-player-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Big Play Indicator Button */
.big-play-btn {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  z-index: 10;
}

.big-play-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.big-play-btn:hover {
  background: var(--accent-violet);
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.7);
}

.big-play-btn svg {
  width: 28px;
  height: 28px;
  color: white;
  margin-left: 4px; /* Centering fix for play icon */
}

/* Video Loader Overlay */
.video-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9;
}

.video-loader-overlay p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Toast resume indicator */
.resume-toast {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  max-width: 320px;
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: fadeIn 0.3s ease-out;
  background: rgba(18, 14, 28, 0.85);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-violet);
  flex-shrink: 0;
}

.toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Quick feedback display */
.quick-action-overlay {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.quick-action-overlay.visible {
  opacity: 1;
}

/* Custom Controls Panel */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  padding: 16px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 12;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.video-player-container:hover .custom-controls,
.video-player-container.controls-active .custom-controls {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline progress slider */
.timeline-container {
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.timeline-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  transition: height 0.15s ease;
}

.timeline-container:hover .timeline-bar {
  height: 6px;
}

.timeline-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  width: 0%;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-violet));
  border-radius: 2px;
  width: 0%;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.15s ease;
}

.timeline-container:hover .timeline-handle {
  transform: translate(-50%, -50%) scale(1);
}

/* Controls row */
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  opacity: 0.85;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.control-btn:hover {
  opacity: 1;
  color: var(--accent-violet);
  transform: scale(1.08);
}

.control-btn svg {
  width: 20px;
  height: 20px;
}

.control-btn.text-btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 13px;
  width: auto;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.control-btn.text-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.time-display {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.time-display .divider {
  color: var(--text-muted);
}

/* Volume container */
.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-range {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  transition: width 0.25s ease, background 0.15s ease;
  overflow: hidden;
}

.volume-container:hover .volume-range,
.volume-range:focus {
  width: 80px;
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: -80px 0 0 80px var(--accent-violet);
}

/* Speed selector menu */
.speed-selector {
  position: relative;
}

.speed-menu {
  position: absolute;
  bottom: 40px;
  right: 50%;
  transform: translateX(50%);
  width: 110px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 13;
  border-radius: var(--radius-sm);
  background: rgba(18, 14, 28, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease-out;
}

.speed-option {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-secondary);
}

.speed-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.speed-option.active {
  background: var(--accent-violet);
  color: white;
}

/* ==========================================
   DASHBOARD SHELVES & FAVS STYLING
   ========================================== */
.dashboard-shelves {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 32px;
  animation: fadeIn 0.4s ease-out;
}

.shelf-section {
  display: flex;
  flex-direction: column;
}

.shelf-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.shelf-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-violet);
}

.shelf-icon.color-gold {
  color: #fbbf24;
}

.shelf-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 14px 4px;
  scroll-behavior: smooth;
  scrollbar-width: thin; /* Firefox */
}

/* Custom scrollbars for carousels */
.shelf-carousel::-webkit-scrollbar {
  height: 5px;
}
.shelf-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.shelf-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet);
}

/* Carousel Cards override style */
.shelf-carousel .item-card {
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
}

/* Star Favorite Button on cards */
.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease-in-out;
  z-index: 9;
}

.favorite-btn:hover {
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.favorite-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.item-card:hover .favorite-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Active favorite star state */
.favorite-btn.active {
  opacity: 1;
  pointer-events: auto;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.favorite-btn.active svg {
  fill: #fbbf24;
  transform: rotate(72deg) scale(1.1);
}

/* Visual layout adjustments when card contains progress */
.shelf-carousel .item-progress-track {
  height: 4px;
}

/* ==========================================
   RESPONSIVE LAYOUT MEDIA QUERIES
   ========================================== */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .search-wrapper {
    width: 100%;
  }
  
  .search-wrapper input:focus {
    width: 100%;
  }

  .explorer-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .player-overlay {
    padding: 10px;
  }
}

@media (max-width: 600px) {
  .screen {
    padding: 12px;
  }

  .login-card {
    padding: 24px 16px;
  }

  .explorer-grid {
    grid-template-columns: 1fr;
  }

  .email-text {
    display: none; /* Hide email on tiny mobile screens */
  }

  .controls-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .volume-range {
    display: none; /* Hide volume slider on mobile */
  }
}
