html {
    overflow-y: scroll;
}

.main-container:has(.catalog-page) {
    padding-top: calc(var(--header-height) + var(--space-4));
    padding-left: var(--space-5);
    padding-right: var(--space-5);
    padding-bottom: var(--space-5);
}

@media (max-width: 768px) {
    .main-container:has(.catalog-page) {
        padding-top: var(--top-nav-clearance, calc(var(--header-height) + var(--space-4)));
        padding-left: var(--space-4);
        padding-right: var(--space-4);
        padding-bottom: var(--bottom-nav-clearance, var(--space-4));
    }
}

.product-type-filters-wrapper {
    display: block;
    width: 100%;
    max-width: 1082px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16px;
    padding-top: 0;
    padding-left: 30px;
    padding-right: 12px;
    box-sizing: border-box;
}

.product-type-filters-wrapper .category-filters {
    padding-left: 0;
    margin-left: 0;
}

.category-filters-wrapper {
    display: block;
    width: 100%;
    max-width: 1082px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    padding-top: 0;
    padding-left: 30px;
    padding-right: 12px;
    box-sizing: border-box;
}
.category-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    margin-left: 0;
    margin-right: 0;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 1082px;
    box-sizing: border-box;
    padding-left: 0; 
}
.category-filters::-webkit-scrollbar {
    display: none;
}
.category-btn {
  padding: 7px 18px;
  border: none;
  background: var(--card);
  font-family: inherit;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(.4,0,.2,1);
  color: var(--text-secondary);
  white-space: nowrap;
  outline: none;
  margin-bottom: 2px;
}
.category-btn.selected {
    background: var(--bg-secondary);
    color: var(--text);
    font-weight: 500;
}
.category-btn:hover:not(.selected) {
    background: var(--card-secondary);
    color: var(--text-secondary);
}

.catalog-type-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 14px;
    padding: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text) 6%, var(--bg));
}

.catalog-type-switcher--sidebar {
    display: flex;
    width: 100%;
    margin: 0;
}

.catalog-type-switcher--sidebar .catalog-type-btn {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    position: relative;
}

.catalog-type-switcher--sidebar .catalog-type-btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.catalog-type-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.catalog-type-btn:hover {
    color: var(--text);
}

.catalog-type-btn.active {
    color: var(--text);
    background: var(--card);
}

.catalog-page {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 0 var(--space-10);
    box-sizing: border-box;
}

.catalog-sidebar {
    position: sticky;
    top: calc(var(--header-height, 52px) + var(--space-3));
    align-self: start;
    max-height: calc(100vh - var(--header-height, 52px) - var(--space-6));
    overflow-y: auto;
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    background: var(--fill-elevated);
    border: none;
    box-shadow: none;
}

.catalog-main {
    min-width: 0;
    align-self: start;
}

.catalog-filters {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.catalog-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.catalog-filter-group label,
.catalog-filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.catalog-filter-group input[type="search"],
.catalog-filter-group input[type="text"],
.catalog-filter-group input[type="number"],
.catalog-filter-group select {
    width: 100%;
    padding: 9px 11px;
    border: none;
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg) 72%, var(--card));
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.catalog-genre-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.catalog-genre-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.catalog-genre-option input {
    accent-color: var(--text);
}

.catalog-bpm-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-bpm-inputs input {
    flex: 1;
    min-width: 0;
}

.catalog-bpm-inputs span {
    color: var(--text-muted);
}

.catalog-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.catalog-filter-reset {
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 0;
}

.catalog-filter-reset:hover {
    color: var(--text);
}

.catalog-sidebar__head {
    display: none;
}

.catalog-mobile-toolbar {
    display: none;
}

.catalog-sidebar-backdrop {
    display: none;
}

.catalog-main {
    min-width: 0;
    align-self: start;
}

