/* --- Shoka Music Player (Exact Copy) --- */

/* Variables exactas de Shoka */
:root {
  --grey-0: #fff;
  --grey-1: #fdfdfd;
  --grey-2: #f7f7f7;
  --grey-3: #eff2f3;
  --grey-4: #ccc;
  --grey-5: #999;
  --grey-6: #666;
  --grey-7: #333;
  --grey-8: #222;
  --grey-9: #000;

  --grey-1-a0: rgba(253, 253, 253, 0);
  --grey-1-a7: rgba(253, 253, 253, 0.7);
  --grey-1-a5: rgba(253, 253, 253, 0.5);
  --grey-1-a3: rgba(253, 253, 253, 0.3);
  --grey-9-a1: rgba(0, 0, 0, 0.1);
  --grey-9-a5: rgba(0, 0, 0, 0.5);
  --grey-2-a0: rgba(247, 247, 247, 0);

  --color-pink-light: #ffe6fa;
  --color-cyan-light: #e3fdf5;

  --color-red: #e9546b;
  --color-pink: #ed6ea0;
  --color-orange: #ec8c69;
  --color-yellow: #eab700;
  --color-green: #0a7426;
  --color-aqua: #3e999f;
  --color-blue: #38a1db;
  --color-purple: #9d5b8b;
  --color-grey: #869194;

  --color-red-a1: rgba(233, 84, 107, 0.1);
  --color-red-a3: rgba(233, 84, 107, 0.3);
  --color-pink-a3: rgba(237, 110, 160, 0.3);
  --color-pink-light-a3: rgba(255, 230, 250, 0.3);
  --color-pink-light-a5: rgba(255, 230, 250, 0.5);
  --color-pink-light-a7: rgba(255, 230, 250, 0.7);

  --body-bg-shadow: var(--grey-2);
  --box-bg-shadow: var(--grey-9-a1);
  --text-color: var(--grey-7);
  --header-text-color: var(--grey-0);
  --primary-color: var(--color-red);

  --font-size-base: 1rem;
  --font-size-smaller: 0.875rem;
  --font-size-smallest: 0.75rem;
  --font-size-larger: 1.25rem;
}

/* Dark theme variables */
[data-theme="dark"] {
  --grey-0: #222;
  --grey-1: #21252b;
  --grey-2: #363636;
  --grey-3: #444;
  --grey-4: #666;
  --grey-5: #aaa;
  --grey-6: #ccc;
  --grey-7: #ddd;
  --grey-8: #eee;
  --grey-9: #f7f7f7;

  --grey-1-a7: rgba(34, 34, 34, 0.7);
  --grey-1-a5: rgba(34, 34, 34, 0.5);
  --grey-1-a3: rgba(34, 34, 34, 0.3);
  --grey-1-a0: rgba(34, 34, 34, 0);
  --grey-9-a1: rgba(51, 51, 51, 0.1);
  --grey-2-a0: rgba(54, 54, 54, 0);

  --text-color: var(--grey-5);
  --header-text-color: var(--grey-9);
}

/* Icon font from Shoka */
@font-face {
  font-family: 'ic';
  src: url('//at.alicdn.com/t/font_1832207_igi8uaupcus.eot');
  src: url('//at.alicdn.com/t/font_1832207_igi8uaupcus.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_1832207_igi8uaupcus.woff2') format('woff2'),
  url('//at.alicdn.com/t/font_1832207_igi8uaupcus.woff') format('woff'),
  url('//at.alicdn.com/t/font_1832207_igi8uaupcus.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_1832207_igi8uaupcus.svg#ic') format('svg');
}

.ic {
  font-family: "ic" !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  width: 1.25em;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Icon definitions */
.i-circle-play:before {
  content: "\e647";
}

.i-circle-pause:before {
  content: "\e64a";
}

.i-backward:before {
  content: "\e649";
}

.i-forward:before {
  content: "\e648";
}

.i-volume-off:before {
  content: "\e61e";
}

.i-volume-on:before {
  content: "\e62c";
}

.i-random:before {
  content: "\e64d";
}

.i-loop:before {
  content: "\e64b";
}

.i-order:before {
  content: "\e64c";
}

.i-play:before {
  content: "\e647";
}

.i-pause:before {
  content: "\e64a";
}

/* Main container - INTEGRATED WITH WEB COLORS */
.media-container {
  position: relative;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--grey);
  box-shadow: 0 0.625rem 1.875rem -0.9375rem rgba(0, 0, 0, 0.3);
  overflow: hidden;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--darkgrey), var(--grey));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Player info section */
.player-info {
  color: var(--silver);
  font-size: var(--font-size-base);
  min-width: 16.25rem;
}

