* {
    box-sizing: border-box;
}

:root {
    --page-background: #080c12;
    --slider-background: #0d121a;
    --accent: #65d8ff;
    --accent-secondary: #8a78ff;
    --slider-radius: 24px;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    font-family: Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(101, 216, 255, 0.1), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(138, 120, 255, 0.1), transparent 30%),
        var(--page-background);
}

button {
    font: inherit;
}

.page {
    width: min(1600px, 100%);
}

.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--slider-radius);
    background: var(--slider-background);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.slides {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.9s ease,
        visibility 0.9s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide__background,
.slide__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.slide__background {
    object-fit: cover;
    transform: scale(1.12);
    filter: blur(28px) brightness(0.48) saturate(1.15);
    opacity: 0.85;
}

.slide__image {
    z-index: 2;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.28));
    transform: scale(0.995);
    transition: transform 6s ease;
}

.slide.active .slide__image {
    transform: scale(1);
}

.progress {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.progress__bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 0 14px rgba(101, 216, 255, 0.55);
}

.control,
.pause-button {
    position: absolute;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(5, 10, 16, 0.42);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition:
        opacity 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;
}

.slider:hover .control,
.slider:hover .pause-button,
.control:focus-visible,
.pause-button:focus-visible {
    opacity: 1;
}

.control {
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transform: translateY(-50%);
    font-size: 22px;
}

.control:hover,
.pause-button:hover {
    background: rgba(8, 17, 28, 0.72);
    border-color: rgba(101, 216, 255, 0.5);
}

.control--previous {
    right: 18px;
}

.control--next {
    left: 18px;
}

.control:hover {
    transform: translateY(-50%) scale(1.06);
}

.pause-button {
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-weight: 700;
}

.pause-button:hover {
    transform: scale(1.06);
}

.dots {
    position: absolute;
    right: 50%;
    bottom: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(50%);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(5, 10, 16, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.slider:hover .dots,
.dots:focus-within {
    opacity: 1;
}

.dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition:
        width 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    width: 26px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.status {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: 25px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.status p {
    margin: 0;
    line-height: 1.8;
}

.loader {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (hover: none) {
    .control,
    .pause-button,
    .dots {
        opacity: 1;
    }
}

@media (max-width: 700px) {
    body {
        padding: 0;
    }

    .slider {
        min-height: 100svh;
        max-height: none;
        aspect-ratio: auto;
        border: none;
        border-radius: 0;
    }

    .control {
        width: 46px;
        height: 46px;
    }

    .control--previous {
        right: 12px;
    }

    .control--next {
        left: 12px;
    }

    .pause-button {
        top: 12px;
        left: 12px;
    }

    .dots {
        bottom: 14px;
        max-width: calc(100% - 110px);
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
