:root{
    --tab-content-height : 360px;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #293c5a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

p {
    line-height: 1.6;
}

code {
    background-color: #eef;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

form {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

label {
    font-weight: bold;
}

input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    flex-grow: 1;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #293c5a;
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3d5a80;
}

.btn-primary {
    background-color: #293c5a;
    border-color: #293c5a;
    color: white;
}

.btn-primary:hover {
    background-color: #3d5a80;
}

.logo {
    width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
}

#words-container {
    margin-top: 1rem;
    padding: 1rem 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}


#words-container span.active {
    color: #293c5a;
    text-decoration: underline;

}

#words-container span {
    cursor: pointer;
    color: #898a8c;
}

#main-player-container {
    width: 100%;
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}

#playlist-mosaic-container {
    margin-top: 2rem;
}

.mosaic-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.mosaic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.mosaic-item img {
    width: 100%;
    height: auto;
    display: block;
}

.d-none {
    display: none;
}

.mosaic-item .title {
    padding: 0.75rem;
    background-color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#loading-state {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #777;
    grid-column: 1 / -1;
}

.thumbnail {
    width: 100%;
    min-height: 150px;
}

#div-preview-mode,
#div-fit-mode {
    margin-bottom: 1rem;
}

/* Player and Metadata Section */
#player-section {
    background-color: #fff;
    transition: all 0.3s ease;
}

#player-metadata-container {
    background-color: #fafbfc;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.scrollable-metadata {
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 5px;
}

#media-transcript,#list-quiz,#list-faq {
    padding: 0.5rem;
    max-height: var(--tab-content-height);
    overflow-y: auto;
}


#media-transcript span.active {
    font-weight: bold;
    color: #293c5a;
    text-decoration: underline;
    display: inline;

}

#media-transcript span {
    cursor: pointer;
    color: #898a8c;
}

@media (min-width: 992px) {
    #player-section {
        display: flex;
    }

    #player-section .col-lg-8 {
        flex: 0 0 66.666667%;
    }

    #player-section .col-lg-4 {
        flex: 0 0 33.333333%;
        display: flex;
        flex-direction: column;
        position: relative;
        /* Base for absolute positioning of child */
    }

    #player-metadata-container {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .scrollable-metadata {
        flex-grow: 1;
        overflow-y: auto;
    }


}

@media (max-width: 991.98px) {
    .scrollable-metadata {
        max-height: 300px;
    }

    #main-player-container {
        border-radius: 8px 8px 0 0;

    }
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: #fff;
}

.nav-tabs .nav-link.active {
    color: #293c5a;
    background-color: transparent;
    border-color: #293c5a;
}

.nav-tabs .nav-link:hover:not(.active) {
    border-bottom-color: #dee2e6;
}

/* Modal Premium Styles */
#modalAnswer .modal-content {
    border: none;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#modalAnswer .modal-body {
    padding: 3rem 2rem;
}

#modalAnswer .modal-content.bg-success {
    background-color: #06d6a0 !important;
}

#modalAnswer .modal-content.bg-danger {
    background-color: #ef476f !important;
}

#modalAnswer .answer-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#modalAnswer .answer-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    animation: fade-up 0.5s ease-out 0.2s both;
}

#modalAnswer .answer-body {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: fade-up 0.5s ease-out 0.4s both;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fade-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

#modalAnswer .btn-close-white {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

#modalAnswer .btn-close-white:hover {
    background-color: #06d6a0 !important;
}

/* Quiz Answer Feedback (Target Elements) */
.item-quiz .card.clicked {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.98);
}

.item-quiz .card.clicked[data-correct="true"] {
    border: 3px solid #06d6a0 !important;
    background-color: rgba(6, 214, 160, 0.1) !important;
    color: #069a73 !important;
}

.item-quiz .card.clicked[data-correct="false"] {
    border: 3px solid #ef476f !important;
    background-color: rgba(239, 71, 111, 0.1) !important;
    color: #b91c1c !important;
}

.item-quiz .card.clicked {
    pointer-events: none;
    opacity: 0.9;
}

