@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

html {
    font-size: 16px;
}

a {
    color: white;
}

:root {
    --primary: #ff0000;
    --white: #fff;
    --black: #000;
    --black-rgb: 0, 0, 0;
    --gray: #6b7280;
    --body-text-color: #f1f1f1;
    --body-bg-color: #0F0F0F;
    --font-weight: 700;
    --backgroundColor: #222222;
    --jost: "Jost", sans-serif;
    --inter: "Inter", sans-serif;
}

body {
    transition: all 0.3s ease;
    /* scroll-behavior: smooth; */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* padding-bottom: 0.6rem; */
    background-color: var(--body-bg-color);
    color: var(--white);
    /* overflow-x: hidden !important; */
    /* scrollbar-width: none; */
    /* scroll-behavior: smooth; */
}

html,
body {
    /* scrollbar-width: none; */
    /* -ms-overflow-style: none; */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    /* display: none; */
}

/* #mainLocomotive {} */

/* navbar */
header {
    padding: 1.6rem 2rem;
    box-shadow: 0px 0px 0.9rem 1px rgba(var(--black-rgb), 0.2);
    font-weight: var(--font-weight);
    background-color: var(--body-bg-color);
    color: var(--primary);
    width: 100%;
    position: fixed;
    top: 0rem !important;
    left: 0rem !important;
    z-index: 99;

    #title {
        .fa-youtube {
            font-size: 1rem;
            background-color: rgba(99, 102, 241, 0.1);
            background-color: var(--white);
            border-radius: 50%;
            padding: 0.48rem 0.48rem;
            transition: all 0.2s ease-in-out;
        }

        h1 {
            font-size: 1.7rem;
            font-weight: 700;
            color: var(--white);
        }
    }

    #search,
    #watchLaterSearch {
        border-radius: 1.3rem;
        border: 0.1rem solid var(--body-text-color);

        input {
            padding: 0.5rem 0.9rem;
            border: none;
            outline: none;
            background-color: transparent;
            width: 85%;
            color: var(--white);
        }

        #searchDiv {
            padding: 0.5rem 0.7rem;
            border-top-right-radius: 1.3rem;
            border-bottom-right-radius: 1.3rem;
            background-color: var(--backgroundColor);
            width: 15%;
            text-align: center;

            i {
                display: inline-block;
                color: var(--white);
            }
        }

    }

    #search:focus {
        border: 0.1rem solid #065fd4 !important;
    }

    #headerIcons {
        margin-left: 7rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        font-size: 1.1rem;

        i {
            cursor: pointer;
            color: var(--white);
            background-color: var(--backgroundColor);
            padding: 0.5rem 0.7rem;
            font-size: 1.1rem;
            border-radius: 50%;
        }

        #lightTheme {
            display: none;
            padding: 0.7rem 0.7rem !important;
        }


        #watchLaterAmt {
            top: 0.1rem;
            right: 0rem;
            background-color: var(--primary);
            color: var(--white);
            border-radius: 50%;
            padding: 0rem 0.3rem;
            font-size: 0.8rem;
            text-align: center;
        }

        #watchLaterIcon {
            background-color: transparent !important;
            padding: 0.6rem 0.6rem;
            font-size: 1.4rem !important;
        }
    }

    #category {
        margin-top: 1.5rem;
        border-top: 1px solid #303030;
        border-bottom: 1px solid #303030;
        padding: 1.5rem 0rem 1.5rem 0rem;

        #categoryHead {
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
            width: 100%;
            gap: 12px;

            .categoryCard {
                background-color: var(--backgroundColor);
                min-width: 3rem;
                max-width: fit-content;
                color: var(--body-text-color);
                text-transform: capitalize;
                text-align: center;
                padding: 0.5rem 0.9rem;
                border-radius: 2rem;
                font-size: 0.9rem;
                cursor: pointer;
                flex-shrink: 0;
            }

            .categoryCard:hover {
                background-color: #3F3F3F;
            }

            .categoryCardToggle {
                background-color: var(--white) !important;
                color: var(--black) !important;
            }
        }
    }

    .activeCategory {
        background-color: #FEFEFE !important;
        color: var(--black) !important;
        font-weight: 600;
    }
}

header:hover {
    box-shadow: 0px 0px 1.8rem 1px rgba(var(--black-rgb), 0.2);
}

header:hover #title .fa-youtube {
    background-color: var(--primary);
    transform: rotate(360deg) scale(1.1);
    color: var(--white);
    box-shadow: 0px 0px 1.2rem 2px rgba(var(--black-rgb), 0.2);
}

