@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

/* FENÊTRE PRINCIPALE — style Windows XP corrompu */
.wmp-window {
  width: 100%;
  border: 2px solid #c8a8c8;
  border-radius: 4px 4px 2px 2px;
  overflow: hidden;
  box-shadow: 
    2px 2px 0px #e8c8e8,
    4px 4px 0px rgba(200,100,150,0.3),
    0 0 20px rgba(255,182,193,0.2);
  font-family: 'VT323', monospace;
  position: relative;
}

/* Effet scanlines sur toute la fenêtre */
.wmp-window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* BARRE DE TITRE — Windows XP pastel corrompu */
.wmp-titlebar {
  background: linear-gradient(180deg, 
    #e8b4d0 0%, 
    #d4a0c0 40%, 
    #c090b0 60%,
    #d4a0c0 100%
  );
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #b880a8;
}

.wmp-title {
  color: #fff;
  font-size: 0.95rem;
  font-family: 'Share Tech Mono', monospace;
  font-weight: normal;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
  animation: glitch-title 8s infinite;
}

@keyframes glitch-title {
  0%, 92%, 100% { 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    transform: translate(0);
  }
  93% { 
    text-shadow: -2px 0 #ff9, 2px 0 #f0f;
    transform: translate(-1px, 0);
  }
  94% { 
    text-shadow: 2px 0 #0ff, -2px 0 #f0f;
    transform: translate(2px, 0);
  }
  95% {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    transform: translate(0);
  }
}

.wmp-controls-win {
  display: flex;
  gap: 3px;
}

.wmp-btn-win {
  width: 18px;
  height: 18px;
  border: 1px solid #9a6090;
  background: linear-gradient(180deg, #f0d0e8, #d8b0c8);
  color: #3a1a3a;
  font-size: 0.7rem;
  border-radius: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.wmp-close { 
  background: linear-gradient(180deg, #f0a0b0, #d08090);
  color: #fff;
}
.wmp-btn-win:hover { 
  background: linear-gradient(180deg, #fff0f8, #f0d0e8);
  filter: brightness(1.1);
}

/* MENU NAV */
.wmp-menu {
  background: #f5eaf5;
  padding: 2px 8px;
  display: flex;
  gap: 0;
  font-size: 0.82rem;
  color: #2a002a;
  border-bottom: 1px solid #c8a8c8;
}

.wmp-menu-link {
  cursor: pointer;
  padding: 2px 8px;
  text-decoration: none;
  color: #2a002a;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  transition: all 0.1s ease;
}

.wmp-menu-link:hover {
  background: #3060c0;
  color: #fff;
}

.active-menu {
  color: #2a002a;
  text-decoration: underline;
}

/* ZONE ÉCRAN — CRT corrompu */
.wmp-screen {
  background: #0a0010;
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
}

/* Effet CRT */
.wmp-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.6) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px);
  z-index: 2;
  pointer-events: none;
}

.wmp-screen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0010;
  z-index: 1;
}

.wmp-ready-text {
  color: #ffb6c1;
  font-size: 1.6rem;
  font-family: 'VT323', monospace;
  animation: glitch-text 4s infinite;
  text-shadow: 0 0 10px rgba(255,182,193,0.5);
}

@keyframes glitch-text {
  0%, 85%, 100% { 
    opacity: 1;
    transform: translate(0);
    text-shadow: 0 0 10px rgba(255,182,193,0.5);
  }
  86% { 
    opacity: 0.8;
    transform: translate(-3px, 0);
    text-shadow: 3px 0 #ff9, -3px 0 #f0f;
    color: #f0f;
  }
  87% {
    transform: translate(3px, 0);
    text-shadow: -3px 0 #0ff, 3px 0 #ff9;
    color: #0ff;
  }
  88%, 89% {
    transform: translate(0);
    opacity: 1;
    color: #ffb6c1;
    text-shadow: 0 0 10px rgba(255,182,193,0.5);
  }
  90% {
    transform: translate(-1px, 2px);
    opacity: 0.6;
  }
}

/* BARRE STATUT */
.wmp-statusbar {
  background: #f0e8f0;
  padding: 2px 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #5a3a5a;
  border-top: 1px solid #c8a8c8;
  border-bottom: 1px solid #c8a8c8;
  font-family: 'Share Tech Mono', monospace;
}

