﻿* {
    box-sizing: border-box
}

        /*ANIMATED BACKGROUND GRADIENT*/
body {
    background: linear-gradient(219deg, #039fec, #cf5dea, #ff7743);
    background-size: 400% 400%;    
    -webkit-animation: AnimationName 16s ease infinite;
    -moz-animation: AnimationName 16s ease infinite;
    animation: AnimationName 16s ease infinite;
    /*min-height: 100vh;*/
    /*display: grid;*/
    /*place-content: center;*/
}

        @-webkit-keyframes AnimationName {
            0% {background-position: 0% 50%}
            50% {background-position: 100% 50%}
            100% {background-position: 58% 0%}
        }
        @-moz-keyframes AnimationName {
            0% {background-position: 0% 50%}
            50% {background-position: 100% 50%}
            100% {background-position: 0% 50%}
        }
        @keyframes AnimationName {
            0% {background-position: 0% 50%}
            50% {background-position: 100% 50%}
            100% {background-position: 0% 50%}
        }

/*CARD*/
:root {
    --color1: #00576073;
    --color2: #99c8cd63;
    --color3: #fefefe69;
    --color4: #2d8f85;
    --color5: #637c54;
    --light: #d8dbe0;
    --dark: #28292c;
    --borderRad: 2rem;
    --border-gap: -.8rem;
    --switch-width: 6rem;
}

.header {
    background-color: rgba(255, 255, 255, .1);
    height: 4em;
    box-shadow: 1px 2px 4px rgba(0,0,0,.1);
}

#buttonContainer {
    width:50vw;
    margin:auto;
    display:grid;
    grid-template-columns:50% 50%;
    padding:3rem 0
}


.card {
    position: relative;
    text-align: center;
    color: #fff;
    font-size: 2rem;
    border-radius: var(--borderRad);
    background-color: rgba(255, 255, 255, .1);
    transition: all .3s;
    padding: 2em;
    min-width: 64vw;
    max-width: 88vw;
    margin: 1em auto;
    right: 0px;
    transition: right .3s ease;
    box-shadow: 1px 2px 4px rgba(0,0,0,.1);
}

/* ANIMATION LINES */


    .card:before {
        content: "";
        position: absolute;
        top: var(--border-gap);
        left: var(--border-gap);
        right: var(--border-gap);
        bottom: var(--border-gap);
        border: 3px solid var(--color3);
        transition: all .5s;
        animation: clippath 16s infinite linear;
        border-radius: calc(var(--borderRad) - var(--border-gap));
        z-index: -100;
    }

    .card:after {
        content: "";
        position: absolute;
        top: var(--border-gap);
        left: var(--border-gap);
        right: var(--border-gap);
        bottom: var(--border-gap);
        border: 3px solid var(--color3);
        transition: all .5s;
        animation: clippath 16s infinite -8 linear;
        border-radius: calc(var(--borderRad) - var(--border-gap));
        z-index: -100;
    }


    .card:after {
        animation: clippath 16s infinite -8s linear;
        z-index: -100;
    }

@keyframes clippath {
    0%, 100%    {clip-path: inset(0 0 98% 0);}
    25%         {clip-path: inset(0 98% 0 0);}
    50%         {clip-path: inset(98% 0 0 0);}
    75%         {clip-path: inset(0 0 0 98%);}
}

.container {
    max-width: 67vw;
    background-color: #11181f;
    border-radius: 6px;
    align-content: center;
}

button {
    background: none;
    border: none;
    padding: 0;
}

.button {
    position: relative;
    bottom: 0px;
    background-color: #c5f1e938;
    border: .2rem solid #ffffff80;
    border-radius: .6rem;
    color: white;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: 12px 12px;
    cursor: pointer;
    z-index:5;
    font-size: 3rem; 
    transition: all .5s;
}

    .button:hover {
        background-color: #ffffff80;
        border: .2rem solid #ffffff;
    }

#mediaplayer {
    position: relative;
    padding-top: 12px;
    text-align: center;
}