/* Audio player specific styles */
.audio {
  background: transparent;
}

.audio .preview {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.25rem 0;
}

.audio .preview .info {
  display: flex;
  flex-direction: column;
  margin-left: 0.625rem;
  padding: 0.625rem;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
}

.audio .preview .info h4 {
  margin: 0;
  text-overflow: ellipsis;
  max-height: 3rem;
  padding: 0;
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.audio .preview .info span {
  font-size: var(--font-size-smallest);
  color: white;
  margin-top: 0.25rem;
}

/* Lyrics section */
.audio .preview .lrc {
  max-height: 4rem;
  margin-top: 0.3125rem;
  font-size: var(--font-size-smallest);
  position: relative;
  text-align: center;
  overflow: hidden;
}

.audio .preview .lrc .inner {
  width: 100%;
  transition: all 0.5s ease-out;
}

.audio .preview .lrc p {
  font-size: 0.75rem;
  color: white;
  line-height: 1rem !important;
  height: 1rem !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.5s ease-out;
  opacity: 0.6;
  overflow: hidden;
}

.audio .preview .lrc p.current {
  opacity: 1;
  overflow: visible;
  height: auto !important;
  min-height: 1rem;
}

/* Cover and disc - EXACT COPY FROM SHOKA */
.audio .cover {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.audio .cover::before {
  content: "";
  position: absolute;
  z-index: 1;
  background: url("/images/graficos/play_needle.png") no-repeat center/contain;
  width: 3.4375rem;
  height: 5.1875rem;
  top: -1.5625rem;
  left: -1.5625rem;
  transform: rotateZ(-60deg);
  animation: rotate-needle-pause 0.5s 1 normal linear forwards;
  transform-origin: 0.625rem 0.625rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.audio .cover .disc {
  animation: rotate 20s linear infinite;
  animation-play-state: paused;
  padding: 1.5rem;
  max-height: 144px;
  position: relative;
}

.audio .cover .disc::after {
  content: "";
  position: absolute;
  background: url("/images/graficos/play_disc.png") no-repeat center/contain;
  z-index: 1;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.audio .cover img {
  object-fit: contain;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

/* Playing state */
.audio.playing .cover::before {
  animation: rotate-needle-resume 0.5s 1 normal linear forwards;
}

.audio.playing .cover .disc {
  animation-play-state: running;
}

/* Controller section - INTEGRATED WITH WEB COLORS */
.audio .controller {
  font-family: 'ic', sans-serif;
  cursor: pointer;
  font-size: var(--font-size-larger);
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  padding: 1rem 0 1.5rem 0;
  background: linear-gradient(135deg, var(--grey), var(--darkgrey));
  margin: 1rem 1rem 1rem 1rem;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--grey);
  border-bottom: 2px solid var(--grey);
}

.audio .controller .btn {
  color: #cccccc;
  width: 18%;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  position: relative;
  font-family: 'ic', sans-serif;
}

.audio .controller .btn:hover {
  color: #1e3a8a;
}

/* Play/Pause button */
.audio .controller .play-pause {
  font-size: 130%;
  background: transparent;
  color: #cccccc;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  --icon-content: "\e647";
}

.audio .controller .play-pause:hover {
  color: #1e3a8a;
}

.audio .controller .play-pause::before {
  content: var(--icon-content);
}

.playing .audio .controller .play-pause::before {
  content: "\e64a";
}

/* Backward/Forward buttons */
.audio .controller .backward::before {
  content: "\e649";
}

.audio .controller .forward::before {
  content: "\e648";
}

/* Volume control */
.audio .controller .volume {
  position: relative;
}

.audio .controller .volume.off::before {
  content: "\e61e";
}

.audio .controller .volume.on::before {
  content: "\e62c";
}

.audio .controller .volume .bar {
  position: absolute;
  height: 0.25rem;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
  bottom: 0;
  /*left: 0;*/
  transition: width 0.2s ease-out;
  width: 50%;
  border-radius: 2px;
}

.audio .controller .volume.off .bar {
  height: 0;
}

/* Mode buttons */
.audio .controller .mode.random::before {
  content: "\e64d";
}

.audio .controller .mode.loop::before {
  content: "\e64b";
}

.audio .controller .mode.order::before {
  content: "\e64c";
}

/* Playlist section */
.audio .playlist {
  border-top: 0.125rem solid var(--grey);
  background: linear-gradient(135deg, var(--grey), var(--darkgrey));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.audio .playlist ol {
  font-size: var(--font-size-smaller);
  padding: 0.3125rem 0;
  margin: 0.625rem 0 0;
  height: 12.5rem;
  overflow-y: auto;
  counter-reset: counter;
  position: relative;
  list-style: none;
}

.audio .playlist ol::-webkit-scrollbar {
  width: 0.1875rem;
  height: 0.1875rem;
}

.audio .playlist ol::-webkit-scrollbar-track {
  background: transparent;
}

.audio .playlist ol::-webkit-scrollbar-thumb {
  background: var(--grey);
  border-radius: 2px;
}

.audio .playlist ol > li {
  display: flex;
  padding: 0.3125rem 0.9375rem 0.3125rem 1.5625rem;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 2rem;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
  margin: 0 0.5rem;
  color: white;
}

.audio .playlist ol > li.error {
  opacity: 0.5;
  text-decoration-line: line-through;
}

.audio .playlist ol > li::before {
  height: auto;
  background: 0 0 !important;
  border: none !important;
  position: relative;
  top: 0 !important;
  left: 0 !important;
  font-size: inherit;
  line-height: inherit;
  margin-left: -1.25rem;
  width: 1.875rem;
  counter-increment: counter;
  content: counter(counter);
  text-align: right;
  padding-right: 0.3125rem;
  color: rgba(255, 255, 255, 0.3);
}

.audio .playlist ol > li .info {
  display: block;
  width: 100%;
}

.audio .playlist ol > li .info span:nth-child(2) {
  float: right;
  margin-left: 0.625rem;
  color: white;
}

/* Current playing item */
.audio .playlist ol > li.current {
  color: #1e3a8a;
  position: relative;
  background: rgba(30, 58, 138, 0.2);
  border-left: 3px solid #1e3a8a;
}

.audio .playlist ol > li.current::before {
  font-family: "ic", sans-serif;
  content: "\e647";
  color: #1e3a8a;
}

.audio .playlist ol > li.current .progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  border-radius: 4px;
  cursor: pointer;
}

.audio .playlist ol > li.current .progress .bar {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.4), rgba(59, 130, 246, 0.3));
  top: 0;
  left: 0;
  transition: width 0.2s ease-out;
  width: 0%;
  border-radius: 4px;
}

.audio .playlist ol > li.current .progress::before {
  content: attr(data-ptime) " / " attr(data-dtime);
  color: white;
  position: absolute;
  right: 0;
  padding: 0 0.3rem;
  font-size: 0.75rem;
  z-index: 2;
}

.audio .playlist ol > li.current .progress.seeking::before {
  color: #1e3a8a;
  font-weight: bold;
}

.audio .playlist ol > li.current .info {
  padding-right: 5rem;
  user-select: none;
}

.audio .playlist ol > li.current .info span:nth-child(2) {
  display: none;
}

/* Hover effects */
.audio .playlist ol > li:hover {
  background-color: rgba(30, 58, 138, 0.15);
  transform: translateX(2px);
}

.audio .playlist ol > li:hover::before {
  color: #1e3a8a;
}

/* Animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-needle-pause {
  from {
    transform: rotateZ(-30deg);
  }
  to {
    transform: rotateZ(-60deg);
  }
}

@keyframes rotate-needle-resume {
  from {
    transform: rotateZ(-60deg);
  }
  to {
    transform: rotateZ(-30deg);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .audio .preview {
    padding: 1.25rem 0.625rem 0;
    flex-direction: column;
  }
  
  .audio .preview .info {
    margin-left: 0;
    text-align: center;
  }
  
  .audio .cover img {
    width: 5rem;
    height: 5rem;
  }
  
  .audio .controller {
    font-size: 1.2rem;
    margin: 1rem 0.5rem 1rem 0.5rem;
    padding: 1.2rem 0;
  }
  
  .audio .controller .btn {
    width: 22%;
    padding: 0.8rem;
    font-size: 1.3rem;
  }
  
  .audio .controller .play-pause {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }
  
  .audio .playlist ol {
    height: 10rem;
  }
  
  .audio .playlist ol > li {
    margin: 0 0.25rem;
    height: 2.5rem;
    padding: 0.5rem 0.9375rem 0.5rem 1.5625rem;
  }
  
  /* Improve progress bar touch area on mobile */
  .audio .playlist ol > li.current {
    position: relative;
  }
  
  .audio .playlist ol > li.current .progress {
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
  }
  
  .audio .playlist ol > li.current .progress .bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.6), rgba(59, 130, 246, 0.5));
  }
  
  /* Better touch feedback */
  .audio .controller .btn:active {
    background-color: rgba(166, 130, 154, 0.2);
    transform: scale(0.95);
    transition: all 0.1s ease;
  }
}

/* Error state */
.music-error {
  text-align: center;
  padding: 2rem;
  color: #ff6b6b;
  font-size: 1.1rem;
} 