/* #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;
    position: relative;
    width: 180px;
    height: 280px;
    overflow: hidden;
    /* background-color: #222;
    border: 10px solid #222; */
    border-radius: 25px;
    box-shadow: 0 0 20px 0px #22222275;
    text-align: center;
    transition: all 0.3s ease;
}
.card:hover {
    box-shadow: 0 0 20px 0px #222;
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
}
.card .card-title,
.card-anime-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    color: #ececec;
    text-shadow: 0 0 20px black;
    padding: 20px;
    font-size: 1em;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 2;
}
.main-title {
    margin: 15px 22px;
}
/* Card Background Overlay */
.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Full height, adjusts gradient placement */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3), transparent);
    z-index: 1;
    pointer-events: none;
}
/* #endregion */

/* #region Recently Watched & Latest Episodes (cards with episode number) */
.recently-watched .card a,
.recent-episodes .card a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 10px;
    height: 14px;
    background-color: #800000;
    color: white;
    border-radius: 16px;
    box-shadow: 0 0 20px 5px #222;
    z-index: 1;
}
/* Recent Episodes - Image Styles */
.recent-episodes .card img {
    max-height: 130px;
    min-height: 130px;
    border-radius: 16px;
}
/* Recently Watched - Progress Bar Styles */
.recently-watched .card .progress-bar-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 2;
}
.recently-watched .card .progress-bar {
    height: 8px;
    background-color: #800000;
    box-shadow: 0 0 20px 4px black;
}
/* Recently Watched - Episode Number Styles */
.recently-watched .card-episode-number {
    margin-top: 50px;
}
/* #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 {
    position: absolute;
    width: 100%;
    color: #ececec;
    z-index: 2;
    text-shadow: 0 0 8px black;
}
.start {
    align-items: flex-start !important;
}
/* #endregion */

/* #region Media Queries */
@media (max-width: 1200px) {
    .card {
        width: 110px;
        height: 210px;
    }
    /* Schedule */
    .schedule .card {
        height: 210px;
    }
    /* Delete Button */
    .recently-watched .card a {
        width: 60px;
    }
}
/* #endregion */
