:root {
  --bg-page: #2a0606;
  --bg-page-deep: #1a0404;
  --card: #0a0a0c;
  --card-glass: rgba(10, 10, 12, 0.86);
  --cover: #000000;
  --text: #f2f2f4;
  --text-muted: rgba(196, 190, 198, 0.82);
  --rule: rgba(255, 255, 255, 0.07);
  --player-vol-icon: rgba(158, 155, 152, 0.95);
  --player-vol-track-rest: #38363c;
  --border-card: rgba(255, 255, 255, 0.09);
  --radius-card: 16px;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 36px -12px rgba(0, 0, 0, 0.5);
  --shadow-elev: 0 4px 14px rgba(0, 0, 0, 0.22);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, sans-serif;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-page-deep);
  background-image: linear-gradient(
    165deg,
    #3a0e0e 0%,
    var(--bg-page) 42%,
    var(--bg-page-deep) 100%
  );
  font-family: var(--font-ui);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px 40px;
}

@media (max-width: 480px) {
  .page {
    gap: 16px;
    padding: 24px 16px 32px;
  }
}

.page__below {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  padding: 0 4px;
}

.page__below-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: 100%;
  padding: 10px 12px;
  background: #e4e4dc;
  border: 3px solid #0a0a0a;
  border-radius: 0;
  box-shadow: 4px 4px 0 #0a0a0a;
}

.page__visits {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid #0a0a0a;
  min-height: 36px;
  font-size: 0.5625rem;
  font-family: ui-monospace, "Cousine", "Roboto Mono", Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a0a0a;
}

.page__visits::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #0a0a0a;
  flex-shrink: 0;
}

.page__visits-value {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #0a0a0a;
  font-variant-numeric: tabular-nums;
}

.tg-news {
  width: 100%;
  max-width: 360px;
  margin: 0;
  padding: 0 4px;
}

.tg-news__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 12px;
  background: #0a0a0a;
  color: #e4e4dc;
  border: 3px solid #0a0a0a;
  border-bottom: none;
  border-left: 7px solid #8b1a1a;
  font-family: ui-monospace, "Cousine", "Roboto Mono", Consolas, monospace;
  font-size: clamp(0.625rem, 2.8vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.tg-news__head-title {
  white-space: nowrap;
}

.tg-news__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 3px solid #0a0a0a;
  border-top: 4px solid #6e1212;
  border-radius: 0;
  background: #e4e4dc;
  box-shadow: 6px 6px 0 #0a0a0a;
  overflow: hidden;
}

.tg-news__item {
  margin: 0;
  border-bottom: 2px solid #0a0a0a;
}

.tg-news__item:last-child {
  border-bottom: none;
}

.tg-news__item--loading,
.tg-news__item--error {
  margin: 10px;
  padding: 16px 12px;
  font-size: 0.75rem;
  font-family: ui-monospace, "Cousine", "Roboto Mono", Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  text-align: center;
  background: #d0d0c8;
  border: 2px dashed #0a0a0a;
}

.tg-news__link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 14px 12px 10px;
  min-height: 48px;
  box-sizing: border-box;
  font-family: ui-monospace, "Cousine", "Roboto Mono", Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0a0a0a;
  text-decoration: none;
  background: #e4e4dc;
  transition:
    background 0.08s ease,
    color 0.08s ease,
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.tg-news__title-text {
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.tg-news__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(10, 10, 10, 0.14);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: rgba(90, 88, 86, 0.95);
}

.tg-news__time {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.tg-news__views {
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tg-news__list .tg-news__item .tg-news__link:hover .tg-news__meta {
  color: rgba(228, 228, 220, 0.78);
}

.tg-news__link:focus-visible .tg-news__meta {
  color: rgba(60, 58, 56, 0.95);
}

.tg-news__item:nth-child(odd) .tg-news__link {
  background: #e4e4dc;
}

.tg-news__item:nth-child(even) .tg-news__link {
  background: #d8d8d0;
}

.tg-news__list .tg-news__item .tg-news__link:hover {
  background: #0a0a0a;
  color: #e4e4dc;
}

.tg-news__link:active {
  transform: translate(2px, 2px);
}

.tg-news__link:focus-visible {
  outline: 3px solid #0a0a0a;
  outline-offset: -3px;
  background: #fffef8;
  color: #0a0a0a;
}

@media (prefers-reduced-motion: reduce) {
  .tg-news__link {
    transition: none;
  }

  .tg-news__link:active {
    transform: none;
  }
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #0a0a0a;
  border-radius: 0;
  background: #fff;
  color: #0a0a0a;
  text-decoration: none;
  box-shadow: 2px 2px 0 #0a0a0a;
}

.social__link:hover {
  background: #0a0a0a;
  color: #e4e4dc;
}

.social__icon {
  display: block;
}

.social__link--ok {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.social__ok-mark {
  display: block;
  line-height: 1;
}

.player {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-card);
  background: var(--card-glass);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  overflow: hidden;
}

.player__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cover);
}

.player__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player__bottom {
  padding: var(--s-4) var(--s-4) var(--s-5);
  background: linear-gradient(180deg, rgba(12, 12, 14, 0.92) 0%, var(--card) 100%);
}

.player__bottom--quiet .player__meta {
  opacity: 0.72;
}

.player__meta {
  text-align: left;
  transition: opacity 0.2s ease;
}

.player__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.player__artist {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
}

.player__rule {
  margin: var(--s-4) 0;
  border: none;
  border-top: 1px solid var(--rule);
}

.player__controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  margin-top: 14px;
}

.player__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.15s ease,
    opacity 0.15s ease,
    transform 0.08s ease;
}

.player__btn:active {
  transform: scale(0.96);
}

/* Одно состояние = одна видимая иконка (атрибут hidden на <svg> не всегда срабатывает) */
.player__btn--play .player__icon,
.player__btn--mute .player__icon {
  display: block;
}

.player__btn--play .player__icon--hidden,
.player__btn--mute .player__icon--hidden {
  display: none !important;
}

.player__btn--play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: 22px;
  color: #fff;
}

.player__btn--play:hover {
  opacity: 0.92;
}

.player__btn--mute {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  color: var(--player-vol-icon);
}

.player__btn--mute:hover {
  color: rgba(190, 187, 184, 0.98);
}

.player__btn--mute.is-quiet {
  color: rgba(130, 127, 124, 0.88);
}

.player__volume-wrap {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 0;
}

.player__volume {
  --volume-pct: 0%;
  --vol-fill: #ffffff;
  --vol-rest: var(--player-vol-track-rest);
  display: block;
  width: 100%;
  height: 14px;
  appearance: none;
  border-radius: 999px;
  accent-color: #fff;
  background-image: linear-gradient(
    to right,
    var(--vol-fill) 0,
    var(--vol-fill) var(--volume-pct),
    var(--vol-rest) var(--volume-pct),
    var(--vol-rest) 100%
  );
  cursor: pointer;
}

.player__volume::-webkit-slider-runnable-track {
  height: 11px;
  border-radius: 999px;
  background: transparent;
}

.player__volume::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  border: none;
}

.player__volume::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
