html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* LAYOUT */
#mainLayout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.elevation-0 { box-shadow: none !important; }
.elevation-1 { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;	}
.elevation-2 { box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important; }
.elevation-3 { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23) !important; }
.elevation-4 { box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22) !important;	}

/* TOP BAR */
#topBar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #000;
    color: #fff;
    padding: 6px 10px;
    border-bottom: 1px solid #333;
}

@media (min-width: 769px) {

    #toggleBtn {
        display: none;
    }
}

.mediaToggle {

    display: flex;
    align-items: center;

    border-radius: 10px;
    overflow: hidden;

    background: rgba(255,255,255,0.08);

    border: 1px solid rgba(255,255,255,0.12);
}

.mediaBtn {

    border: none;
    background: transparent;

    color: #aaa;

    padding: 6px 14px;

    font-size: 12px;
    font-weight: 600;

    transition: all 0.2s ease;
}

.mediaBtn.active {

    background: rgba(50,124,139,0.35);
    color: #fff;
}

.mediaToggle.disabled {

    opacity: 0.4;
    pointer-events: none;
}


.playerCtrlBtn {

    border: none;

    width: 42px;
    height: 32px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            rgba(80,180,200,0.30),
            rgba(40,90,110,0.28)
        );

    border: 1px solid rgba(140,220,240,0.8);

    color: #dff9ff;

    box-shadow:
        0 0 12px rgba(80,180,220,0.18),
        inset 0 1px 0 rgba(255,255,255,0.08);

    transition:
        transform 0.12s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.playerCtrlBtn:hover {

    transform: scale(1.06);

    background:
        linear-gradient(
            180deg,
            rgba(100,210,240,0.40),
            rgba(40,110,140,0.35)
        );

    box-shadow:
        0 0 18px rgba(100,220,255,0.30),
        inset 0 1px 0 rgba(255,255,255,0.10);

    color: #ffffff;
}

.playerCtrlBtn i {

    font-size: 26px;

    position: relative;
    left: 1px;
}

.playerCtrlBtn i {

    font-size: 20px;
}

#menuContainer {

    position: fixed;

    top: 6px;
    right: 10px;

    z-index: 3000;
}

.menuSeparator {

    height: 1px;
    background: #667;
    margin: 4px 8px;
}

#dropdownMenu {

    position: absolute;
    top: 38px;
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 4px 0;
}

.menuHidden {
    display: none!important;
}

#menuButton {
    width: 34px;;
    height: 34px;;
}


.menuItem {

    background: none;
    border: none;
    color: white;
    padding: 8px 14px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.menuItem:hover {

    background: #333;
}




#controlsArea {
    margin-top: 4px;
}

/* CONTENUTO */
#container {
    height: 100%;
    flex: 1;
    display: flex;
}

#leftPane {
    width: 30%;
    min-width: 180px;
    background-color: #cfeaea;
    overflow: auto;
}

#rightPane {
    height: 100%;
    flex-grow: 1;
    background-color: #eef7f7; /* ✔ ora chiaro */
    color: #222;
    border-left: 1px solid #ccc; /* ✔ separazione leggera */
    position: relative;
    z-index: 1;
}

#rightPane {
    position: relative;
    overflow: hidden;
}

.playerLayer {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.playerLayer.hidden {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.playerLayer.visible {
    opacity: 1;
    z-index: 10;
}



#divider {
    width: 5px;
    cursor: col-resize;
    background: #ccc;
}
/*
.tooltip {
    z-index: 999999 !important;
}
*/







.fs-tooltip {
    position: fixed;
    z-index: 999999;

    background: linear-gradient(135deg, #1c1c1c, #0f0f0f);
    color: #fff;

    padding: 12px 14px;
    border-radius: 12px;

    min-width: 180px;

    box-shadow:
        0 20px 40px rgba(0,0,0,0.7),
        0 6px 12px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.08);

    border: 1px solid rgba(255,255,255,0.15);

    opacity: 0;
    transform: translateY(20px) scale(0.9);

    transition: all 0.35s cubic-bezier(.16,1,.3,1);
}



/* freccia */
.fs-tooltip::after {
    content: "";
    position: absolute;

    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);

    border-width: 8px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
    outline: 1px solid rgba(255,255,255,0.05);
}

/* stato visibile */
.fs-tooltip.show {
    opacity: 1;
    transform: translateY(-6px) scale(1);
}


