body {
    background-color: black;
    font-family: sans-serif;
    padding: 40px;
    margin: auto;
}

video {
    width: 100%;
}

.range-container {
    position: relative;
    height: 40px;
}

.range-container input[type=range] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    background: transparent;
}

.range-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 50px;
    background: white;
    border: 2px solid black;
    /* border-radius: 50%; */
    cursor: pointer;
    pointer-events: all;
    margin-top: -7px;
    /* transition: transform 0.2s ease; */
}

.range-container input[type=range]::-moz-range-thumb {
    width: 10px;
    height: 50px;
    background: white;
    border: 2px solid black;
    /* border-radius: 50%; */
    cursor: pointer;
    pointer-events: all;
    /* transition: transform 0.2s ease; */
}

.highlight-bar {
    position: absolute;
    height: 40px;
    /* background: white; */
    top: 80%;
    /* transform: translateY(-50%); */
    /* border-radius: 30px; */
    border: 2px solid #2da0ec;
    z-index: 0;
}

.highlight-bar.disabled {
    background: #e6e6e6;
    opacity: 0.6;
}

.loop-toggle {
    background: transparent;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    z-index: 10;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.loop-toggle input[type="checkbox"] {
    width: 80px;
    height: 40px;
    appearance: none;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.loop-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 20%;
    top: 3px;
    left: 3px;
    background: white;
    transition: 0.3s;
}

.loop-toggle input[type="checkbox"]:checked {
    background: #2da0ec;
}

.loop-toggle input[type="checkbox"]:checked::before {
    transform: translateX(40px);
}

.video-wrapper {
    position: relative;
    width: 100%;
    /* transition: opacity 0.3s ease; */
}

.custom-controls {
    /* position: absolute; */
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    /* transition: opacity 0.3s ease; */
    padding: 10px;
    /* background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent); */
    z-index: 10;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.controls-title {
    color: #0eb0d4;
    margin: 0;
    font-size: clamp(1rem, 5vw, 2rem);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-label {
    display: none;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-wrapper:hover .custom-controls {
    opacity: 1;
    pointer-events: auto;
}

.video-wrapper:focus-within .custom-controls {
    opacity: 1;
    pointer-events: auto;
}

/* .video-wrapper.playing:not(:hover):not(:focus-within) .custom-controls {
opacity: 0;
pointer-events: none;
} */

.video-wrapper:not(.playing) .custom-controls {
    opacity: 1;
    pointer-events: auto;
}

.video-wrapper:hover .custom-controls,
.video-wrapper:focus-within .custom-controls {
    opacity: 1;
    pointer-events: auto;
}

.video-wrapper.fullscreen .custom-controls {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#startRange,
#endRange {
    top: 20px;
}

#startRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 80px;
    width: 80px;
    background-color: black;
    background-image: url('../img/start.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

#endRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 80px;
    width: 80px;
    background-color: black;
    background-image: url('../img/end.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

#startRange::-moz-range-thumb {
    height: 80px;
    width: 80px;
    background-color: black;
    background-image: url('../img/start.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

#endRange::-moz-range-thumb {
    height: 80px;
    width: 80px;
    background-color: black;
    background-image: url('../img/end.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

#dragHandle {
    position: absolute;
    top: -50px;
    width: 100px;
    height: 50px;
    background: url('../img/scroll.png') center center no-repeat;
    background-size: 84px;
    border-radius: 10px;
    cursor: grab;
    z-index: 3;
    left: -50px;
    margin: 20px 0;
}

#logo {
    width: 100%;
    text-align: center;
}

.logo-img {
    width: 50%;
}

input[type="search"] {
    background-color: black;
    border: 2px solid rgb(158 48 255);
    color: rgb(45, 160, 236);
    width: 100%;
    height: 100px;
    padding: 20px;
    font-size: 40px;
    margin: 20px 0;
    border-radius: 10px;
}

#nameList {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 10px;
}

.name {
    color: rgb(45, 160, 236);
    display: block;
    flex: 1 1 calc(50% - 40px);
    max-width: 420px;
    text-align: center;
    background: black;
    border: 2px solid rgb(158 48 255);
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.name:hover {
    transform: scale(1.03);
    color: rgb(158, 48, 255);
}

.name img.name-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 12px;
}

.name div {
    font-size: 30px;
    font-weight: bold;
    color: inherit;
    text-transform: uppercase;
}

::placeholder {
    color: #0eb0d4;
    opacity: 1;
}

::-ms-input-placeholder {
    color: #0eb0d4;
}

.back {
    width: 31px;
    vertical-align: middle;
}

#starList {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 10px;
}

#starTitle {
    color: #0eb0d4;
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    font-size: 50px;
}

.star-label {
    display: none;
    font-size: 40px;
    font-weight: bold;
    color: #0eb0d4;
    text-transform: uppercase;
}

.star-back {
    float: left;
    margin-top: -14px;
    width: 38px;
}

.star-arrow {
    position: relative;
}

.star-arrow a {
    position: absolute;
    top: -8px;
}

.card-link {
    text-decoration: none;
}

.profile-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.profile-card {
    color: rgb(45, 160, 236);
    display: block;
    flex: 1 1 calc(50% - 40px);
    max-width: 420px;
    text-align: center;
    background: black;
    border: 2px solid rgb(158 48 255);
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.profile-card:hover {
    transform: scale(1.03);
}

.profile-card:hover .star-label {
    color: rgb(158, 48, 255);
}

.profile-image {
    width: 100%;
    border-radius: 6px;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: rgb(158, 48, 255);
    font-weight: bold;
}

.play-pause-btn {
    height: 70px;
    background: transparent;
    border: none;
}

.play-pause-btn img {
    height: 70px;
}

.fullscreen-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    display: flex;
    align-items: center;
    padding: 5px;
}

.fullscreen-btn img {
    width: 50px;
}

#year {
    font-size: 16px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    z-index: 9999;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: black;
    padding: 2rem;
    border: 2px solid rgb(158 48 255);
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.modal-text {
    color: rgb(45, 160, 236);
    font-size: 5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.modal-button {
    font-size: 1.5rem;
    background-color: rgb(158 48 255);
    color: black;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    width: 60px;
    height: 60px;
    align-items: center;
}

.modal-button:hover {
    background-color: rgb(45, 160, 236);
}

@keyframes fadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

footer {
    position: relative;
    color: rgb(45, 160, 236);
    bottom: -35px;
    width: 100%;
    text-align: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .name {
        flex: 1 1 100%;
    }
}