video, input {
    display: block;
    width: 80vw;
    margin: 10px auto 0px auto;
}

input {
    width: 100%;
    position: relative;
    display: block;    
}

    /*REPLACE INPUT BUTTON */
    input[type="file"] {
        display: none;
    }

#skipButtons {
    width: 40vw;
    margin: auto;
    display: grid;
    grid-template-columns: 30% 40% 30%;
    padding: 3rem 0;
}


.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}



li > button {
    margin: 12px;
}

.item {

    display: grid;
    grid-template-columns: 70% 6% 18% 6%;
    grid-template-rows: 32px;
    width: 99%;
    align-items: center;
    font-size: 1.5rem;
    z-index: 1;

    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    cursor: move;
}

    .item > div {
        position: relative;
        padding: 4px;
        text-align: center;
        color: white;
        z-index: 2;
        pointer-events: auto;
    }

    .item:hover {
        background-color: #7e7e7e70;
    }
.panel {
    background-color: #ffffff38;
}

.open>.dropdown-menu {
    display: block;
    min-width: auto;
    padding: 0px;
    margin: 0px 32%;
    font-size: 18px;
    background-color: #0000005e;
}

.dropdown-menu>li>a {
    line-height: 1.6;
    color: #e4e4e4;
    padding: 6px 24px;
    border-bottom: 1px black solid;
    cursor: pointer;
}
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
    color: #393939;
    text-decoration: none;
    background-color: #ffffffd9;
}

/*Dynamic bookmark datalist items*/
.playBtn {
    margin: auto;
}

.fa-play {
    margin: 2px 24px;
}

.title-container > .title {
    text-align: left;
    -webkit-user-select: none;  
    -moz-user-select: none;     
    -ms-user-select: none;      
    user-select: none;
}

.title-container {
    display: grid;
    grid-template-columns: 50px 300px;
    /*grid-template-rows: 32px;*/
    grid-column-gap: 12px;
    align-items: flex-start;
    -webkit-user-select: none;  
    -moz-user-select: none;     
    -ms-user-select: none;      
    user-select: none;
}

#edittitle_btn {
    display: flex;
    flex-direction: row-reverse;
    position: relative;
    cursor:pointer;
}

.edit-btn {
    background-color: #67676700;
    text-align: center;
    border-style: none;
    color: white;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

#edit-modal, #title-edit-modal {
    display: none;
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 1.5em;
    position: fixed;
    width: 60vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 102;
}

#editTime {
    display: inline-grid;
    grid-template-columns: 60px 60px 60px;
    /*grid-template-rows: 32px;*/
    grid-column-gap: 2em;
    align-items: flex-start;
}

.modal-btn {
    padding: 10px;
    cursor: pointer;
    background-color: #4f4d8be3;
    text-align: center;
    align-self: end;
    border-radius: 0.3em;
    font-family: monospace;
    text-transform: lowercase;
}

#black-overlay {
    display: none;
    background-color: #000000a1;
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 101;
    top: 0px;
}

.stop-scrolling {
    height: 100%;
    overflow: hidden;
}


#modal-btns {
    display: inline-grid;
    grid-template-columns: 100px 100px;
    grid-template-rows: 100px;
    grid-column-gap: 100px;
    align-items: center;
}


.toggle-switch {
    position: absolute;
    top:1.2rem;
    right:24px;
    width: var(--switch-width);
}

.toggle-switch-label {
    position: absolute;
    width: var(--switch-width);
    height: calc(var(--switch-width)/2);
    background-color: var(--dark);
    border-radius: calc(var(--switch-width)/4);
    cursor: pointer;
}

.toggle-switch-label > input {
    display: none;
}


.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--switch-width);
    transition: 0.3s;
}

input:checked ~ .slider {
    background-color: var(--light);
}

.slider::before {
    content: "";
    position: absolute;
    top: calc(var(--switch-width)*.05);
    left: calc(var(--switch-width)*.05);
    width: calc(var(--switch-width)*.4);
    height: calc(var(--switch-width)*.4);
    border-radius: var(--switch-width);
    box-shadow: inset calc(var(--switch-width)*.2) 0px 0px 0px var(--light);
    background-color: var(--dark);
    transition: 0.3s;
}