#videosHead {
    padding: 1.6rem 2rem;
    margin-top: 11rem !important;

    .videoCard {
        /* background-color: rebeccapurple; */
        /* cursor: pointer; */
        min-height: 25rem;
        max-height: fit-content;
        /* border: 1px solid rgba(27, 27, 53, 0.8); */
        /* border: 10px solid red; */
        margin-top: 1.3rem;
        transition: all 0.3s ease-in-out;
        /* border: 1px solid transparent; */

        .videoThumbnail {
            border-top-left-radius: 0.6rem;
            border-top-right-radius: 0.6rem;
            height: 13rem;
            width: 100%;
            object-fit: cover;
            object-position: center;
            margin: 0rem auto;
            position: relative;
            overflow: hidden;
            /* border: 1px solid #fff; */

            img {
                height: 100%;
                width: 100%;
                border-top-left-radius: 0.6rem;
                border-top-right-radius: 0.6rem;
                transition: all 0.3s ease-in-out;
            }

            .videoThumbnailHover {
                position: absolute;
                left: 0px;
                top: 0px;
                height: 100%;
                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
                /* background: rgba(0, 0, 0, 0.2); */
                /* backdrop-filter: blur(1.1px); */
                background: rgba(27, 27, 53, 0.8);
                visibility: hidden;
                transition: all 0.2s ease-in-out;
                z-index: 9;

                i {
                    color: var(--backgroundColor) !important;
                    background-color: var(--white);
                    border-radius: 50%;
                    font-size: 1.3rem !important;
                    padding: 1.1rem 1.3rem;
                    cursor: pointer;
                    /* transition: all 0.3s ease-in-out; */
                }
            }

            .videoThumbnailHover i:hover {
                transform: scale(1.1);
            }

            .videoDuration {
                color: var(--white);
                display: flex;
                align-items: center;
                background-color: var(--black);
                position: absolute;
                right: 10px;
                bottom: 0px;
                padding: 0.1rem 0.4rem;
                font-size: 0.8rem;
                border-radius: 0.4rem;
            }

        }

        .videoDescription {
            border-bottom-left-radius: 0.6rem;
            border-bottom-right-radius: 0.6rem;
            color: var(--white);
            background-color: var(--backgroundColor);
            padding: 1rem 0.6rem;

            .title {
                color: var(--white);
            }

            .channel {
                font-weight: 600;
                color: var(--body-text-color);
                color: #aaaaaa;
                margin-top: 0.4rem;
            }

            .views {
                margin: 0.1rem 0rem;
                color: #717171;
            }

            .buttons {
                margin: 1rem 0rem 0.4rem 0rem;

                button {
                    border: none;
                    outline: none;
                    padding: 0.3rem 0.6rem;
                    cursor: pointer;
                    font-size: 0.9rem;
                    border-radius: 0.8rem;
                    transition: all 0.3s ease-in-out;
                }

                .watchVideo {
                    background-color: var(--primary);
                    color: var(--body-text-color);
                }

                .watchVideo:hover {
                    background-color: #ff0000b4;
                }

                button:hover {
                    transform: translateY(-2px);
                }

                .savedLater {
                    background-color: #065FD4;
                    color: var(--white);
                    display: none;
                }

                .savedLater:hover {
                    background-color: #065fd4c4;
                }
            }
        }

    }

    .videoCard:hover {
        transform: translateY(-1.4%);
        /* box-shadow: 0rem 0rem 0.8rem rgba(255, 255, 255, 0.5); */
    }

    .videoCard:hover .videoThumbnail img {
        transform: scale(1.04);
    }
}

#noResultMessage,
#noResultMessage {
    margin-top: 20rem;
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* padding: 50px 20px; */
    color: #fff;
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: transparent;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    /* margin-top: 15rem; */
    width: 100%;
    height: 100%;
    /* position: fixed; */
    top: 0rem;
    left: 0rem;
    /* z-index: 999; */

    h2 {
        font-size: 2rem;
        margin-bottom: 10px;

        i {
            font-size: 1.6rem;
        }
    }

    p {
        font-size: 1.3rem;
    }
}

