*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100dvh;
    background-color: rgb(38, 39, 39);
    color: rgb(217, 216, 216);
    font-family: system-ui, sans-serif;
}
#page-wrapper {
    min-height: 97dvh;
    display: flex;
    flex-direction: column;
}
#topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgb(61, 70, 70);
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
#channel-logo {
    height: clamp(3.5rem, 8vh, 5.5rem);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
}
#video-title {
    font-size: clamp(1.2rem, 1.5vw, 1.6rem);
    margin: 0;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
#back-button {
    all: unset;
    cursor: pointer;
    width: 3rem;
    height: auto;
}
#back-button:hover,
.videodownload:hover,
#watch-external:hover,
#downloads-toggle-icon:hover,
#video-info-toggle-icon:hover  {
    opacity: 0.7;
}
#serviceannouncement {
    display: none;
}
#serviceannouncement[shown] {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #FF2D1A;
    color: rgb(217, 216, 216);
}
#full-description {
    padding: 1.5rem 1rem 0;
    text-align: center;
}
#full-description p {
    margin: 0 auto;
    width: 85dvw;
    max-width: 70ch;
    font-size: clamp(1.4rem, 3.5vh, 2.4rem);
}
#downloads-section,
#video-info-section {
    align-items: center;
    max-height: 60dvh;
    position: fixed;
    display: flex;
    padding: 0.2rem;
    flex-direction: column;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    width: auto;
    background-color: rgb(38, 39, 39);
    border: 1px solid rgb(61, 70, 70);
    overflow-y: auto;
    transition: width 0.3s ease, opacity 0.3s ease;
}
#video-info-section {
    right: 0;
    left: unset;
    border-radius: 8px 0 0 8px;
}
#downloads-section {
    border-radius: 0 8px 8px 0;
}
#downloads-section.uncollapsed,
#video-info-section.uncollapsed {
    opacity: 1;
}
#downloads-header,
#video-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    cursor: pointer;
}
#downloads-toggle-text,
#video-info-toggle-text {
    font-weight: 600;
    font-size: clamp(0.95rem, 1vw, 1.1rem);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
#downloads-toggle-icon,
#video-info-toggle-icon {
    height: 2rem;
    width: auto;
    padding: 0.2rem;
    transition: transform 0.3s ease;
}
#downloads-section.uncollapsed #downloads-toggle-icon,
#video-info-section.uncollapsed #video-info-toggle-icon {
    transform: rotate(180deg);
}
#downloads-content,
#video-info-content {
    align-items: center;
    display: none;
    flex-direction: column;
    padding: 0.8rem;
    max-height: 55dvh;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}
#downloads-section.uncollapsed #downloads-content,
#video-info-section.uncollapsed #video-info-content {
    display: flex;
}
.videodownload {
    align-items: center;
    display: flex;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    width: fit-content;
    border-radius: 2rem;
} 
.download-btn, .videodownload, #watch-external {
    text-decoration: none;
}
#downloadDisclaimer {
    font-size: 0.5rem;
    max-width: 12rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.video-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #fff;
}
#video-thumbnail {
    width: 30rem;
    max-width: 50dvw;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    padding: 0.5rem;
    border-radius: 1rem;
}
#watch-external {
    padding: 0.5rem 1rem;
    background-color: rgb(37, 178, 255);
    color: rgb(217, 216, 216);
    border: none;
    border-radius: 0.3rem;
    cursor: pointer;
}
#video-duration,
#video-date {
    font-size: 0.85rem;
    opacity: 0.8;
}
#developer-credit {
    font-size: 0.65rem;
    padding: 0.4rem 0.8rem;
    opacity: 0.8;
}
@media (max-width: 768px), (max-height: 768px) {
    #downloads-section, #video-info-section {
        opacity: 80%;
    }
}
@media (max-height: 768px) {
    #full-description p {
        width: 90dvw;
    }
}