/* #region Container Styles */
.main-container,
.recently-watched {
    display: flex;
    gap: 20px;
    max-width: 1410px;
    width: 90vw;
    padding: 18px;
    overflow: auto;
    text-shadow: 0 0 black;
}
/* #endregion */

/* #region Smooth Transition */
main {
    opacity: 1;
    transition: opacity 0.5s linear;
}
main.show {
    opacity: 0;
}
/* #endregion */

/* #region Card Styles */
.card {
    display: flex;
    flex-direction: column;
    width: 200px;
    height: 380px;
    background-color: #222;
    border: 10px solid #222;
    border-radius: 30px;
    box-shadow: 0 0 10px 1px #222;
    text-align: center;
}
.card:hover {
    background-color: #111;
    border-color: #111;
    box-shadow: 0 0 10px 8px #111;
}
.card img {
    width: 200px;
    height: 280px;
    min-height: 280px;
    border-radius: 20px;
    object-fit: cover;
}
.card .card-title,
.card-anime-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    margin: 8px;
    color: white;
    overflow: hidden;
}
/* Main Title */
.main-title {
    margin: 15px 22px;
}
/* #endregion */

/* #region Recently Watched & Latest Episodes (cards with episode number) */
.recently-watched .card {
    position: relative; /* Prevents the delete button floating when scrolling*/
    height: 280px;
}
.recently-watched .card a,
.recent-episodes .card a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 6px 10px;
    height: 14px;
    background-color: #800000;
    color: white;
    border-radius: 16px;
    box-shadow: 0 0 20px 5px #222;
    z-index: 1;
}
.recently-watched .card img {
    max-height: 130px;
    min-height: 130px;
    border-radius: 20px 20px 0 0;
}
.recent-episodes .card img {
    max-height: 130px;
    min-height: 130px;
    border-radius: 16px;
}
.recently-watched .card .card-anime-title,
.recent-episodes .card .card-anime-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    margin: 10px;
    color: white;
    overflow: hidden;
}
/* Recently Watched - Progress Bar Styles */
.recently-watched .card .progress-bar-container {
    width: 100%;
    height: 15px;
    background-color: #444;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 0 20px 5px #222;
    overflow: hidden;
}
.recently-watched .card .progress-bar {
    height: 8px;
    background-color: #800000;
    box-shadow: 0 0 20px 4px black;
}
/* #region Loaded */
.recently-watched,
.text-white.recently-watched-title {
    display: flex;
    align-items: flex-start;
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    transition: max-height 1s cubic-bezier(0.65, 0.05, 0.35, 1), padding 1s cubic-bezier(0.65, 0.05, 0.35, 1), margin 1s cubic-bezier(0.65, 0.05, 0.35, 1);
}
/* Loaded */
.recently-watched.loaded {
    max-height: 326px;
    padding: 18px;
}
.text-white.recently-watched-title.loaded {
    max-height: 326px;
    margin: 15px 22px;
}
/* Animation for opacity */
@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.recently-watched.loaded,
.text-white.recently-watched-title.loaded {
    animation: fade 0.7s ease 0.7s forwards;
}
/* #endregion */
/* #endregion */

/* #region Schedule */
.schedule .card {
    height: 250px;
}
.schedule .card-episode-number {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}
.schedule hr {
    width: 100%;
    margin: 0;
    border-color: #333;
    border-style: solid;
    border-radius: 50px;
}
/* Extras */
.schedule .red {
    color: darkred;
}
.schedule .green {
    color: darkgreen;
}
.schedule .timestamp-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}
/* #endregion */

/* #region Helper */
.card-episode-number {
    margin: 8px;
    color: #666;
}
.start {
    align-items: flex-start !important;
}
/* #endregion */

/* #region Media Queries */
@media (max-width: 1200px) {
    .card {
        width: 110px;
        height: 260px;
    }
    .card img {
        width: 110px;
        height: 150px;
        min-height: 150px;
    }
    /* Recently Watched */
    .recently-watched .card img {
        height: 80px;
        min-height: 80px;
    }
    .recent-episodes .card img {
        height: 100px;
        min-height: 100px;
    }
    /* Schedule */
    .schedule .card {
        height: 210px;
    }
}
/* #endregion */
