* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('images/bg_player.jpg') center center / cover no-repeat fixed;
  font-family: 'Share Tech Mono', monospace;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEAD */
.player-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.5);
}
.player-head-title {
  font-size: 22px;
  font-weight: bold;
  color: #cc0000;
  letter-spacing: 0.08em;
  text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff;
}
.player-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* BODY */
.player-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Fila superior */
.row-top {
  flex: 0 0 60%;
  display: flex;
  flex-direction: row;
  background: rgba(0,0,0,0.2);
  overflow: hidden;
}
.row-top-left {
  width: 42%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.row-top-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  gap: 12px;
  min-width: 0;
}
.now-art-wrap {
  height: 100%;
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}
.now-art-wrap.playing {
  box-shadow: 0 0 30px rgba(0,255,65,0.25), 0 0 0 2px rgba(0,255,65,0.3);
}
.now-thumb { width:100%; height:100%; object-fit:cover; display:none; }
.now-thumb-placeholder { font-size: 48px; display:flex; align-items:center; justify-content:center; width:100%; height:100%; opacity:0.4; }

/* Fila inferior: carrusel */
.row-bottom {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  align-items: center;
  justify-content: center;
}
.carousel-wrap {
  width: 90%;
  display: flex;
  flex-direction: column;
  -webkit-transition: -webkit-transform 0.38s ease;
  transition: transform 0.38s ease;
}
.carousel-handle {
  width: 100%;
  height: 30px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px 6px 0 0;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.carousel-handle:active { background: rgba(255,255,255,0.16); }

.searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.search-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.searchbar input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
}
.searchbar input::-webkit-input-placeholder { color: rgba(255,255,255,0.3); }
.search-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-btn:active { background: rgba(255,255,255,0.18); }
.mic-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-transition: background 0.1s, -webkit-transform 0.1s;
  transition: background 0.1s, transform 0.1s;
  -webkit-user-select: none;
  user-select: none;
}
.ia-btn {
  background: #8b0000;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  padding: 7px 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-animation: ia-pulse 1.6s ease-in-out infinite;
  animation: ia-pulse 1.6s ease-in-out infinite;
}
.ia-btn:active { background: #a00000; -webkit-animation: none; animation: none; }
@-webkit-keyframes ia-pulse {
  0%   { box-shadow: 0 0 4px 1px rgba(200,0,0,0.4); -webkit-transform: scale(1); }
  50%  { box-shadow: 0 0 14px 5px rgba(200,0,0,0.75); -webkit-transform: scale(1.05); }
  100% { box-shadow: 0 0 4px 1px rgba(200,0,0,0.4); -webkit-transform: scale(1); }
}
@keyframes ia-pulse {
  0%   { box-shadow: 0 0 4px 1px rgba(200,0,0,0.4); transform: scale(1); }
  50%  { box-shadow: 0 0 14px 5px rgba(200,0,0,0.75); transform: scale(1.05); }
  100% { box-shadow: 0 0 4px 1px rgba(200,0,0,0.4); transform: scale(1); }
}

.messages {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 0;
  -webkit-transition: max-height 0.38s ease;
  transition: max-height 0.38s ease;
}
.carousel-wrap.open .messages {
  max-height: 220px;
}
#carousel-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 490;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.35s ease;
  transition: opacity 0.35s ease;
}
#carousel-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.carousel-wrap.open.expanded {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  z-index: 491;
  background: rgba(8,8,8,0.96);
  border-top: 1px solid rgba(255,255,255,0.15);
}
.carousel-wrap.open.expanded .messages {
  max-height: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cc0000 rgba(255,255,255,0.05);
}
.carousel-wrap.open.expanded .messages::-webkit-scrollbar { width: 5px; }
.carousel-wrap.open.expanded .messages::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.carousel-wrap.open.expanded .messages::-webkit-scrollbar-thumb { background: #cc0000; border-radius: 4px; }
.carousel-wrap.open.expanded .messages::-webkit-scrollbar-thumb:active { background: #ff003c; }
.carousel-wrap.open.expanded .results {
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-justify-content: center;
  justify-content: center;
  align-content: flex-start;
}
.carousel-wrap.open.expanded .carousel-more-btn {
  -webkit-align-self: auto;
  align-self: auto;
  height: 60px;
}

.results {
  display: -webkit-flex;
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px;
  scrollbar-width: none;
}
.results::-webkit-scrollbar { display: none; }
.result-item {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  flex-shrink: 0;
  width: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
}
.result-item.playing { border-color: #00ff41; background: rgba(0,255,65,0.08); }
.result-item:active { background: rgba(255,255,255,0.15); }
.result-thumb {
  width: 100%;
  height: 60px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.result-info { padding: 5px 6px 6px; }
.result-title { font-size: 10px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #fff; }
.result-dur { font-size: 9px; color: rgba(255,255,255,0.4); margin-top: 3px; }

.carousel-more-btn {
  flex-shrink: 0;
  width: 100px;
  -webkit-align-self: stretch;
  align-self: stretch;
  background: linear-gradient(180deg, #8b0000, #cc0000);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(200,0,0,0.5);
  padding: 0;
}
.carousel-more-btn:active { background: #a00000; box-shadow: none; }

.more-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-transform: uppercase;
}
.more-btn:active { background: rgba(255,255,255,0.14); }

.player-bar {
  display: flex;
  flex-direction: column;
  padding: 10px 14px 6px;
  background: rgba(0,0,0,0.75);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  gap: 6px;
}
.player-title {
  font-size: 14px;
  color: #00ff41;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.seek-row {
  display: -webkit-flex;
  display: flex;
  flex-direction: row;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0 10%;
}
.track-meta {
  font-size: 9px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 13px;
  line-height: 1.4;
}
.track-meta .meta-label { color: rgba(255,255,255,0.3); }
.track-meta .meta-artist { color: rgba(0,255,65,0.65); }
.track-meta .meta-tag {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 0 4px;
}
.player-controls { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 6px; -webkit-flex-wrap: nowrap; flex-wrap: nowrap; }
.player-controls button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  flex-shrink: 0;
}
.player-controls button:active { opacity: 0.6; }
.player-time { font-size: 9px; color: rgba(255,255,255,0.4); white-space: nowrap; flex-shrink: 0; }
.player-seek {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  outline: none;
  cursor: pointer;
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(255,255,255,0.7);
}

/* HEAD icon buttons */
.head-icon-btn {
  width: 58px; height: 58px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
}
.head-icon-btn:active { background: rgba(255,255,255,0.22); }
.menu-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.1em;
  padding: 0 10px;
  height: 38px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
}
.menu-btn:active { background: rgba(255,255,255,0.22); }
.ia-pulse-btn { -webkit-animation: ia-pulse 1.6s ease-in-out infinite; animation: ia-pulse 1.6s ease-in-out infinite; }
.ia-pulse-btn:active { -webkit-animation: none; animation: none; }

/* Menu modal */
@-webkit-keyframes menu-fadein {
  from { opacity: 0; -webkit-transform: translateY(-20px); }
  to   { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes menu-fadein {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Search modal */
.search-modal-box {
  background: rgba(10,10,10,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 24px 20px;
  width: 88%;
  max-width: 420px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 14px;
  -webkit-animation: search-fadein 0.25s ease forwards;
  animation: search-fadein 0.25s ease forwards;
}
@-webkit-keyframes search-fadein {
  from { opacity:0; -webkit-transform: scale(0.85); }
  to   { opacity:1; -webkit-transform: scale(1); }
}
@keyframes search-fadein {
  from { opacity:0; transform: scale(0.85); }
  to   { opacity:1; transform: scale(1); }
}
.search-modal-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  text-align: center;
}
.search-modal-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  min-width: 0;
}
.search-modal-input::-webkit-input-placeholder { color: rgba(255,255,255,0.3); }
.search-modal-btn {
  width: 42px; height: 42px;
  background: #8b0000;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.search-modal-btn:active { background: #a00000; }

/* FEET */
.player-feet { display: none; }