.page-header {
    display: flex;
    padding: 1.6rem 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    color: #fff;
    margin-top: 8rem;

    .page-title {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #fff;

        i {
            font-size: 32px;
            color: #065fd4;
        }

        h1 {
            font-size: 32px;
            font-weight: 600;
            margin: 0;
        }
    }

    .page-subtitle {
        color: #aaaaaa;
        font-size: 14px;
        margin-left: 44px;
    }


    .page-subtitle {
        /* color: var(--text-secondary); */
        font-size: 14px;
        margin-left: 44px;
    }

    .page-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .clear-all-btn {
        background-color: red;
        border: none;
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .clear-all-btn:hover {
        background-color: #e74c3c;
        transform: translateY(-1px);
    }
}


.video-grid,
#videoGrid {
    /* display: flex; */
    /* gap: 24px; */
    padding: 1.6rem 2rem;

    /* Video Card */
    .video-card {
        background-color: #1f1f1f;
        border: 1px solid #303030;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
        position: relative;


        .video-thumbnail {
            position: relative;
            aspect-ratio: 16/9;
            overflow: hidden;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 0.3s;
            }


            .video-duration {
                position: absolute;
                bottom: 8px;
                right: 8px;
                background-color: rgba(0, 0, 0, 0.8);
                color: white;
                padding: 2px 6px;
                border-radius: 4px;
                font-size: 12px;
                font-weight: 500;
            }

            .added-date {
                position: absolute;
                top: 8px;
                left: 8px;
                background-color: rgba(0, 0, 0, 0.8);
                color: white;
                padding: 2px 6px;
                border-radius: 4px;
                font-size: 11px;
                font-weight: 500;
            }

            .play-overlay {
                position: absolute;
                inset: 0;
                background-color: rgba(0, 0, 0, 0.6);
                display: flex;
                align-items: center;
                justify-content: center;
                opacity: 0;
                transition: opacity 0.3s;
            }

            .play-btn {
                background-color: rgba(255, 255, 255, 0.9);
                border: none;
                width: 60px;
                height: 60px;
                border-radius: 50%;
                color: #0f0f0f;
                font-size: 20px;
                cursor: pointer;
                transition: all 0.2s;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .play-btn:hover {
                background-color: white;
                transform: scale(1.1);
            }

        }

        .video-info {
            padding: 16px;
            flex: 1;

            .video-title {
                font-size: 16px;
                font-weight: 500;
                line-height: 1.4;
                margin-bottom: 8px;
                color: #fff;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

            .video-channel {
                color: #aaaaaa;
                font-size: 14px;
                margin-bottom: 4px;
            }

            .video-meta {
                color: #717171;
                font-size: 14px;
                margin-bottom: 12px;
            }

            .video-added-info {
                color: #717171;
                font-size: 12px;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .video-actions {
                display: flex;
                gap: 8px;
                align-items: center;
                flex-wrap: wrap;


                .action-button {
                    background-color: #272727;
                    border: 1px solid #303030;
                    padding: 8px 12px;
                    border-radius: 20px;
                    color: #0f0f0f;
                    font-size: 14px;
                    cursor: pointer;
                    transition: all 0.2s;
                    display: flex;
                    align-items: center;
                    gap: 6px;
                }

                .action-button:hover {
                    background-color: #3e3e3e;
                    transform: translateY(-1px);
                }

                .action-button.danger {
                    background-color: #ff4757;
                    color: white;
                    border-color: #ff4757;
                }

                .action-button.danger:hover {
                    background-color: #e74c3c;
                }
            }
        }
    }

    .video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        border-color: #065FD4;
    }

    .video-card:hover .video-thumbnail img {
        transform: scale(1.05);
    }

    .video-card:hover .play-overlay {
        opacity: 1;
    }

    .video-card:hover .remove-btn {
        opacity: 1;
    }
}

#toastBody {
    max-height: 100vh;
    min-height: fit-content;
    width: 20rem;
    position: fixed;
    right: 0rem;
    bottom: 0rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem 1rem;
    z-index: 9999;
    overflow: hidden;
    flex-wrap: nowrap;

    .toastCard {
        position: relative;
        height: 3.5rem;
        width: 100%;
        background: #e0f7fa;
        color: #004d40;
        margin-top: 1rem;
        flex-shrink: 0;
        font-size: 1.15rem;
        padding: 0rem 1rem;
        border-radius: 0.2em;
        backdrop-filter: blur(6px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        color: var(--backgroundColor);
        display: flex;
        align-items: center;
        gap: 0.4rem;
        transform: translate(150%);
        transition: all 0.3s ease-in-out;
        animation: showCard 0.5s linear forwards;
    }
}

@keyframes showCard {

    100% {
        transform: translate(0%);
    }
}

.toastCard::after {
    content: '';
    position: absolute;
    bottom: 0rem;
    left: 0rem;
    background-color: red;
    height: 3px;
    width: 100%;
    animation: bottomLine 5s 1 backwards;
}

@keyframes bottomLine {

    100% {
        width: 0%;
    }
}


#controlsPanel {
    padding: 0rem 2rem;
    height: 5rem;
    width: 100%;
    color: #fff;

    #controlsHead {
        padding: 1.6rem 2rem;
        background-color: #1F1F1F;
        border-radius: 0.5rem;
        font-size: 0.9rem;

        select {
            /* margin-top: 0.5rem; */
            /* width: 50%; */
            cursor: pointer;
            background-color: #272727;
            font-size: 0.9rem;
            color: #fff;
            border: none;
            border-radius: 0.4rem;

            i {
                color: #fff;
            }
        }

        label {
            white-space: nowrap;
        }
    }
}

#loaderMain {
    display: none;
}

@media (max-width:767px) {

    #noResultMessage,
    #noResultMessage {
        margin-top: 25rem !important;

        h2 {
            font-size: 1.5rem !important;

            i {
                font-size: 1.4rem;
            }
        }

        p {
            font-size: 1.2rem !important;
        }
    }

    .video-grid,
    #videoGrid,
    #controlsPanel,
    .page-header {
        padding: 0rem 0.3rem !important;
    }

    #controlsPanel {
        margin: 1rem 0rem !important;
    }

    .page-header {
        margin-top: 13rem !important;
    }
}

@media (max-width:576px) {
    .page-header {
        margin-top: 10rem;
    }
}

@media (max-width:400px) {
    .page-header {
        margin-top: 13rem;
    }

    header,
    #videosHead {
        padding: 1.6rem 0.5rem !important;
    }

    #videosHead {
        padding: 1.6rem 0.8rem !important;
    }
}

select {
    position: relative;
    width: 200px;
}