/* QUI LA MAGIA */
.fs-tooltip.show {
    animation: floaty 2s ease-in-out infinite;
}

/* movimento leggero */
@keyframes floaty {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1); }
    100% { transform: translateY(0) scale(1); }
}

.fs-tip-title {
    font-size: 14px;
    font-weight: 600;
}

.fs-tip-sub {
    font-size: 11px;
    opacity: 0.6;
}


.fs-tooltip.show {
    animation: popIn 0.35s cubic-bezier(.34,1.56,.64,1) forwards;
}

/* animazione ingresso */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.85);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.05);
    }
    100% {
        transform: translateY(-4px) scale(1);
    }
}

.fs-tooltip::before {
    content: "";
    position: absolute;

    inset: -8px;
    border-radius: 14px;

    background: radial-gradient(
        rgba(255,255,255,0.08),
        transparent 70%
    );

    opacity: 0;
    transition: opacity 0.3s ease;

    z-index: -1;
}

.fs-tooltip.show::before {
    opacity: 1;
}











/* LISTA COMPATTA */
#leftPane .p-5 {
    padding: 5px !important;
}

.tuneTitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
}



/* BOTTONI */
#helpBtn {
    position: fixed;
    top: 5px;
    right: 10px;
    z-index: 9999;
}
#helpBtn .fs-btn {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.75);
    color: #ddd;
}
#helpBtn .fs-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}


/* RADIO */
.mode-btn {
    border-color: #6fb3c2;
    color: #6fb3c2;
    background: transparent;
}

.btn-check:checked + .mode-btn {
    background-color: #6fb3c2;
    color: #000;
}

/* FILTRI */
#genreFilters .btn {
    border-color: #aaa;
    color: #ddd;
}

#genreFilters .btn-check:checked + .btn {
    background-color: #b04a4a;
    color: #fff;
    border-color: #b04a4a;
}

/* NASCONDI CONTROLLI QUANDO LISTA NASCOSTA */
body.hide-list #controlsArea {
    display: none;
}


.list-group-item:hover {
    transform: translate3d(4px,0,0);
    background-color: rgba(50,124,139,0.12);
}

.list-group-item.active:hover {
    background-color: #226c7b;
}



.list-group-item:active {
    transform: translate3d(2px,0,0) scale(0.96);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.5);
    background-color: rgba(0,0,0,0.15);
}



/* selezionato */
.list-group-item.active {
    background-color: #327c8b;
    color: #fff;
    transform: translateX(4px); /* resta coerente con hover */
    box-shadow: inset 4px 0 0 #fff;
}

/*
.list-group-item {
    border: none;
    border-left: 4px solid transparent;
}

.list-group-item.active {
    border-left: 4px solid #fff;
}
*/

/* base */
.list-group-item {
    border: none;
    box-shadow: inset 0 0 0 0 #fff;

    transition:
        box-shadow 0.35s ease,
        transform 0.22s ease,
        background-color 0.35s ease;
}

.list-group-item.active {
    box-shadow: inset 4px 0 0 0 #fff;
    background-color: #327c8b;
}






.fadeInItem {
    opacity: 0;
    animation: fadeItem 0.35s cubic-bezier(.2,.8,.2,1) forwards;
}


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



.tuneItem {
    position: relative;
}

/* ICONA INFO */
.infoIcon {
    position: absolute;
    top: 5px;
    right: 8px;

    height: 55%;
    opacity: 0.6;
    cursor: pointer;

    transition: all 0.2s;
}

/* hover */
.infoIcon:hover {
    opacity: 1;
}





/* quando selezionato */
.tuneItem.active .infoIcon {
    filter: brightness(0) invert(1); /* diventa chiara */
    opacity: 1;
}


/* MOBILE */
@media (max-width: 768px) {

    #container {
        flex-direction: column;
    }

    #leftPane, #rightPane {
        width: 100%;
        height: 100%;
        display: none;
    }

    #leftPane.active,
    #rightPane.active {
        display: block;
    }

    #divider {
        display: none;
    }

    body.show-player #controlsArea {
        display: none;
    }
}

#rightPane iframe {
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

/*
#pdfContainer {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
*/
#pdfContainer {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #4b4b4b;
    text-align: center;
}

/*
.pdfPage {
    display: block;
    margin: 10px auto;
    max-width: 100%;
}
*/

.pdfPage {
    display: block;
    margin: 15px auto;
    background: white; /* simula carta */
    box-shadow: 0 0 10px rgba(0,0,0,0.9); /* profondità */
}