@media (max-width: 1100px) {
    .catalog-page {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        padding-bottom: var(--space-10);
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .catalog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .catalog-mobile-toolbar {
        display: flex;
        align-items: center;
        margin-bottom: var(--space-3);
    }

    .catalog-filters-open {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 0 14px;
        border: none;
        border-radius: 999px;
        background: var(--fill-elevated, #2c2c2e);
        color: var(--label-primary, var(--text));
        font: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .catalog-filters-open [data-lucide],
    .catalog-filters-open svg.lucide {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .catalog-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 300;
        border: none;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.42);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 260ms ease, visibility 260ms ease;
    }

    body.catalog-sidebar-open .catalog-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .catalog-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 310;
        width: min(320px, 88vw);
        max-height: none;
        margin: 0;
        padding:
            calc(env(safe-area-inset-top, 0px) + var(--space-3))
            var(--space-4)
            calc(env(safe-area-inset-bottom, 0px) + var(--space-4));
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-105%);
        visibility: hidden;
        transition:
            transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
            visibility 320ms ease;
        will-change: transform;
    }

    body.catalog-sidebar-open .catalog-sidebar {
        transform: translateX(0);
        visibility: visible;
    }

    body.catalog-sidebar-open {
        overflow: hidden;
    }

    .catalog-sidebar__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-3);
        margin-bottom: var(--space-4);
        padding-bottom: var(--space-3);
        border-bottom: 0.33px solid color-mix(in srgb, var(--text) 10%, transparent);
    }

    .catalog-sidebar__title {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--label-primary, var(--text));
    }

    .catalog-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 999px;
        background: color-mix(in srgb, var(--text) 8%, transparent);
        color: var(--label-primary, var(--text));
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .catalog-sidebar-close [data-lucide],
    .catalog-sidebar-close svg.lucide {
        width: 20px;
        height: 20px;
    }
}
@media (max-width: 1100px) {
    .category-filters-wrapper, .category-filters, .beats-grid {
        max-width: 100vw;
    }
}
@media (max-width: 768px) {
    .product-type-filters-wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }
    .category-filters-wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }
    .category-filters {
        max-width: 100vw;
    }
}
.filters-form {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
    align-items: center;
}
.filters-form select, .filters-form input {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9em;
    background: var(--card);
    color: var(--text);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.filters-form .bpm-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filters-form .bpm-inputs input {
    width: 60px;
}
.filters-form button {
  padding: 8px 24px;
  border: none;
  background-color: var(--button-primary-bg);
  color: var(--button-primary-text);
  font-family: inherit;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.beats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
    justify-content: start;
    margin-top: 0;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    padding: 0;
}

.beats-grid > .beat-card {
    padding: 0;
}

.beat-card {
    border: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    font-family: var(--font-family);
    opacity: 1;
    transform: none;
    animation: none;
    margin: 0 !important;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    background: transparent;
    box-shadow: none !important;
}

.beat-card-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
    margin: 0;
}
.beat-card.visible {
    opacity: 1;
    transform: translateY(0);
    
}
@keyframes beat-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.beat-card:hover {
    border-color: var(--border-hover);
}

