* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.player-wrapper {
    position: relative;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-wrapper:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

video {
    width: 100%;
    display: block;
    cursor: pointer;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    transition: all .3s ease-in-out;
}

.controls.hidden {
    transition: all .3s ease-in-out;
    bottom: -50px;
    opacity: 0;
    pointer-events: none;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    position: relative;
    transition: all .2s ease-in-out;
}

.progress-bar:hover {
    height: 15px;
}

.progress-filled {
    height: 100%;
    background: #ff0808;
    border-radius: 10px;
    transition: width 0.1s;
    position: absolute;
    z-index: 1;
}

.progress-loaded {
    height: 100%;
    background: #00000066;
    border-radius: 5px;
    transition: width 0.1s;
    position: absolute;
}


.control-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    background-color: #1a1a2e51;
    border-radius: 50%;
    border: rgba(128, 128, 128, 0.224) solid 1px;
}

button:hover {
    color: #9333ea;
}

button svg {
    width: 24px;
    height: 24px;
}

.time-display {
    color: white;
    font-size: 14px;
    min-width: 100px;
    font-weight: bold;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #ff0808;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ff0808;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.features {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    color: white;
}

.features h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.features ul {
    list-style: none;
}

.features li {
    padding: 8px 0;
    color: rgba(255,255,255,0.8);
}

.features li:before {
    content: "• ";
    color: #ff0808;
    font-weight: bold;
    margin-right: 8px;
}

/* Spinner */ 

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ea3333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Settings Menu */

.statswindow {
    position: absolute;
    top: 10px;
    left: -50px;
    opacity: 0;
    border-radius: 5px;
    background-color: #1a1a2ec7;
    color: white;
    padding: 10px;
    font-size: small;
    transition: all .2s ease-in-out;
    border: rgba(128, 128, 128, 0.224) solid 1px;
}

.statswindow hr {
    margin: 5px 0px;
    opacity: 0.5;
}

.statswindow.enabled {
    opacity: 1;
    left: 10px;
}

.settingMenu {
    position: absolute;
    background-color: #1a1a2ec7;
    right: 20px;
    bottom: 110px;
    padding: 8px;
    border-radius: 8px;
    border: rgba(128, 128, 128, 0.224) solid 1px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transform: translateY(6px);
    transition: opacity .15s ease-in-out, transform .15s ease-in-out, visibility .15s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.settingMenu .settingsValue {
    opacity: 0.7;
    margin-left: 40px;
    color: #d9d9d9;
    vertical-align: middle;
}

.settingMenu button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    vertical-align: middle;
}

.settingMenu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.settingMenu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: transparent;
    color: #ffffff;
    border-radius: 6px;
    border: none;
    text-align: left;
    height: 30px;
}

.settingMenu button:hover {
    background-color: rgba(186, 82, 255, 0.12);
    color: white;
    transition: all .12s ease-in-out;
}

.captionMenu {
    right: 70px;
}

@keyframes spin360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Spin animation used for button icons when activated */
button svg.spin {
    animation: spin360 600ms cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: 50% 50%;
}

/* Input box link */

.inputbox {
    margin-top: 20px;
    width: 100%;
    height: 40px;
    display: flex;
    gap: 10px;
}

.inputbox input {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background-color:#1c2a4f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 12px;
    color: white;
}

.inputbox button {
    width: 10%;
    background-color:#495166;
    cursor: pointer;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all .1s;
}

.inputbox button:hover {
    background-color:#6f737f;
}

/* Caption */

.captionContainer {
    position: absolute;
    bottom: 110px;
    padding: 3px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background-color: black;
    transition: all .3s ease-in-out;
    border-radius: 4px;
    display: none;
}

.captionContainer.onControlHide {
    bottom: 30px;
}

@media only screen and (max-width: 600px) {
    .controls button {
        width: 30px;
        height: 30px;
    }

    #loadedPercentage {
        display: none;
    }

    #volumeSlider {
        display: none;
    }

    .left-controls,
    .right-controls {
        gap: 3.5px;
    }

    #forwardBtn {
        display: none;
    }
}