/*
#fullscreen {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 0;
    background: transparent;
    z-index: 2000;
}


@media (max-width: 768px) {
    #fullscreen {
        display: none;
    }
}

div#fullscreen button span.action { font-weight: bold;  }
div#fullscreen button div.label { font-size: 12px; line-height: 14px; }

div#fullscreen.off button span.action { color: #009; }
div#fullscreen.off button div.label { color: #000; }
*/

#fullscreen {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 9999;
}
/*
.fs-btn {
    border-radius: 12px;
    width: 44px;
    height: 44px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.85;
}

.fs-btn:hover {
    opacity: 1;
}
-*

/* icona */
#fsIcon {
    font-size: 20px;
}

.fs-btn:hover {
    transform: scale(1.05);
}

/*
.fs-btn {
    background: rgba(0,0,0,0.7);
    border: none;
}
*/


/* nascondi su mobile */
@media (max-width: 768px) {

    #fullscreen {
        display: none;
    }

    #rightPane {
        border-left: none;
    }
}

.fs-btn {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.7);

    border: 1px solid rgba(200,200,200,0.8); /* ✔ bordo grigio sottile */
    border-radius: 8px;

    color: white;

    cursor: pointer;
    opacity: 0.85;
    transition: all 0.2s;
}

.fs-btn:hover {
    opacity: 1;
    border-color: rgba(255,255,255,0.7); /* ✔ più visibile al hover */
}



#idlePlayer {
    width: 100%;
    height: 100%;

    background: #2b2b2b; /* stesso del PDF */

    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.idleContent {
    text-align: center;
    color: #ddd;
    max-width: 400px;
    padding: 20px;
}

.idleLogo {
    width: 120px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.idleText {
    font-size: 14px;
    line-height: 1.4;
}

.idleText hr {
    border-color: #555;
    margin: 15px 0;
}

.idleText ul {
    padding-left: 18px;
    text-align: left;
}

.idleText li {
    margin-bottom: 5px;
}

/* stato iniziale */
.idleLogo,
.idleText {
    opacity: 0;
    transform: translateY(10px);
}

/* animazioni */
.fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fadeInUpSlow {
    animation: fadeInUp 0.9s ease-out forwards;
}

/* keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-modal {
    background: #f8fbfb; /* chiaro ma non bianco puro */
    color: #222;

    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);

    box-shadow:
        0 20px 40px rgba(0,0,0,0.25),
        0 6px 12px rgba(0,0,0,0.15);
}

.info-modal {
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.92);
}


.info-logo {
    width: 48px;
    opacity: 0.9;
}

.info-link {
    display: inline-block;
    margin-top: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.info-link:hover {
    text-decoration: underline;
}

.info-channel {
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

.info-notes {
    font-size: 16px;
    font-style: italic;
    color: #333;
    margin-top: 8px;
}

.info-genre {
    font-size: 15px;
    font-style: italic;
    color: #333;
    margin-left: 3px;
}

.info-arr {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-top: 4px;
}

.idle-desc {
    margin-top: 20px;
    max-width: 420px;

    font-size: 13px;
    line-height: 1.6;
    color: #bbb;

    text-align: center;
}


/* IDLE PAGE CSS */

#idleLayer {

    overflow-x: hidden;
}

.mobileHint {

    margin-top: 28px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    gap: 10px;

    opacity: 0.85;

    cursor: pointer;
}

.mobileHintIcon {

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255,255,255,0.06);

    color: #fff;

    border: 1px solid rgba(255,255,255,0.33);

    font-size: 16px;
}

.mobileHintText {

    font-size: 12px;
    color: #aaa;
}

.signature {

    width: 100%;

    text-align: right;

    margin-top: 20px;

    font-style: italic;
}

.helpNavLink {

    margin-top: 18px;

    font-size: 13px;

    color: #9ed0da;

    cursor: pointer;

    transition: opacity 0.2s ease;
}

.helpNavLink:hover {

    opacity: 0.7;
}

@media (min-width: 769px) {

    .mobileHint {
        display: none;
    }
}


.mobileBackToList {

    display: none;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #cfcfcf;
    cursor: pointer;
    opacity: 0.8;
}

.mobileBackToList:hover {

    opacity: 1;
}

.mobileBackToList i {

    margin-right: 6px;
}

@media (max-width: 768px) {

    .mobileBackToList {

        display: block;
    }
}