.post-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-card-avatar {
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.post-card-author {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.post-card-text-link {
    text-decoration: none;
}

.post-card-text {
    margin: 0;
    color: var(--text);
    line-height: 1.4;
    white-space: pre-wrap;
}

.post-card-image-wrap {
    display: block;
}

.post-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.posts-feed {
    width: 100%;
    max-width: 760px;
    margin: 0 auto var(--space-10);
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.home-post-composer-wrap {
    margin-bottom: var(--space-4);
}

.home-post-composer {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.home-post-main-input textarea {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    resize: vertical;
    min-height: 80px;
    padding: 8px;
}

.home-post-main-input textarea:focus {
    outline: none;
}

.home-post-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.post-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.post-pill-btn {
  border: 1px solid var(--border);
  background: var(--text-secondary);
  color: var(--fill-elevated);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}

.post-pill-btn.is-secondary {
    background: var(--bg-secondary);
    color: var(--text);
}

.home-post-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.home-post-attachments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.home-post-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.home-post-field {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px;
}

.home-post-field select,
.home-post-field input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.home-post-field select {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    padding: 8px 10px;
}

.home-post-beat-search,
.profile-post-beat-search {
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text);
    padding: 8px 10px;
}

.posts-feed-list {
    display: grid;
    gap: var(--space-4);
}

.post-feed-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-sizing: border-box;
    overflow-x: hidden;
}

.post-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.post-feed-author-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.post-feed-avatar {
    border-radius: 999px;
    object-fit: cover;
}

.post-feed-author-meta {
    display: grid;
    gap: 2px;
}

.post-feed-author-name {
    color: var(--text);
    font-size: 0.92rem;
}

.post-feed-date {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.post-feed-owner-actions {
    display: inline-flex;
    gap: 6px;
}

.post-feed-text {
    margin: 10px 0 8px;
    white-space: pre-wrap;
    color: var(--text);
    word-break: break-word;
}

.post-feed-text-link {
    color: inherit;
    text-decoration: none;
}

.post-feed-image,
.post-feed-image-link {
    width: 100%;
}

.post-feed-image {
    max-height: 440px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.post-feed-audio-wrap {
    margin-top: 10px;
}

.post-feed-audio {
    width: 100%;
}

.post-attached-beat-card {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.post-attached-beat-cover-wrap {
    position: relative;
    display: block;
    min-height: 160px;
}

.post-attached-beat-cover {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    display: block;
}

.post-attached-beat-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--fill-elevated);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.post-attached-beat-main {
    padding: 12px 14px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
}

.post-attached-beat-title {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.post-attached-beat-owner {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.post-attached-beat-wave {
    display: grid;
    grid-template-columns: repeat(40, minmax(0, 1fr));
    gap: 2px;
    align-items: end;
    min-height: 46px;
}

.post-attached-beat-wave span {
    display: block;
    background: var(--border);
    border-radius: 3px;
    min-height: 8px;
}

.post-attached-beat-wave span:nth-child(2n) { min-height: 14px; }
.post-attached-beat-wave span:nth-child(3n) { min-height: 20px; }
.post-attached-beat-wave span:nth-child(5n) { min-height: 26px; }
.post-attached-beat-wave span:nth-child(7n) { min-height: 16px; }

.post-attached-beat-card.is-playing .post-attached-beat-wave span {
    background: color-mix(in srgb, var(--brand, #ff5500) 52%, var(--border) 48%);
    animation: postWavePulse 1.15s ease-in-out infinite;
}

.post-attached-beat-card.is-playing .post-attached-beat-wave span:nth-child(2n) { animation-delay: .08s; }
.post-attached-beat-card.is-playing .post-attached-beat-wave span:nth-child(3n) { animation-delay: .16s; }
.post-attached-beat-card.is-playing .post-attached-beat-wave span:nth-child(5n) { animation-delay: .24s; }

.post-attached-beat-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-attached-beat-price {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 13px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    min-width: 108px;
    text-align: center;
}

.post-attached-beat-mini-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.post-attached-beat-audio {
    display: none;
}

@keyframes postWavePulse {
    0%, 100% { transform: scaleY(0.86); opacity: .82; }
    50% { transform: scaleY(1.08); opacity: 1; }
}

.post-feed-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-action-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
}

.post-action-btn.active {
    color: #e64980;
}

.post-action-views {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-comments-thread {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.post-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: end;
}

.post-comment-form[hidden],
.post-reply-form[hidden],
.post-comments-thread[hidden] {
    display: none !important;
}

.post-reply-form {
    margin-top: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: end;
}

.post-comment-form textarea,
.post-reply-form textarea,
.post-edit-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text);
    padding: 8px 10px;
    box-sizing: border-box;
    max-width: 100%;
}

.post-comment-form .post-pill-btn,
.post-reply-form .post-pill-btn {
    justify-self: end;
    align-self: end;
    padding: 5px 11px;
    font-size: 0.78rem;
    line-height: 1;
    min-height: 28px;
}

.post-comments-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.post-comment-item {
    font-size: 0.88rem;
    position: relative;
    padding-right: 76px;
}

.post-comment-replies {
    margin-top: 6px;
    margin-left: 18px;
    border-left: 1px solid var(--border);
    padding-left: 10px;
    display: grid;
    gap: 6px;
}

.post-comment-item.is-reply {
    opacity: 0.95;
}

.post-comment-author {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    margin-right: 6px;
}

.post-comment-text {
    color: var(--text-muted);
}

.post-reply-toggle-btn {
  position: absolute;
  right: 0;
  top: 0;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 3px 9px;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}

.post-reply-toggle-btn:hover {
    color: var(--text);
    border-color: var(--text-secondary);
}

.post-load-more-comments {
    margin-top: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
}

.mentions-dropdown {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.mentions-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 9px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mentions-item:hover {
    background: var(--bg-secondary);
}

.mentions-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex: 0 0 28px;
}

.mentions-avatar-placeholder {
    display: inline-block;
    background: var(--bg-secondary);
}

.mentions-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mentions-username {
    color: var(--text);
    font-size: 0.88rem;
}

.mentions-nickname {
    color: var(--text-muted);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-edit-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .home-post-attachments-grid {
        grid-template-columns: 1fr;
    }

    .post-attached-beat-card {
        grid-template-columns: 1fr;
    }

    .post-attached-beat-cover-wrap,
    .post-attached-beat-cover {
        min-height: 180px;
    }
}
.beat-cover {
    position: relative;
}
.beat-cover .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, #000000 55%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.beat-cover .play-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.beat-cover .play-button .material-symbols-outlined,
.beat-cover .play-button .bi.play-button-icon,
.beat-cover .play-button svg.lucide.play-button-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.beat-card .beat-cover img {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    object-fit: cover;
    border-radius: 18px;
    background: var(--bg-secondary);
    display: block;
    border: none;
    transition: border-color 0.25s ease;
}
.beat-info {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.beat-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
}
.beat-title {
    font-size: 0.88em;
    font-weight: 500;
    margin: 0;
    white-space: pre-line;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text);
    text-decoration: none;
    min-height: 2.4em;
    max-height: 2.4em;
    transition: color 0.25s ease;
}
.beat-user {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.88em;
    margin: 0;
    min-height: 24px;
    max-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.beat-card .beat-user-avatar,
.beat-card .beat-user img {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    max-width: 22px;
    max-height: 22px;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    border: none;
    background: var(--bg-secondary);
    box-shadow: 0 1px 4px var(--shadow-color);
}

.beat-user-avatar--placeholder {
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
}

.beat-user-link {
    color: var(--text-muted);
    text-decoration: none;
}

.beat-user-link:hover {
    color: var(--text-secondary);
}

.beat-user-verified {
    font-size: 0.95em;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.beat-info {
    min-height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
}
.beat-title-link {
    flex-shrink: 0;
}
.beat-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.beat-card .price-btn,
.beat-card .favorite-btn,
.beat-card .cart-btn,
.beat-card .icon-btn {
  border: none;
  box-shadow: none;
  outline: none;
}

.price-btn {
    flex-grow: 1;
    flex-shrink: 1;
    padding: 8px 12px;
    background-color: var(--card);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95em;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.25s ease, opacity 0.2s ease;
    height: 36px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.beat-card .price-btn {
    background-color: var(--card);
    color: var(--text);
}

.beat-card .price-btn:hover {
    background-color: color-mix(in srgb, var(--card) 55%, var(--fill-elevated));
    color: var(--text);
    opacity: 1;
}

.price-btn:hover {
    background-color: var(--button-hover-bg);
}
.favorite-btn {
    background: var(--card);
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.2s, background-color 0.2s;
    text-decoration: none;
    color: var(--text);
    box-sizing: border-box;
}
.cart-btn {
    background: var(--card);
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.2s, background-color 0.2s;
    text-decoration: none;
    color: var(--text);
    box-sizing: border-box;
    padding: 0;
}
.favorite-btn:hover,
.cart-btn:hover,
.beat-card .icon-btn:hover {
    background-color: var(--button-hover-bg);
}
.favorite-btn .bi, .favorite-btn svg.lucide,
.cart-btn .bi, .cart-btn svg.lucide,
.beat-card .icon-btn .bi, .beat-card .icon-btn svg.lucide {
    font-size: 1.05rem;
    line-height: 1;
}
.favorite-btn.favorited {
    color: #e54b4b;
}
.favorite-btn.add-to-cart-async,
.cart-btn.add-to-cart-async {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
}

@media (max-width: 1200px) {
    .beats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .beats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .beats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
        gap: var(--space-4);
    }
    html, body { overflow-x: hidden; }
}

.category-filters-wrapper, .category-filters {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in-up 0.7s cubic-bezier(.4,0,.2,1) forwards;
}

.category-filters-wrapper.visible, .category-filters.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.alert-info {
    max-width: 980px;
    margin: 24px auto 0 auto;
    text-align: center;
    font-size: 1.15em;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    color: var(--text);
    opacity: 0;
    transform: translateY(30px);
    animation: beat-fade-in 0.7s cubic-bezier(.4,0,.2,1) forwards;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.alert.alert-info a {
    color: var(--accent-link);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.alert.alert-info a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.alert.alert-info a:active {
    color: var(--accent);
}

html.dark .alert.alert-info a {
    color: #4a9eff;
}

html.dark .alert.alert-info a:hover {
    color: #66b3ff;
}

html.dark .alert.alert-info a:active {
    color: #3399ff;
}

#beat-scroll-status {
    display: block;
    text-align: center;
    margin: 20px auto;
    font-size: 1em;
    color: var(--text-muted);
    font-weight: 500;
    width: 100%;
    transition: color 0.25s ease;
}

.infinite-scroll-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    width: 100%;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.infinite-scroll-loader .material-symbols-outlined {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    filter: blur(4px);
}

img:not(.lazy) {
    opacity: 1;
    filter: blur(0);
}

.user-card {
    background: var(--card) !important;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, background-color 0.25s ease;
    font-family: var(--font-family);
    opacity: 0;
    transform: translateY(30px);
    animation: beat-fade-in 0.7s cubic-bezier(.4,0,.2,1) forwards;
    margin: 0 !important;
    padding: 12px;
    box-sizing: border-box;
}

.user-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.user-card:hover {
    border-color: var(--border-hover);
}

.user-card .beat-cover img {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: block;
    border: 1px solid var(--border);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.beat-card,
.user-card {
  border-color: transparent;
  box-shadow: none !important;
  background: transparent;
}

.filter-panel,
.genre-dropdown,
.sort-dropdown {
  border-color: var(--separator) !important;
  box-shadow: var(--shadow-xs) !important;
  background: var(--fill-elevated);
}

.beat-card:hover,
.user-card:hover {
  border-color: transparent !important;
  box-shadow: none !important;
}
