* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

body {
 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 background: linear-gradient(135deg, #3f58c9 0%, #764ba2 100%);
 min-height: 100vh;
 color: #333;
}

.container {
 max-width: 1200px;
 margin: 0 auto;
 padding: 2rem;
}

header {
 text-align: center;
 margin-bottom: 3rem;
 color: white;
}

header h1 {
 font-size: 3rem;
 font-weight: 700;
 margin-top: 10px;
 margin-bottom: 3px;
 text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

nav {
 display: flex;
 justify-content: center;
 gap: 1rem;
 margin-top: 1rem;
}

nav a {
 color: white;
 text-decoration: none;
 padding: 0.75rem 1.5rem;
 border-radius: 25px;
 transition: all 0.3s ease;
 background: rgba(255, 255, 255, 0.1);
 backdrop-filter: blur(10px);
 border: 1px solid rgba(255, 255, 255, 0.2);
}

nav a:hover,
nav a.active {
 background: rgba(255, 255, 255, 0.2);
 transform: translateY(-2px);
 box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stats-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 2rem;
 margin-top: 2rem;
}

.stats-card {
 background: rgba(255, 255, 255, 0.95);
 border-radius: 20px;
 padding: 1rem;
 box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
 backdrop-filter: blur(10px);
 border: 1px solid rgba(255, 255, 255, 0.2);
 transition: transform 0.3s ease;
}

.stats-card:hover {
 transform: translateY(-5px);
}

.stats-card h2 {
 margin: 0 0 1.5rem 0;
 color: #333;
 font-size: 1.8rem;
 font-weight: 600;
 text-align: center;
 position: relative;
}

.stats-card h2::after {
 content: '';
 position: absolute;
 bottom: -8px;
 left: 50%;
 transform: translateX(-50%);
 width: 60px;
 height: 3px;
 background: linear-gradient(90deg, #667eea, #764ba2);
 border-radius: 2px;
}

.stats-list {
 display: flex;
 flex-direction: column;
 gap: 1rem;
}

.stats-item {
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 border-radius: 15px;
 padding: 1.5rem;
 display: grid;
 grid-template-columns: 40px 1fr auto;
 align-items: center;
 gap: 1.5rem;
 transition: all 0.3s ease;
 border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-item:hover {
 transform: translateX(5px);
 box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
 background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.rank {
 background: linear-gradient(135deg, #667eea, #764ba2);
 color: white;
 width: 50px;
 height: 50px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 1.2rem;
 font-weight: bold;
 box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.title .genres {
    padding-top: 6px;
    font-size: 0.7rem;
}

.title .genres a {
    text-decoration: none;
    background: #88bddb;
    color: white;
    padding: 0 5px 3px 5px;
    border-radius: 6px;
}

.title .genres a:hover {
    background: #667eea;
}


.tite h3 {
    font-weight: 600;
 color: #333;
 font-size: 1.1rem;
}

.count {
 text-align: right;
 color: #666;
 font-size: 0.9rem;
 line-height: 1.4;
}

.count small {
 display: block;
 margin-top: 0.25rem;
 color: #888;
}


.artists-subsection {
 margin-top: 1.5rem;
 padding: 1.5rem;
 background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
 border-radius: 15px;
 border-left: 5px solid #667eea;
 transition: all 0.3s ease;
}

.artists-subsection:hover {
 background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
 box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.artists-subsection h4 {
 margin: 0 0 1rem 0;
 color: #333;
 font-size: 1.1rem;
 font-weight: 600;
 display: flex;
 align-items: center;
 gap: 0.5rem;
}

.artists-subsection h4::before {
 content: '🎵';
 font-size: 1.2rem;
}

.artists-list {
    display: block;
    width: 100%;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    grid-column: 1 / -1;
}

.artists-list-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
}

.artist-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.artist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    transition: transform 0.2s ease;
}

.artist-avatar:hover {
    transform: scale(1.05);
}

.artist-name {
    font-size: 0.85rem;
    line-height: 1.3;
    color: #555;
    font-weight: 500;
    word-wrap: break-word;
    max-width: 100%;
}

.recent-tracks {
    margin-top:6px;
    font-size:13px;
    color:#333;
    grid-column: 1 / -1;
    list-style: inside;
}

.recent-tracks-title {
    font-size:13px;
    color:#333;
}

.recent-tracks li {
    margin-top: 6px;
    margin-bottom: 6px;
}

.recent-tracks .artist-name {
    font-size: 0.85rem;
    line-height: 1.3;
    background-color: #9f9dad;
    color: white !important;
    border-radius: 6px;
    padding: 2px 4px;
    font-weight: 500;
    word-wrap: break-word;
    max-width: 100%;
    margin-right: 3px;
}

.recent-tracks a.artist-name {
    background-color: #6c63a0 !important;
}

.footer {
 text-align: center;
 color: white;
 margin-top: 40px;
 opacity: 0.8;
}

.footer a {
    color: white;
}

.labels-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.labels-table th,
.labels-table td {
    padding: 0.75rem 0.3rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.labels-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.labels-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.08);
}

.labels-table .rank-cell {
    width: 40px;
    font-weight: 600;
    color: #667eea;
    vertical-align: text-top;
}

.labels-table .label-cell a {
    color: #333;
    text-decoration: none;
}

.labels-table .label-cell a:hover {
    color: #667eea;
    text-decoration: underline;
}

.labels-table .count-cell {
    text-align: right;
    color: #666;
}

.labels-table .label-cell {
    vertical-align: top;
    min-width: 160px;
}

.label-name {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}

.label-name a {
    color: #333;
    text-decoration: none;
}

.label-name a:hover {
    color: #667eea;
    text-decoration: underline;
}

.label-genres-wrap {
    margin-top: 0.5rem;
}

.label-numbers {
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: #787878;
}

.label-numbers span {
    color: #333;
}

.label-genres-caption {
    display: block;
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.label-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.label-genre-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.12);
    color: #5a67d8;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.label-genre-tag:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
}

/* Блок исполнителей — визуально отделён от ячеек лейбла */
.labels-table .artists-cell {
    vertical-align: top;
    padding: 0;
    min-width: 280px;
}

.artists-block {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 0.75rem 1rem;
    margin: 0;
}

.artists-block-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #dee2e6;
}

.table-artists-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.table-artist-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

.table-artist-row:last-child {
    border-bottom: none;
}

.table-artist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.table-artist-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.table-artist-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.table-artist-name:hover {
    color: #667eea;
}

.table-artist-name--static {
    font-weight: 500;
    color: #495057;
}

.table-artist-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.table-artist-genre {
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

a.table-artist-genre:hover {
    background: #667eea;
    color: white;
}

.table-artist-listeners {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    text-align: right;
}

.table-artist-listeners-unit {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6c757d;
}

/* Секция «Топ исполнителей по лейблам» (legacy, оставлено для совместимости) */
.label-artists-section {
    margin-top: 2.5rem;
}

.label-artists-heading {
    text-align: center;
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.label-artists-heading i {
    margin-right: 0.5rem;
    opacity: 0.95;
}

.label-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.label-artist-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.label-artist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.label-artist-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.label-artist-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
}

.label-artist-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    word-break: break-word;
}

.label-artists-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.label-artist-item {
    margin: 0;
}

.label-artist-link,
.label-artist-link--static {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease, color 0.2s ease;
}

a.label-artist-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    color: #5a67d8;
}

.label-artist-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

a.label-artist-link:hover .label-artist-avatar {
    border-color: #667eea;
    transform: scale(1.05);
}

.label-artist-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}

@media (max-width: 1024px) {
 .stats-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
 }

 .container {
  padding: 1rem;
 }

 header h1 {
  font-size: 2.5rem;
 }
}

@media (max-width: 768px) {
 .stats-item {
  grid-template-columns: 80px 1fr;
  gap: 1rem;
 }

 .count {
  grid-column: 1 / -1;
  text-align: left;
  margin-top: 0.5rem;
 }

 header h1 {
  font-size: 2rem;
 }

 .stats-card {
  padding: 1rem;
  overflow-x: auto;
 }

 .table-artist-name {
  max-width: 90px;
 }

 .label-artists-grid {
  grid-template-columns: 1fr;
 }

 .label-artists-heading {
  font-size: 1.5rem;
 }
}

@media (max-width: 480px) {
 .container {
  padding: 0.5rem;
 }

 header h1 {
  font-size: 1.8rem;
 }

 .stats-card {
  padding: 1rem;
 }

 .stats-item {
  padding: 1rem;
 }

 .label-artist-card {
  padding: 1rem;
 }

 .label-artist-card-title {
  font-size: 0.95rem;
 }

 .label-artist-avatar {
  width: 80px;
  height: 80px;
 }

 .label-artist-name {
  font-size: 0.85rem;
 }
}