.dark {
    --page-body-bg: #0F0F0F;
}

.main_content {
    display: flex;
    width: 100%;

    justify-content: center;

    gap: 32px;
}

@media (max-width: 1000px) {
    .main_content {
        display: flex;
        flex-direction: column;

        gap: 16px;
    }
}

.media__container {
    display: flex;
    width: 100%;
    max-width: 100%;

    justify-content: center;
}

.media_wrapper{
    display: flex;
    width: auto;
    max-width: 100%;

    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    overflow: hidden;
}

@media (max-width: 480px) {
    .media_wrapper.is-full {
        background: none;
        border-radius: 0;
        box-shadow: none;
    }
}

.main_content__player:has(audio),
.media__container:has(audio),
.media_wrapper:has(audio) {
    width: 100%;
    max-width: 650px;
}

video {
    display: block;
    max-width: 65vw;
    max-height: 78vh;
}

@media (max-width: 1280px) {
    video {
        max-width: 62vw;
    }
}

@media (max-width: 1160px) {
    video {
        max-width: 56vw;
    }
}

@media (max-width: 1000px) {
    video {
        max-width: 93vw;
        max-height: 80vh;
    }
}

@media (max-width: 768px) {
    video {
        width: 95vw;
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    video {
        width: 100%;
        height: auto;
        max-width: none;
        max-height: 80vh;
    }
}

audio {
    display: block;
    width: 100%;
    max-width: 650px;
    min-width: 200px;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 20px;

    opacity: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    
    transition: opacity 0.3s ease;
}

.media__container:hover .controls {
    opacity: 1;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 9999px;
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    border-radius: 9999px;
    width: 0%;
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress::after {
    opacity: 1;
}

.main_content__media-info {
    display: inline-flex;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;

    justify-content: center;

    line-height: 1.5;
}

@media (max-width: 768px) {
    .main_content__media-info {
            padding: 0 4px;
    }
}

.media-info__title {
    display: flex;
    flex-direction: row;

    margin-bottom: 8px;

    align-items: start;

    gap: 10px;
}

.media-info__title-image {
    display: block;

    margin-top: 0.3em;

    width: 30px;
    height: 30px;

    /* Make the image circular */
    border-radius: 50%;

    /* Preserve aspect ratio and fill the circle */
    object-fit: cover;
}

@media (max-width: 768px) {
    .media-info__title-image {
        margin-top: 0;
    }
}

.media-info__title-text {
    display: inline;    
}

.media-info-description {
    padding: 24px;
    border-radius: 20px;

    color: var(--text-secondary);
   
    font-size: var(--h4);
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;

    background-color: var(--bg-card);
}

.media-info-description:empty {
    display: none;
}

button {
    background: none;
    border: none;

    background-color: var(--bg-button);
    color: inherit;

    cursor: pointer;

    transition: border-color 0.5s ease, background-color 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

.back-button {
  display: flex;
  width: 35px;
  height: 35px;
  margin-right: 10px;
  padding: 0;

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

  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  border: none;
}

@media (max-width: 480px) {
    .back-button {
        width: auto;
        height: auto;
    }
}

.back-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.back-button:hover {
    background-color: var(--bg-button-hover);
}

.time {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

.main_content__sidebar {
    display: flex;
    flex-direction: column;
    width: 350px;
    min-width: 350px;
    gap: 24px;
    line-height: 1.5;
}

.sidebar-card {
    max-width: 420px;
    padding: 24px;
    border-radius: 20px;

    background-color: var(--bg-card);
}

@media (max-width: 1000px) {
     .main_content__sidebar {
        width: auto;
        max-width: 350px;
        min-width: 280px;
    }

    .sidebar-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .main_content__sidebar,
    .sidebar-card {
        width: 100%;
        max-width: 100%;
    }

    .main_content__sidebar {
        padding: 0 4px 4px;
    }
}

.sidebar-card_title {
    margin-bottom: 20px;
}

.sidebar-card__parameters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: var(--h4);
}

.sidebar-card__parameters_item {
    display: flex;
    justify-content: space-between;
}

.parameters-item__name {
    color: var(--text-secondary);
}

.parameters-item__value {
    display: inline-flex;
    gap: 6px;
}

.parameters-item__value-link {
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}

.parameters-item__value-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.item-value__action-button {
    display: inline-flex;

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

    padding: 0;
    margin: 0;

    background: transparent;

    color: inherit;
    cursor: pointer;

    border: none;
    border-radius: 4px;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.item-value__action-button:hover {
    transform: scale(1.15);
}

.item-value__action-button svg {
    display: block;

    width: 20px;
    height: 20px;
}

.action-button--copy {
    color: var(--action-copy-icon);
}

.playlist-item {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s;
}

.playlist-item:hover {
    background-color: #27272a;
}

.icon {
    display: inline-block;
    width: 1.25em;
    text-align: center;
}