input:checked ~ .slider::before {
    transform: translateX(calc(var(--switch-width)*.5));
    background-color: var(--dark);
    box-shadow: none;
}


#collapse1 {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-content: flex-start;
    align-items: flex-start;
    -webkit-user-select: none;  
    -moz-user-select: none;     
    -ms-user-select: none;      
    user-select: none;  
}

#timeStampList {
    padding: 0 4px;
    overflow: visible;
}



/*.hovertext {
    position: relative;    
}

    .hovertext:before {
        content: attr(data-hover);
        visibility: hidden;
        opacity: 0;
        width: max-content;
        background-color: black;
        color: #fff;
        font-size:14px;
        font-weight:normal;
        text-align: center;
        border-radius: 5px;
        padding: 6px 12px;
        transition: opacity .5s ease-in-out;
        position: absolute;
        z-index: 1;
        left: 25%;
        top: 72%;
    }

    .hovertext:hover:before {
        opacity: 1;
        visibility: visible;
    }*/

/* Add these media queries at the end of your CSS file */

@media screen and (max-width: 768px) {
    /* Increase general font sizes */
    .card {
        font-size: 2rem;
        padding: 8px;
        min-width: 98vw;
        margin: auto;
        border-radius: 0;
    }
    .card:after, .card:before {
        animation: none;
        border: none;
    }   

    #buttonContainer {
        margin: 0 -12px;
        width: 100vw;
        padding: 12px;
    }
    /* Larger buttons */
    .button {
        padding: 32px;
        font-size: 4rem;
        margin: 16px;
    }

    /* Larger bookmark items */
    .item {
        font-size: 2rem;
        grid-template-rows: 48px;
        margin: 8px 0;
    }

    /* Adjust title container for larger text */
    .title-container {
        grid-template-columns: 70px 400px;
        grid-column-gap: 16px;
    }

    /* Larger play button */
    .fa-play {
        margin: 0px;
        font-size: 2rem;
    }
    .timestamp {
        font-size: 1.5rem;
    }
    /* Larger edit/remove icons */
    .fa-pencil, .fa-remove {
        font-size: 2rem;
        padding: 10px 0px !important;
    }

    /* Larger modal elements */
    #edit-modal, #title-edit-modal {
        width: 90vw;
    }

    #edit-modal input[type="text"],
    #title-edit-modal input[type="text"] {
        font-size: 2rem !important;
        padding: 0.8em !important;
    }

    #editTime {
        grid-template-columns: 90px 90px 90px;
        grid-column-gap: 1.5em;
    }

    #editTime input {
        font-size: 2.5rem !important;
        padding: 0.5em !important;
    }

    #editTime div {
        font-size: 2rem !important;
    }

    /* Larger modal buttons */
    .modal-btn {
        padding: 20px;
        font-size: 2rem;
        border-radius: 0.5em;
    }

    #modal-btns {        
        grid-column-gap: 50px;
    }

    /* Larger header elements */
    .header h1 {
        font-size: 3em !important;
    }



    /* Adjust created-at text */
    #created-at {
        font-size: 1.8rem !important;
        padding: 12px !important;
    }

    /* Adjust video player size */
    video {
        width: 100%;
    }
}

/* Additional adjustments for very small screens */
@media screen and (max-width: 480px) {
    .title-container {
        grid-template-columns: 28px 200px;
    }

    .item {
        grid-template-columns: 60% 10% 20% 10%;
    }

    #editTime {
        grid-template-columns: 70px 70px 70px;       
    }
}

#editTime input[type="number"] {
    cursor: ns-resize;
    touch-action: none; /* Prevent default touch actions */
}

/* Add visual indicator for touch devices */
@media (hover: none) {
    #editTime input[type="number"]::after {
        content: "⇅";
        position: absolute;
        right: 5px;
        opacity: 0.5;
    }
}