/* ============================================
   NoiseFM Theme Styles
   Based on Figma: Noisefm design
   Font: Montserrat (Google Fonts)
   Palette: Black bg, White text, Glassmorphism
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #fff;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    outline: none;
}

ul, ol {
    list-style: none;
}

/* --- Background --- */
.nfm-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.nfm-bg__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.nfm-bg__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* --- Main Layout --- */
.nfm-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header / Navigation --- */
.nfm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 54px;
    pointer-events: none;
}

.nfm-header > * {
    pointer-events: auto;
}

.nfm-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nfm-logo img {
    width: 84px;
    height: 64px;
}

.nfm-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfm-nav__left {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.nfm-nav__right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nfm-nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.nfm-nav__item:hover {
    opacity: 0.7;
}

.nfm-nav__item img,
.nfm-nav__item svg {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.nfm-nav__link {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Header layout: logo left, nav items center-right */
.nfm-header__inner {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.nfm-header__nav-center {
    display: flex;
    align-items: center;
    gap: 33px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nfm-header__nav-right {
    display: flex;
    align-items: center;
    gap: 33px;
    margin-left: auto;
}

/* --- Hamburger (Mobile) --- */
.nfm-hamburger {
    display: none;
    width: 39px;
    height: 30px;
    position: relative;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.nfm-hamburger span {
    position: absolute;
    display: block;
    width: 100%;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
    left: 0;
}

.nfm-hamburger span:nth-child(1) {
    top: 0;
}

.nfm-hamburger span:nth-child(2) {
    top: 13px;
}

.nfm-hamburger span:nth-child(3) {
    top: 26px;
}

.nfm-hamburger span:last-child {
    width: 70%;
    left: auto;
    right: 0;
}

.nfm-hamburger.is-active span:first-child {
    transform: translateY(13px) rotate(45deg);
}

.nfm-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.nfm-hamburger.is-active span:last-child {
    width: 100%;
    transform: translateY(-13px) rotate(-45deg);
}

/* --- Mobile Menu Overlay --- */
.nfm-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-direction: column;
    padding: 120px 18px 40px;
    overflow-y: auto;
}

.nfm-mobile-menu.is-open {
    display: flex;
}

.nfm-mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nfm-mobile-menu__item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    padding: 8px 0;
}

.nfm-mobile-menu__item img,
.nfm-mobile-menu__item svg {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.nfm-mobile-menu__links {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nfm-mobile-menu__link {
    font-weight: 400;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.nfm-mobile-menu__footer {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding-bottom: 20px;
}

.nfm-mobile-menu__footer .nfm-footer__socials,
.nfm-mobile-menu__footer .nfm-footer__partners,
.nfm-mobile-menu__footer .nfm-footer__badges {
    justify-content: center;
    width: 100%;
}

.nfm-mobile-menu__footer .nfm-footer__copyright {
    text-align: center;
    width: 100%;
}

/* --- Vinyl / Central Play Button --- */
.nfm-vinyl {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    width: 240px;
    height: 240px;
    z-index: 10;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.nfm-vinyl__disc {
    width: 100%;
    height: 100%;
    transition: filter 0.2s;
}

.nfm-vinyl:hover .nfm-vinyl__disc {
    filter: brightness(1.15);
}

.nfm-vinyl.is-playing .nfm-vinyl__disc {
    animation: nfm-spin 8s linear infinite;
}

.nfm-vinyl.is-paused .nfm-vinyl__disc {
    animation-play-state: paused;
}

.nfm-vinyl__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 146px;
    height: 146px;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.15s;
}

.nfm-vinyl:hover .nfm-vinyl__overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.nfm-vinyl.is-playing:hover .nfm-vinyl__overlay {
    opacity: 0.8;
}

.nfm-vinyl__icon-play,
.nfm-vinyl__icon-pause {
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes nfm-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Player --- */
.nfm-player {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9;
    width: 760px;
    max-width: calc(100% - 36px);
}

.nfm-player__container {
    display: flex;
    align-items: stretch;
    height: 157px;
    border-radius: 0;
    overflow: hidden;
}

/* Cover */
.nfm-player__cover {
    flex-shrink: 0;
    width: 157px;
    height: 157px;
    border-radius: 40px;
    overflow: hidden;
    background: linear-gradient(108.61deg, rgba(102, 102, 102, 0.4) 0%, rgba(0, 0, 0, 0.4) 99.97%);
    padding: 8px;
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
}

.nfm-player__cover-img {
    width: 100%;
    height: 100%;
    border-radius: 33px;
    object-fit: cover;
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
}

/* Player body (right side) */
.nfm-player__body {
    position: relative;
    flex: 1;
    background: linear-gradient(97.47deg, rgba(102, 102, 102, 0.4) -16.09%, rgba(0, 0, 0, 0.4) 94.36%);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 38px 26px;
	border-radius: 30px;
    min-width: 0;
    overflow: hidden;
}

.nfm-player__spectrogram {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    filter: blur(12.5px);
    opacity: 0.6;
}

/* Track info */
.nfm-player__track {
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls row */
.nfm-player__controls {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: space-between;
}

/* Play/Pause + Prev/Next group */
.nfm-player__playback {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nfm-player__playback img,
.nfm-player__playback svg {
    width: 20px;
    height: 20px;
}

/* Volume section */
.nfm-player__volume {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    max-width: 180px;
    margin-left: 20px;
}

body.nfm-is-mobile .nfm-player__volume {
    display: none !important;
}

.nfm-player__volume-icon {
    flex-shrink: 0;
    width: 13px;
    height: 12px;
    cursor: pointer;
}

.nfm-player__volume-bar {
    position: relative;
    flex: 1;
    height: 4px;
    background: #D9D9D9;
    border-radius: 40px;
    cursor: pointer;
}

.nfm-player__volume-fill {
    height: 100%;
    background: #fff;
    border-radius: 40px;
    width: 80%;
    pointer-events: none;
}

.nfm-player__volume-knob {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: grab;
    left: 80%;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.nfm-player__volume-knob:active {
    cursor: grabbing;
}

.nfm-player__volume-label {
    font-weight: 700;
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Actions: "Слушать в плеере" / "Поддержать проект" */
.nfm-player__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.nfm-player__action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nfm-player__action:hover {
    opacity: 0.7;
}

.nfm-player__action img,
.nfm-player__action svg {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

/* Like/Dislike buttons */
.nfm-player__likes {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nfm-player__like-btn,
.nfm-player__dislike-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    opacity: 0.5;
}

.nfm-player__like-btn:hover,
.nfm-player__dislike-btn:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.nfm-player__like-btn.is-active,
.nfm-player__dislike-btn.is-active {
    opacity: 1;
}

.nfm-player__like-btn svg,
.nfm-player__dislike-btn svg {
    width: 100%;
    height: 100%;
    fill: #fff;
}

.nfm-player__likes.is-hidden {
    display: none;
}

/* (play/pause button moved to vinyl) */

/* --- Content Area (for SPA pages) --- */
.nfm-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
    display: none;
    overflow-y: auto;
}

.nfm-content.is-visible {
    display: block;
}

.nfm-content__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nfm-content__inner {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 137px 54px 100px;
}

/* Title + Close header row */
.nfm-content__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
    padding-right: 50px;
}

.nfm-content__title {
    font-weight: 300;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.nfm-content__close {
    position: fixed;
    top: 137px;
    right: calc(50% - 580px + 54px);
    z-index: 100;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.15s;
    border-radius: 50%;
    padding: 0;
}

.nfm-content__close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.nfm-content__close svg {
    width: 100%;
    height: 100%;
}

.nfm-content__separator {
    height: 1px;
    background: #C0CCCE;
    margin-bottom: 27px;
}

.nfm-content__body {
    font-weight: 300;
    font-size: 20px;
    line-height: 1.95;
    letter-spacing: -0.02em;
}

.nfm-content__body p {
    margin-bottom: 1em;
}

.nfm-content__body a {
    text-decoration: underline;
}

.nfm-content__footer-links {
    display: flex;
    gap: 36px;
    margin-top: 60px;
}

.nfm-content__footer-link {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* --- Footer --- */
.nfm-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 54px 24px;
    pointer-events: none;
}

.nfm-footer > * {
    pointer-events: auto;
    flex: 1;
}

.nfm-footer__socials {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: flex-start;
}

.nfm-footer__partners {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: start;
}

.nfm-footer__badges {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: end;
}

.nfm-footer__socials a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfm-footer__socials img,
.nfm-footer__socials svg {
    height: 22px;
    width: auto;
}

.nfm-footer__partners img {
    height: 31px;
    width: auto;
}

.nfm-footer__badges img {
    height: 46px;
    width: auto;
}

.nfm-footer__copyright {
    font-weight: 600;
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: right;
    opacity: 0.8;
}

/* --- Animations / Transitions --- */
.nfm-fade-in {
    animation: nfmFadeIn 0.4s ease-out;
}

@keyframes nfmFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.nfm-content__inner {
    animation: nfmSlideUp 0.5s ease-out;
}

@keyframes nfmSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Tablet (768px - 1199px) --- */
@media (max-width: 1199px) {
    .nfm-header {
        padding: 32px 20px;
    }

    .nfm-player {
        bottom: 150px;
        width: 100%;
        max-width: calc(100% - 40px);
    }

    .nfm-player__container {
        height: auto;
    }

    .nfm-player__cover {
        width: 111px;
        height: 111px;
        border-radius: 29px;
        padding: 6px;
    }

    .nfm-player__cover-img {
        border-radius: 24px;
    }

    .nfm-player__body {
        padding: 16px 20px;
    }

    .nfm-player__track {
        font-size: 20px;
    }

    .nfm-footer {
        padding: 0 20px 16px;
        flex-wrap: wrap;
        gap: 16px;
    }

    .nfm-footer > * {
        flex: 1 1 calc(50% - 16px);
    }

    .nfm-footer__socials {
        order: 1;
    }

    .nfm-footer__partners {
        order: 3;
        justify-content: flex-start;
    }

    .nfm-footer__badges {
        order: 2;
        justify-content: flex-end;
    }

    .nfm-footer__copyright {
        order: 4;
        text-align: right;
        font-size: 10px;
    }

    .nfm-content__inner {
        padding: 100px 20px 80px;
    }

    .nfm-content__title {
        font-size: 36px;
    }

    .nfm-content__body {
        font-size: 18px;
        line-height: 1.6;
    }

    .nfm-content__close {
        top: 100px;
        right: 20px;
    }

    .nfm-content__header {
        padding-right: 42px;
    }
}

/* --- Mobile (< 768px) --- */
@media (max-width: 767px) {
    .nfm-header {
        padding: 24px 18px;
    }

    .nfm-header__nav-center,
    .nfm-header__nav-right {
        display: none;
    }

    .nfm-hamburger {
        display: block;
        margin-left: auto;
    }

    .nfm-logo img {
        width: 70px;
        height: 53px;
    }

    .nfm-player {
        bottom: 24px;
        left: 18px;
        right: 18px;
        transform: none;
    }

    .nfm-player__container {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }

    .nfm-player__cover {
        display: none;
    }

    .nfm-player__body {
        padding: 16px;
        width: 100%;
    }

    .nfm-player__track {
        font-size: 20px;
        margin-bottom: 12px;
        white-space: normal;
    }

    .nfm-player__controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nfm-player__volume {
        max-width: 100%;
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .nfm-player__actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .nfm-player__action  {
        font-size: 10px;
    }

    #nfm-listen-external.nfm-player__action  {
        display: none;
    }

    .nfm-footer {
        display: none;
    }

    .nfm-content__inner {
        padding: 80px 18px 60px;
    }

    .nfm-content__title {
        font-size: 24px;
    }

    .nfm-content__body {
        font-size: 14px;
        line-height: 1.95;
    }

    .nfm-content__footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .nfm-content__header {
        gap: 12px;
        padding-right: 42px;
    }

    .nfm-content__close {
        top: 80px;
        right: 18px;
    }
}

/* --- Loading state --- */
.nfm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.nfm-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nfmSpin 0.8s linear infinite;
}

@keyframes nfmSpin {
    to { transform: rotate(360deg); }
}

/* --- Scrollbar --- */
.nfm-content::-webkit-scrollbar {
    width: 4px;
}

.nfm-content::-webkit-scrollbar-track {
    background: transparent;
}

.nfm-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

/* --- WordPress content styles --- */
.nfm-content__body h1,
.nfm-content__body h2,
.nfm-content__body h3,
.nfm-content__body h4 {
    font-weight: 300;
    margin: 1.5em 0 0.5em;
}

.nfm-content__body h1 { font-size: 2em; }
.nfm-content__body h2 { font-size: 1.6em; }
.nfm-content__body h3 { font-size: 1.3em; }
.nfm-content__body h4 { font-size: 1.1em; }

.nfm-content__body ul,
.nfm-content__body ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.nfm-content__body ul { list-style: disc; }
.nfm-content__body ol { list-style: decimal; }

.nfm-content__body blockquote {
    border-left: 3px solid rgba(255,255,255,0.3);
    padding-left: 1em;
    margin: 1em 0;
    font-style: italic;
    opacity: 0.8;
}

.nfm-content__body img {
    border-radius: 8px;
    padding: 16px;
}
