/* Kezdőlap = lejátszó: teljes kép, cím, felirat/szöveg, lejátszás gomb hanghullám-vonalakkal. */

body.home {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.player {
    position: fixed;
    top: var(--header-h);
    bottom: var(--footer-h);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 9vw 1fr 9vw;
    grid-template-rows: minmax(0, 1fr) auto;
}

/* ---------- A kép ---------- */

.stage {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    margin-top: 2vh;
    cursor: pointer;
    transition: opacity 0.4s ease;
    /* a lejátszás közbeni görgetésnél a két szélén lágyan tűnjön el a kép */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.art {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.art svg { display: block; }

/* ---------- Nyilak a képernyő szélein ---------- */

.edge-nav {
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 48px;
    height: 72px;
    display: grid;
    place-items: center;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.edge-nav.prev { grid-column: 1; }
.edge-nav.next { grid-column: 3; }
.edge-nav:hover { opacity: 1; }
.edge-nav.prev:hover { transform: translateX(-3px); }
.edge-nav.next:hover { transform: translateX(3px); }

.edge-nav svg {
    width: 16px;
    height: 32px;
    fill: none;
    stroke: var(--text);
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Cím, felirat, szöveg ---------- */

.info {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding-bottom: 1.5vh;
}

.song-title {
    margin: 3vh 0 0;
    margin-right: -0.28em;  /* a betűköz az utolsó betű után is ott van: így marad középen */
    font-size: clamp(1.4rem, 3vw, 3rem);
    font-weight: 200;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    line-height: 1.2;
    transition: opacity 0.4s ease;
}

.song-line {
    position: relative;
    height: 3.6em;
    margin: 1.2vh auto 0;
    max-width: min(980px, 82vw);
    transition: opacity 0.4s ease;
}

.song-subtitle,
.lyrics {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    transition: opacity 0.6s ease;
}

.song-subtitle {
    font-size: 0.92rem;
    font-weight: 300;
    letter-spacing: 0.32em;
    color: var(--muted);
}

.lyrics {
    font-size: 1rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    line-height: 1.7;
    opacity: 0;
    pointer-events: none;
}

.lyrics .syllable { white-space: pre; }

body.is-playing.lyrics-on .lyrics { opacity: 1; }
body.is-playing.lyrics-on .song-subtitle { opacity: 0; }

/* ---------- Lejátszás gomb és hanghullám-vonalak ---------- */

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 1.6vh;
}

.rule {
    width: 11vw;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 59, 48, 0), rgba(255, 59, 48, 0.55));
}

.rule.right { background: linear-gradient(to left, rgba(255, 59, 48, 0), rgba(255, 59, 48, 0.55)); }

.bars {
    width: 140px;
    height: 40px;
    overflow: visible;
    transition: opacity 0.4s ease;
}

.bars line {
    stroke: rgba(255, 59, 48, 0.42);
    stroke-width: 1;
    stroke-linecap: round;
    transition: stroke 0.35s ease;
}

.bars line.on { stroke: #ff6a55; }
.bars circle { fill: rgba(255, 59, 48, 0.55); }

.play {
    flex: none;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 1.5px solid var(--red);
    display: grid;
    place-items: center;
    box-shadow: 0 0 18px rgba(255, 59, 48, 0.45), inset 0 0 12px rgba(255, 59, 48, 0.22);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.play:hover {
    transform: scale(1.05);
    box-shadow: 0 0 26px rgba(255, 59, 48, 0.7), inset 0 0 14px rgba(255, 59, 48, 0.3);
}

.play svg {
    grid-area: 1 / 1;
    width: 22px;
    height: 22px;
    fill: var(--text);
}

.play .icon-pause { display: none; }
body.is-playing .play .icon-play { display: none; }
body.is-playing .play .icon-pause { display: block; }

/* ---------- Alsó sor ---------- */

.player-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
}

.counter {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.32em;
    color: var(--muted);
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.04em;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch i {
    position: relative;
    width: 46px;
    height: 24px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 59, 48, 0.6);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.switch i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--faint);
    transform: translateY(-50%);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.switch input:checked + i {
    border-color: var(--red);
    background: rgba(255, 59, 48, 0.16);
}

.switch input:checked + i::after {
    transform: translate(21px, -50%);
    background: #fff;
    box-shadow: 0 0 0 3px var(--red), 0 0 10px rgba(255, 59, 48, 0.8);
}

.switch input:focus-visible + i {
    outline: 1px solid var(--red-soft);
    outline-offset: 4px;
}

/* ---------- Dalváltás ---------- */

.player.switching .stage,
.player.switching .song-title,
.player.switching .song-line,
.player.switching .bars { opacity: 0; }

/* ---------- Kisebb képernyők ---------- */

@media (max-width: 900px) {
    .rule { width: 7vw; }
    .bars { width: 96px; }
}

@media (max-width: 600px) {
    .player { grid-template-columns: 11vw 1fr 11vw; }
    .song-title { letter-spacing: 0.16em; margin-right: -0.16em; }
    .song-subtitle { letter-spacing: 0.18em; font-size: 0.8rem; }
    .lyrics { font-size: 0.85rem; }
    .song-line { height: 4.6em; }
    .rule { display: none; }
    .bars { width: 64px; }
    .controls { gap: 14px; }
    .play { width: 54px; height: 54px; }
    .edge-nav { width: 36px; }
    .counter { font-size: 0.75rem; }
    .switch { font-size: 0.85rem; gap: 12px; }
}

@media (max-height: 620px) {
    .song-title { margin-top: 1.5vh; font-size: clamp(1.1rem, 2.4vw, 2rem); }
    .song-line { height: 3em; margin-top: 0.6vh; }
    .controls { margin-top: 0.8vh; }
    .play { width: 50px; height: 50px; }
}