/* CONTRÔLES */
.wmp-controls {
  background: linear-gradient(180deg, #e8d8f0, #d8c8e8);
  padding: 6px 10px;
  border-top: 1px solid #c8a8c8;
}

.wmp-progress-zone {
  margin-bottom: 6px;
}

.wmp-progress-bar {
  width: 100%;
  height: 6px;
  background: #b8a8b8;
  border-radius: 0;
  position: relative;
  cursor: pointer;
  border: 1px solid #9a8a9a;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.wmp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6060c0, #a060c0);
  border-radius: 0;
  width: 0%;
  transition: width 0.1s linear;
}

.wmp-progress-thumb {
  width: 10px;
  height: 14px;
  background: linear-gradient(180deg, #f0e8f8, #d0c0e0);
  border: 1px solid #9a8090;
  border-radius: 2px;
  position: absolute;
  top: -4px;
  left: 0%;
  transform: translateX(-50%);
  transition: left 0.1s linear;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.wmp-left-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wmp-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 40%;
  background: linear-gradient(180deg, #f0e8f8, #d8c8e8);
  border: 2px solid #9a80a8;
  color: #3a1a4a;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 1px 1px 3px rgba(0,0,0,0.2);
}

.wmp-play-btn:hover {
  background: linear-gradient(180deg, #fff, #e8d8f8);
  transform: scale(1.05);
}

.wmp-ctrl-btn {
  width: 26px;
  height: 22px;
  border-radius: 1px;
  background: linear-gradient(180deg, #f0e8f8, #d8c8e8);
  border: 1px solid #9a80a8;
  color: #3a1a4a;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  font-family: 'VT323', monospace;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.wmp-ctrl-btn:hover {
  background: linear-gradient(180deg, #fff, #e8d8f8);
  border-color: #6060c0;
}

.wmp-volume-zone {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wmp-volume {
  width: 80px;
  accent-color: #8060c0;
  height: 4px;
}

/* PLAYLIST */
.wmp-playlist {
  background: #fff8ff;
  border-top: 1px solid #c8a8c8;
  max-height: 80px;
  overflow-y: auto;
}

.wmp-playlist-header {
  background: #3060c0;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.wmp-track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  color: #2a002a;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
  border-bottom: 1px solid #e8d8e8;
  transition: background 0.1s ease;
}

.wmp-track:hover {
  background: #3060c0;
  color: #fff;
}

.active-track {
  background: #d8e8ff;
  color: #001060;
}

.track-num {
  color: #9a80a8;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* SCROLLBAR PLAYLIST */
.wmp-playlist::-webkit-scrollbar { width: 12px; }
.wmp-playlist::-webkit-scrollbar-track { 
  background: #e8d8e8;
  border-left: 1px solid #c8a8c8;
}
.wmp-playlist::-webkit-scrollbar-thumb { 
  background: linear-gradient(180deg, #e0d0e8, #c0b0d0);
  border: 1px solid #9a80a8;
}

/* MINI PLAYER */
.mini-player {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 260px;
  z-index: 999;
  font-family: 'VT323', monospace;
  border: 2px solid #c8a8c8;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  box-shadow: -2px -2px 0px #b890b0;
}

.mini-player-header {
  background: linear-gradient(180deg, #e8b4d0, #c090b0);
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mini-player-title {
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Share Tech Mono', monospace;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.mini-player-toggle {
  color: #fff;
  font-size: 0.8rem;
}

.mini-player-body {
  background: #f0e8f8;
  padding: 6px 8px;
}

.mini-progress-bar {
  width: 100%;
  height: 5px;
  background: #b8a8c8;
  border-radius: 0;
  cursor: pointer;
  margin-bottom: 6px;
  border: 1px solid #9a80a8;
}

.mini-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6060c0, #a060c0);
  width: 0%;
  transition: width 0.1s linear;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-controls button {
  background: linear-gradient(180deg, #f0e8f8, #d8c8e8);
  border: 1px solid #9a80a8;
  color: #3a1a4a;
  border-radius: 1px;
  padding: 1px 6px;
  font-family: 'VT323', monospace;
  font-size: 0.9rem;
  cursor: pointer;
}

.mini-controls button:hover {
  background: linear-gradient(180deg, #fff, #e8d8f8);
}

.mini-controls span {
  color: #5a3a6a;
  font-size: 0.85rem;
  font-family: 'Share Tech Mono', monospace;
  flex: 1;
  text-align: center;
}
