/* player.css */
.player-wrapper {
  position: relative;

  /* Fixed sizing constraints to fit visual player.png exactly */
  width: 450px;
  height: 767px;
  flex: 0 0 450px;
  max-width: 450px;
  max-height: 767px;
  overflow: hidden;

  /* Visual housing body style resetting */
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;

  /* Layout transitions */
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The visual chassis body of the music player */
.player-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

/* Header inside player screen - hidden visually for clean visual layout (safely kept in DOM for JS) */
.player-header {
  display: none !important;
}

/* Screen container - perfectly fitted over top white screen of visual player.png */
.player-screen {
  position: absolute;
  top: 5.1%;
  left: 9.6%;
  width: 80.8%;
  height: 33.2%;
  /* Same background as page body — glassy blue */
  background-image: url("/images/ui/background-blue-glass.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border: none;
  border-radius: 34px;
  padding: 28px 14px 18px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
  box-sizing: border-box;
}
/* Radio folder: allow touch/scroll for station list */
.player-screen.radio-list-scroll {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
}

.player-screen.radio-list-scroll::-webkit-scrollbar {
	width: 3px;
}

.player-screen.radio-list-scroll::-webkit-scrollbar-thumb {
	background: rgba(61, 127, 193, 0.25);
	border-radius: 10px;
}

.player-screen.radio-list-scroll::-webkit-scrollbar-track {
	background: transparent;
}


/* Status bar — date left, time center, battery right — overlays top of screen */
.player-status-bar {
  position: absolute;
  top: 5.5%;
  left: 9.6%;
  width: 80.8%;
  height: 22px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  pointer-events: none;
}

.player-status-date,
.player-status-time {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--music-blue);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.player-status-time {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.player-status-battery {
  height: 13px;
  width: auto;
  display: block;
  image-rendering: auto;
}

.screen-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  color: var(--music-blue);
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  user-select: none;
}

/* Visual cue for hover / selected */
.screen-item.selected {
  background-color: rgba(255, 255, 255, 0.45);
  border-color: rgba(61, 127, 193, 0.6);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(61, 127, 193, 0.18);
  transform: scale(1.01);
}

/* Folder icon using real image asset */
.item-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background-image: url("/images/ui/folder-icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  font-size: 0;       /* hide emoji fallback text */
  line-height: 1;
}

/* For non-folder icons (track, review, info, radio-station) keep emoji or image */
.screen-item[data-type="track"] .item-icon,
.screen-item[data-type="review"] .item-icon,
.screen-item[data-type="info"] .item-icon,
.screen-item[data-type="radio-station"] .item-icon {
  background-image: none;
  font-size: 1.1rem;
}

.station-item-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Active/selected folder: CSS highlight instead of separate asset */
.screen-item.selected .item-icon[data-folder="true"] {
  filter: drop-shadow(0 0 4px rgba(61, 127, 193, 0.7));
  transform: scale(1.08);
  outline: 1.5px solid rgba(61, 127, 193, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

.item-name {
  flex-grow: 1;
}

.track-cover-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.artist-bio-item-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.article-cover-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.item-icon[data-article-cover="true"] {
  background-image: none;
}

.screen-item.selected .item-icon[data-article-cover="true"] {
  outline: 1.5px solid rgba(61, 127, 193, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Override folder background for artist-bio and artist-item */
.screen-item[data-type="artist-bio"] .item-icon,
.screen-item[data-type="artist-item"] .item-icon {
  background-image: none;
  font-size: 1.1rem;
}

/* Controller / Buttons D-pad overlay on the physical wheel image */
.player-controls {
  position: absolute;
  left: 12.5%;
  top: 51.2%;
  width: 75%;
  height: 43.5%;
  z-index: 20;
  box-sizing: border-box;
}

/* Click-wheel buttons configured as 100% transparent visual hit-zones */
.control-btn {
  position: absolute;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  cursor: pointer;
  pointer-events: auto;
  outline: none !important;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* Ensure hit-zones remain completely invisible during all interactive states */
.control-btn:hover,
.control-btn:focus,
.control-btn:active {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Top button - HOME */
/* Сделан таким же по размеру, как BACK */
.control-btn[data-action="home"] {
  position: absolute;
  left: 31%;
  top: 0.5%;
  width: 38%;
  height: 18%;
  border-radius: 28px;
  z-index: 8;
}

/* Left button - UP */
/* Ниже и шире примерно на 20% */
.control-btn[data-action="up"] {
  position: absolute;
  left: -3%;
  top: 37%;
  width: 34%;
  height: 25%;
  border-radius: 32px;
  z-index: 8;
}

/* Central circular button - OK */
/* Ниже и шире примерно на 20% */
.control-btn[data-action="ok"] {
  position: absolute;
  left: 27.5%;
  top: 28.5%;
  width: 45%;
  height: 45%;
  border-radius: 50%;
  z-index: 12;
}

/* Right button - DOWN */
/* Ниже и шире примерно на 20% */
.control-btn[data-action="down"] {
  position: absolute;
  right: -3%;
  top: 37%;
  width: 34%;
  height: 25%;
  border-radius: 32px;
  z-index: 8;
}

/* Bottom button - BACK */
.control-btn[data-action="back"] {
  position: absolute;
  left: 31%;
  bottom: 0.5%;
  width: 38%;
  height: 18%;
  border-radius: 28px;
  z-index: 8;
}


/* Extra controls container layer */
.extra-controls {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 21;
  pointer-events: none;
}

.extra-controls button {
  pointer-events: auto;
}

/* Extra control buttons (RU, EN, volume-down, volume-up) */
button[data-action="lang-ru"] {
  position: absolute;
  left: 8.5%;
  top: 39.8%;
  width: 10.5%;
  height: 6.5%;
  border-radius: 50%;
}

button[data-action="lang-en"] {
  position: absolute;
  left: 24.8%;
  top: 39.8%;
  width: 10.5%;
  height: 6.5%;
  border-radius: 50%;
}

button[data-action="volume-down"] {
  position: absolute;
  right: 24.8%;
  top: 39.8%;
  width: 10.5%;
  height: 6.5%;
  border-radius: 50%;
}

button[data-action="volume-up"] {
  position: absolute;
  right: 8.5%;
  top: 39.8%;
  width: 10.5%;
  height: 6.5%;
  border-radius: 50%;
}

/* Small active scale click feedback to feel highly touch-responsive */
.control-btn:active {
  transform: scale(0.98);
}

.control-btn[data-action="ok"]:active {
  transform: scale(0.95);
}

/* Временный активный debug-режим для отображения hit-зон */
.player-wrapper.debug-hit-zones .control-btn {
  opacity: 1 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border: 2px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35) !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.player-wrapper.debug-hit-zones button[data-action="home"] {
  background: rgba(255, 220, 0, 0.35) !important;
}

.player-wrapper.debug-hit-zones button[data-action="up"] {
  background: rgba(255, 0, 180, 0.35) !important;
}

.player-wrapper.debug-hit-zones button[data-action="ok"] {
  background: rgba(0, 255, 120, 0.35) !important;
}

.player-wrapper.debug-hit-zones button[data-action="down"] {
  background: rgba(0, 140, 255, 0.35) !important;
}

.player-wrapper.debug-hit-zones button[data-action="back"] {
  background: rgba(255, 40, 40, 0.35) !important;
}

.player-wrapper.debug-hit-zones button[data-action="lang-ru"] {
  background: rgba(255, 120, 120, 0.45) !important;
}

.player-wrapper.debug-hit-zones button[data-action="lang-en"] {
  background: rgba(255, 180, 80, 0.45) !important;
}

.player-wrapper.debug-hit-zones button[data-action="volume-down"] {
  background: rgba(180, 120, 255, 0.45) !important;
}

.player-wrapper.debug-hit-zones button[data-action="volume-up"] {
  background: rgba(120, 255, 220, 0.45) !important;
}

/* Скрытие текстовых подписей кнопок в обычном режиме */
.player-wrapper:not(.debug-hit-zones) .control-btn {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.player-wrapper:not(.debug-hit-zones) .control-btn:hover,
.player-wrapper:not(.debug-hit-zones) .control-btn:focus,
.player-wrapper:not(.debug-hit-zones) .control-btn:active {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ─── VOLUME INDICATOR ────────────────────────────────────────────────────── */

.player-volume-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}

.player-volume-indicator::before,
.player-volume-indicator::after {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--music-blue);
  line-height: 1;
}

.player-volume-indicator::before {
  content: '−';
  margin-right: 2px;
}

.player-volume-indicator::after {
  content: '+';
  margin-left: 2px;
}

.player-volume-indicator.visible {
  opacity: 1;
}

.volume-segment {
  width: 5px;
  height: 3px;
  border-radius: 2px;
  background: rgba(42, 90, 140, 0.18);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.volume-segment.active {
  background: var(--music-blue);
  box-shadow: 0 0 5px rgba(42, 90, 140, 0.45);
}

/* ── News Article ─────────────────────────────────────────────────────────── */

.news-article {
  padding: 0;
  max-width: none;
  margin: 0;
  color: inherit;
}

/* ── Title — matches .article-title ─────────────────────────────────── */
.news-article-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--music-blue);
  margin: 0 0 10px;
}

/* ── Excerpt — blue accent, bold, like a strong subheading ────────── */
.news-article-excerpt {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: #3d7fc1;
  margin-bottom: 24px;
}

/* ── Cover — full width inside content block ────────────────────────── */
.news-article-cover {
  width: 100%;
  margin: 24px 0;
}

.news-article-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: 10px;
}

/* ── Body — matches .article-paragraph ──────────────────────────────── */
.news-article-body {
  font-family: var(--font-body);
  font-size: 0.97rem;
  line-height: 1.72;
  color: #2c3e50;
  margin-bottom: 28px;
}

.news-article-body p {
  margin-bottom: 14px;
  text-align: justify;
  max-width: 66ch;
}

.news-article-body p:last-child {
  margin-bottom: 0;
}

/* ── Meta block ─────────────────────────────────────────────────────── */
.news-article-meta {
  padding-top: 16px;
  border-top: 1px solid rgba(61, 127, 193, 0.15);
}

/* ── Date ───────────────────────────────────────────────────────────── */
.news-article-date {
  font-size: 12px;
  color: rgba(42, 90, 140, 0.55);
  margin-bottom: 8px;
}

/* ── Source ─────────────────────────────────────────────────────────── */
.news-article-source {
  font-size: 12px;
  color: rgba(42, 90, 140, 0.5);
}

.news-article-source a {
  color: var(--music-blue);
  text-decoration: none;
}

.news-article-source a:hover {
  text-decoration: underline;
}