/* =========================================================
   БАЗОВЫЕ СТИЛИ
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    background: #090b10;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 40px 34px;

    background:
        radial-gradient(
            ellipse at top,
            rgba(55, 110, 180, 0.22) 0%,
            rgba(30, 55, 95, 0.10) 28%,
            transparent 60%
        ),
        linear-gradient(
            to bottom,
            #0b1119 0%,
            #090d14 35%,
            #07090d 70%,
            #050608 100%
        );
    background-attachment: fixed;

    color: #ffffff;
    font-family: Arial, sans-serif;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;
    z-index: -1;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 12% 35%,
            rgba(38, 76, 125, 0.10),
            transparent 32%
        ),
        radial-gradient(
            circle at 88% 58%,
            rgba(117, 62, 40, 0.07),
            transparent 34%
        );

    filter: blur(20px);
}

h1 {
    margin-bottom: 40px;
    text-align: center;
}

button,
input,
select {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

form {
    margin: 0;
}

.siteEmblem {
    display: block;

    width: 120px;
    height: 120px;
    margin-top: -12px;

    object-fit: contain;
    background: transparent;

    border: none;

    box-shadow: none
    
}



/* =========================================================
   ВЕРХНЯЯ ПАНЕЛЬ И АДМИНСКИЕ ИКОНКИ
   ========================================================= */



.adminIcon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: inherit;

    text-decoration: none;
    cursor: pointer;

    transform: translateY(0) scale(1);
    transform-origin: center;

    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        opacity 0.15s ease;
}

.adminIcon img {
    display: block;
    width: 23px;
    height: 23px;
    object-fit: contain;
    pointer-events: none;
}

.adminIcon:hover {
    transform: translateY(-1px) scale(1.06);
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.85;
}

.adminIcon:active {
    transform: translateY(0) scale(0.96);
}


/* =========================================================
   ССЫЛКИ
   ========================================================= */

.socialLinks {

    display: flex;
    gap: 12px;

}

.socialLinks a {
    width: 32px;
    height: 32px;

    overflow: hidden;
    border-radius: 50%;

    background: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);

    transition: transform 0.2s ease;
}

.socialLinks a:hover {
    transform: scale(1.12);
}

.socialLinks img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   ПОИСК И ФИЛЬТРЫ
   ========================================================= */

.resetFiltersButton {

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,.03)
        );
    
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;   

    color: #d7d7d7;

    cursor: pointer;

    transition:
        transform .18s ease,
        background .18s ease,
        color .18s ease,
        border-color .18s ease;
}

.resetFiltersButton img {
    display: block;

    width: 21px;
    height: 21px;

    object-fit: contain;

    pointer-events: none;

    transition: transform 0.25s ease;
}

.resetFiltersButton:hover {
    color: #ffffff;

    border-color: rgba(120, 170, 255, 0.35);
    background: rgba(70, 110, 170, 0.18);
}


.resetFiltersButton:hover img {
    transform: rotate(-35deg);
}

.resetFiltersButton:active {
    transform: scale(0.95);
}

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin: 0 auto 40px;
}

.filters input,
.filters select,
.filters button {
    height: 44px;
    padding: 0 14px;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;

    background: rgba(18, 22, 30, 0.76);
    color: rgba(255, 255, 255, 0.92);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    font-size: 15px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.filters input {
    width: min(350px, 100%);
}

.filters select {
    min-width: 60px;
    padding-left: 14px;
    padding-right: 42px;
    cursor: pointer;
    color: rgba(255,255,255,.92);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.filters button {
    padding: 0 20px;
    background: rgba(22, 27, 37, 0.92);
    border-color: rgba(112, 163, 230, 0.13);
    font-weight: 600;
}

.filters input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.filters input:hover,
.filters select:hover {
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(24, 29, 39, 0.84);
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: rgba(91, 151, 228, 0.72);
    background: rgba(22, 27, 37, 0.92);

    box-shadow:
        0 0 0 3px rgba(65, 129, 215, 0.15),
        0 10px 28px rgba(0, 0, 0, 0.26);
}

.filters button:hover {
    background: rgba(64, 113, 178, 0.88);
    border-color: rgba(135, 183, 241, 0.42);
}

.filters button:active {
    transform: translateY(1px);
}


/* =========================================================
   СЕТКА ФИЛЬМОВ
   ========================================================= */

.movies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    align-items: start;
    justify-content: center;
}

.card {
    position: relative;

    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    padding-bottom: 15px;

    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;

    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.10),
        rgba(255, 255, 255, 0.035)
    );

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);

    text-align: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.22);

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.card::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 105px;

    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0),
        rgba(10, 10, 10, 0.22)
    );

    pointer-events: none;
}

.card h3,
.card .addedDate {
    position: relative;
    z-index: 1;
}

.card h3 {
    margin: 14px 14px 0px;
    min-height: 54px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.45;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.addedDate {
    min-height: 18px;
    margin: 0 12px 13px;

    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}


/* =========================================================
   ПОСТЕР И ПЛАШКИ
   ========================================================= */

.poster {
    position: relative;
    z-index: 1;

    width: 100%;
    aspect-ratio: 2 / 3;

    overflow: hidden;
    background: #2b2b2b;
}

.poster a {
    display: block;
    width: 100%;
    height: 100%;
}

.poster img,
.card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.posterRating,
.posterYear {
    position: absolute;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 24px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;

    background: rgba(15, 15, 15, 0.72);

    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);

    font-size: 12px;
    line-height: 1;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);

    pointer-events: none;
}

.posterRating {
    bottom: 10px;
    min-width: 34px;
    padding: 0 7px;
    font-weight: 700;
}

.posterRatingUser {
    left: 10px;
}

.posterRatingKp {
    right: 10px;
    color: #ffd54a;
}

.posterYear {
    top: 10px;
    left: 10px;
    min-width: 42px;
    padding: 0 8px;
    color: #ffffff;
    font-weight: 600;
}

.rating1  { color: #b71c1c; }
.rating2  { color: #c62828; }
.rating3  { color: #d84315; }
.rating4  { color: #ef6c00; }
.rating5  { color: #f9a825; }
.rating6  { color: #c0ca33; }
.rating7  { color: #6b9143; }
.rating8  { color: #72aa36; }
.rating9  { color: #72bb24; }
.rating10 { color: #81f704; }

.deleteButton {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: rgba(20, 20, 20, 0.78);
    color: #ffffff;

    font-size: 22px;
    line-height: 1;

    opacity: 0;

    transition:
        opacity 0.2s ease,
        background 0.15s ease,
        transform 0.15s ease;
}

.poster:hover .deleteButton {
    opacity: 1;
}

.deleteButton:hover {
    background: rgba(190, 35, 35, 0.95);
    transform: scale(1.08);
}


/* =========================================================
   МОДАЛЬНЫЕ ОКНА ВХОДА И ДОБАВЛЕНИЯ ФИЛЬМА
   ========================================================= */

.modal {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 1000;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(4, 6, 10, 0.70);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.loginModalContent {
    width: 320px;
    max-width: 100%;
    padding: 26px;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;

    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.09),
        rgba(255, 255, 255, 0.035)
    );

    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#addMovieModal .modal-content {
    width: 340px;
}

.loginModalContent form {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loginModalContent input {
    display: block;
    width: 100%;
    height: 46px;

    padding: 0 14px;
    margin: 0;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;

    background: rgba(18, 22, 30, 0.78);
    color: #ffffff;

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    font-size: 15px;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.loginModalContent input::placeholder {
    color: rgba(255, 255, 255, 0.40);
}

.loginModalContent input:focus {
    outline: none;
    border-color: rgba(93, 150, 230, 0.75);
    background: rgba(18, 22, 30, 0.92);
    box-shadow: 0 0 0 3px rgba(70, 130, 220, 0.18);
}

.loginModalContent form > button[type="submit"],
.closeButton {
    display: block;
    width: 100%;
    height: 40px;

    padding: 0 14px;
    margin: 0;

    border-radius: 6px;

    color: #ffffff;
    font-size: 15px;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.loginModalContent form > button[type="submit"] {
    border: none;
    background: rgba(34, 67, 110, 0.82);
    font-weight: 600;
}

.loginModalContent form > button[type="submit"]:hover {
    background: rgba(65, 112, 178, 0.92);
}

.closeButton {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: transparent;
    color: #d8d8d8;
}

.closeButton:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.loginModalContent form > button[type="submit"]:active,
.closeButton:active {
    transform: translateY(1px);
}

/* Автозаполнение пароля в Chrome без изменения дизайна поля. */
#loginModal input[type="password"]:-webkit-autofill,
#loginModal input[type="password"]:-webkit-autofill:hover,
#loginModal input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px rgba(18, 22, 30, 0.98) inset;
    box-shadow: 0 0 0 1000px rgba(18, 22, 30, 0.98) inset;
}


/* =========================================================
   ВЫБОР ОЦЕНКИ В ОКНЕ ДОБАВЛЕНИЯ
   ========================================================= */

#ratingButtons {
    width: 100%;
    margin: 10px 0 18px;

    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

.loginModalContent form .ratingStar {
    width: 28px;
    height: 32px;
    min-width: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 0;

    background: transparent;
    color: #777777;

    font-size: 28px;
    line-height: 1;

    box-shadow: none;
    transform: none;
}

.loginModalContent form .ratingStar:hover {
    background: transparent;
    color: #f5c518;
    transform: scale(1.15);
}

.loginModalContent form .ratingStar.selected {
    background: transparent;
    color: #f5c518;
}


/* =========================================================
   МОДАЛЬНОЕ ОКНО ПОИСКА ФИЛЬМА (СТАРЫЙ #modal)
   ========================================================= */

#modal {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 1000;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.75);
}

#modal-content {
    width: 700px;
    max-width: 100%;
    max-height: 80vh;

    overflow-y: auto;

    padding: 25px;

    border-radius: 12px;

    background: #202020;
    color: #ffffff;

    box-shadow: 0 0 30px rgba(0, 0, 0, 0.50);
}

#movieSearch {
    width: 100%;
    padding: 12px;
    margin: 15px 0 20px;

    border: none;
    border-radius: 8px;

    font-size: 18px;
}

#searchResults {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 10px;

    border-radius: 10px;
    background: #2a2a2a;
}

.search-item img {
    width: 60px;
    border-radius: 6px;
}

.search-info {
    flex: 1;
}

.search-title {
    font-size: 18px;
    font-weight: 700;
}

.search-year {
    color: #999999;
}

.add-button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #2ecc71;
    font-size: 16px;
}

#previewPoster {
    width: 180px;
    margin-bottom: 20px;
    border-radius: 12px;
}

#previewTitle {
    margin: 10px 0;
}

#previewGenres {
    margin: 15px 0;
    color: #999999;
}

#closeButton {
    margin-top: 20px;
}


/* =========================================================
   ЗАСТАВКА ПЕРЕД ВХОДОМ
   ========================================================= */

#introScreen {
    position: fixed;
    inset: 0;
    z-index: 10000;

    overflow: hidden;
    cursor: pointer;

    background: #050608;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 2.45s ease,
        visibility 0s linear 2.45s;
}

#introScreen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#introScreen img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transform: scale(1);
    filter: blur(0);

    transition:
        transform 1.65s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.45s ease,
        opacity 1.45s ease;
}

#introScreen.is-hidden img {
    transform: scale(2.075);
    filter: blur(12px);
    opacity: 0.42;
}

.introOverlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    box-sizing: border-box;
    padding: 40px;

    background:
        linear-gradient(
            to bottom,
            rgba(2, 5, 10, 0.04),
            rgba(2, 5, 10, 0.30) 58%,
            rgba(2, 5, 10, 0.78) 100%
        );

    transition:
        background 1.45s ease,
        opacity 1.1s ease;
}

#introScreen.is-hidden .introOverlay {
    background: rgba(2, 5, 10, 0.88);
    opacity: 0;
}

.introHint {
    padding: 12px 20px;

    border-radius: 12px;

    background: rgba(20, 20, 20, 0.65);
    color: #ffffff;

    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);

    font-size: 18px;
    font-weight: 600;

    animation: introPulse 1.8s ease-in-out infinite;
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;

}

#introScreen.is-hidden .introHint {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    animation: none;
}

@keyframes introPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

body.intro-open {
    overflow: hidden;
}

html.intro-already-shown #introScreen {
    display: none !important;
}


/* =========================================================
   АДАПТИВНОСТЬ
   ========================================================= */

@media (max-width: 700px) {
    body {
        padding: 28px 16px 36px;
    }

    .socialLinks {
        left: 16px;
    }

    .header {
        right: 16px;
    }

    .filters {
        align-items: stretch;
        gap: 10px;
    }

    .filters input,
    .filters select,
    .filters button {
        width: 100%;
        min-width: 0;
    }

    .movies {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .modal {
        padding: 14px;
    }

    .loginModalContent {
        padding: 22px;
    }
}

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


/* =========================================================
   ДЛЯ СТРЕЛКИ
   ========================================================= */

.selectWrapper {
    position: relative;
    display: inline-block;

}

.selectArrow {
    position: absolute;
    right: 16px;
    top: 40%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.55);
    font-size: 18px;
    pointer-events: none;
    transition: .18s;

}

.selectWrapper:hover .selectArrow {
    color: rgba(255,255,255,.92);

}





/* ===== Единая верхняя панель ===== */

.topBar {
    position: relative;
    z-index: 20;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px;

    width: 100%;
    box-sizing: border-box;

    margin-top: 20px;
    margin-bottom: 16px;
}

.topBarBrand {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.siteEmblem {
    display: block;

    width: 110px;
    height: 110px;

    object-fit: contain;

    border: none;
    background: transparent;
    box-shadow: none;

    filter: drop-shadow(
        0 0 6px rgba(255, 180, 40, 0.24)
    );
}

.topBarFilters {
    align-self: start;

    margin: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    min-width: 0;
}

.topBarRight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.socialLinks {
    position: static;

    display: flex;
    gap: 8px;
}

.adminButtons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ===== для мобилок ===== */

@media (max-width: 900px) {
    .topBar {
        grid-template-columns: auto 1fr auto;
        gap: 14px;
    }

    .topBarFilters {
        justify-content: stretch;
    }

    .topBarFilters input {
        width: 100%;
        flex-basis: 100%;
    }

    .topBarFilters .selectWrapper {
        flex: 1 1 130px;
    }

    .topBarFilters .selectWrapper select {
        width: 100%;
    }
}

@media (max-width: 700px) {
    body {
        padding: 18px 16px 30px;
    }

    .topBar {
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 14px 12px;

        margin-bottom: 26px;
    }

    .topBarBrand {
        grid-column: 1;
        grid-row: 1;
    }

    .topBarRight {
        grid-column: 2;
        grid-row: 1;
    }

    .topBarFilters {
        grid-column: 1 / -1;
        grid-row: 2;

        width: 100%;
    }

    .topBarFilters input,
    .topBarFilters .selectWrapper,
    .topBarFilters button {
        width: 100%;
        flex-basis: 100%;
    }

    .siteEmblem {
        width: 42px;
        height: 42px;
    }

    .socialLinks a {
        width: 28px;
        height: 28px;
    }

    .adminIcon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}

/* ===== страничка not found ===== */

.notFound {

    grid-column: 1 / -1;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 40px 20px;
}

.notFound img {

    width: 100%;
    max-width: 720px;

    height: auto;

    opacity: .95;

    user-select: none;
    pointer-events: none;

    animation: notFoundAppear 10.45s ease;
}

@keyframes notFoundAppear {

    from {

        opacity: 0;
        transform: translateY(15px) scale(.98);

    }

    to {

        opacity: .96;
        transform: translateY(0) scale(1);

    }

}


/* ===== Страница 404 ===== */

.errorPage {
    min-height: 100vh;
    margin: 0;
    padding: 24px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
}

.errorPageContent {
    width: min(100%, 760px);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    animation: errorPageAppear 0.45s ease;
}

.errorPageImage {
    display: block;

    width: min(90vw, 680px);
    height: auto;

    object-fit: contain;

    user-select: none;
    pointer-events: none;
}

.errorCode {
    margin-top: -10px;

    color: rgba(255, 210, 80, 0.9);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: 6px;
}

.errorHomeButton {
    margin-top: 22px;
    padding: 12px 22px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;

    background: rgba(18, 22, 30, 0.76);
    color: rgba(255, 255, 255, 0.92);

    text-decoration: none;
    font-weight: 600;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.errorHomeButton:hover {
    background: rgba(45, 75, 115, 0.82);
    border-color: rgba(125, 170, 230, 0.38);

    transform: translateY(-2px);
}

@keyframes errorPageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    .errorPage {
        padding: 16px;
    }

    .errorPageImage {
        width: 100%;
    }
}


/* ===== Подтверждение удаления ===== */

.confirmModal {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;

    background: rgba(3, 5, 9, 0.76);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0s linear 0.2s;
}

.confirmModal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition-delay: 0s;
}

.confirmModalContent {
    width: min(100%, 390px);
    padding: 28px;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.09),
            rgba(255, 255, 255, 0.035)
        ),
        rgba(14, 18, 25, 0.92);

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);

    text-align: center;

    transform: translateY(12px) scale(0.97);

    transition: transform 0.2s ease;
}

.confirmModal.is-visible .confirmModalContent {
    transform: translateY(0) scale(1);
}

.confirmModalContent h2 {
    margin: 0 0 12px;

    color: #ffffff;
    font-size: 24px;
}

.confirmModalContent p {
    margin: 0;

    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    line-height: 1.5;
}

.confirmModalActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    margin-top: 24px;
}

.confirmModalActions button {
    height: 44px;

    border-radius: 10px;

    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.confirmCancelButton {
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.045);
}

.confirmCancelButton:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.confirmDeleteButton {
    border: 1px solid rgba(235, 85, 85, 0.36);
    background: rgba(174, 42, 42, 0.88);
}

.confirmDeleteButton:hover {
    background: rgba(205, 50, 50, 0.96);
    border-color: rgba(255, 120, 120, 0.5);
}

.confirmModalActions button:active {
    transform: translateY(1px);
}


/* ===== Всплывающие уведомления ===== */

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 4000;

    min-width: 240px;
    max-width: min(90vw, 440px);

    padding: 13px 18px;

    box-sizing: border-box;

    border: 1px solid rgba(110, 220, 145, 0.28);
    border-radius: 12px;

    background: rgba(18, 36, 27, 0.94);
    color: rgba(240, 255, 245, 0.96);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    text-align: center;
    font-size: 15px;
    font-weight: 600;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, -14px);

    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0s linear 0.22s;
}

.toast.is-visible {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, 0);

    transition-delay: 0s;
}

.toast.is-error {
    border-color: rgba(235, 85, 85, 0.35);
    background: rgba(57, 21, 24, 0.95);
    color: rgba(255, 235, 235, 0.96);
}

.card.is-removing {
    opacity: 0;
    transform: scale(0.94);
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

@media (max-width: 520px) {
    .confirmModalActions {
        grid-template-columns: 1fr;
    }

    .confirmCancelButton {
        order: 2;
    }

    .confirmDeleteButton {
        order: 1;
    }
}

/* =========================================================
   страничка игр
   ========================================================= */

/* ===== страничка игр ===== */

#gameSearchResults {
    display: flex;
    flex-direction: column;
    gap: 8px;

    width: 100%;

    margin: 10px 0;
}

.gameSearchResult {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px;

    border: none;
    border-radius: 10px;

    background: #303030;
    color: #fff;

    cursor: pointer;
    text-align: left;
}

.gameSearchResult:hover {
    background: #3a3a3a;
}

.gameSearchResult img {
    width: 60px;
    height: 80px;

    object-fit: cover;

    border-radius: 7px;
}

.gameSearchResultInfo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selectedGame {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px;

    border-radius: 10px;

    background: #303030;
    color: #fff;
}

.selectedGame img {
    width: 70px;
    height: 95px;

    object-fit: cover;

    border-radius: 8px;
}

#gameRatingButtons {
    width: 100%;
    margin: 10px 0 18px;

    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

/* ===== карточки игр ===== */

.gamesPage .movies {
    grid-template-columns: repeat(
        auto-fill,
        minmax(270px, 1fr)
    );

    gap: 24px;
}

.gamesPage .card {
    width: 100%;
    max-width: 290px;
    height: 340px;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.gamesPage .gameDates {
    margin-top: auto;
    padding: 0 12px 14px;

    text-align: center;
}

.gamesPage .gameDates .addedDate {
    margin: 0;
    padding: 0;
}

.gamesPage .gameAddedDate {
    margin-top: 4px !important;

    opacity: 0.65;
    font-size: 12px;
}


.gamesPage .card h3 {
    height: auto;
    min-height: 22px;

    margin: 14px 14px 7px;

    font-size: 16px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
}

.gamesPage .gameGenres {
    min-height: 18px;

    margin: 0 12px 8px;

    color: rgba(255, 255, 255, 0.52);

    font-size: 13px;
    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gamesPage .gamePoster {
    position: relative;

    width: 100%;
    height: 190px;
    aspect-ratio: auto;

    overflow: hidden;

    background: #0b0e13;
}


/* Размытая копия постера на заднем плане */

.gamesPage .gamePosterBackground {
    position: absolute;
    inset: -20px;

    z-index: 0;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    filter:
        blur(18px)
        brightness(0.55)
        saturate(0.9);

    transform: scale(1.12);
}


/* Лёгкое затемнение размытого фона */

.gamesPage .gamePoster::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    background: rgba(5, 7, 10, 0.12);

    pointer-events: none;
}


/* Полный постер поверх размытого фона */

.gamesPage .gamePosterForeground {
    position: relative;

    z-index: 2;

    display: flex;

    width: 100%;
    height: 100%;

    align-items: center;
    justify-content: center;

    padding: 8px;

    box-sizing: border-box;
}


/* Само изображение */

.gamesPage .gamePosterForeground img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    border-radius: 6px;

    filter:
        drop-shadow(
            0 5px 12px rgba(0, 0, 0, 0.45)
        );
}


/* Год, рейтинги и корзина должны быть поверх постера */

.gamesPage .gamePoster .posterYear,
.gamesPage .gamePoster .posterRating,
.gamesPage .gamePoster .deleteButton {
    z-index: 4;
}

/* =========================================================
   главная
   ========================================================= */


.homePage {
    min-height: 100vh;
}

.sectionChoice {
    width: min(1580px, calc(100% - 80px));

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 28px;

    align-items: center;

    padding: 55px 0 40px;

    box-sizing: border-box;
}

.sectionChoiceCard {
    position: relative;

    min-height: 520px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;

    overflow: hidden;

    background: #11151c;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    color: #ffffff;
    text-decoration: none;

    transform: translateY(0) scale(1);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.sectionChoiceImage {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}

.sectionChoiceImageFilms {
    object-position: center 25%;
}

.sectionChoiceOverlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(4, 7, 12, 0.92) 0%,
            rgba(4, 7, 12, 0.35) 42%,
            rgba(4, 7, 12, 0.05) 75%
        );

    transition:
        background 0.3s ease;
}

.sectionChoiceText {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2;

    padding: 34px;

    text-align: center;
}

.sectionChoiceTitle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 24px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;

    background: rgba(10, 14, 20, 0.58);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    color: rgba(255, 255, 255, 0.94);

    font-size: 28px;
    font-weight: 600;
    line-height: 1;

    letter-spacing: 0.06em;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.65);
}

.sectionChoiceSubtitle {
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 13px;
    font-weight: 400;

    letter-spacing: 0.03em;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.8);
}

.sectionChoiceCard:hover {
    transform: translateY(-6px) scale(1.01);

    border-color: rgba(255, 255, 255, 0.25);

    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(70, 120, 190, 0.08);
}

.sectionChoiceCard:hover .sectionChoiceImage {
    transform: scale(1.04);
    filter: brightness(1.06);
}



.sectionChoiceSubtitle {
    margin-top: 12px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 15px;
}

@media (max-width: 800px) {

    .sectionChoice {
        grid-template-columns: 1fr;

        padding: 18px;

        gap: 18px;
    }

    .sectionChoiceCard {
        min-height: 420px;
    }

    .sectionChoiceTitle {
        font-size: 34px;
    }

    .sectionChoiceText {
        padding: 26px;
    }

}




.sectionChoice {
    padding-top: 110px;
}

/* ========================================
   HOME HEADER
======================================== */

.homeHeader {
    width: min(1580px, calc(100% - 80px));

    margin: 0 auto;

    padding-top: 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;
}


/* Левая часть */

.homeBrand {
    display: flex;
    align-items: center;

    gap: 28px;

    transform: translateX(-12px);
}


/* Логотип */

.homeLogo {
    width: 120px;
    height: 120px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}

.homeLogo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.homeLogo:hover {
    transform: scale(1.05);

    filter:
        brightness(1.08)
        drop-shadow(
            0 0 10px rgba(222, 146, 35, 0.22)
        );
}


/* Название + подпись */

.homeBrandText {
    display: flex;
    flex-direction: column;

    justify-content: center;
}


.homeSiteTitle {
    color: #d99a32;

    font-family: "Exo 2", sans-serif;

    font-size: 48px;
    font-weight: 300;
    line-height: 1;

    letter-spacing: 0.055em;

    text-shadow:
        0 0 18px rgba(217, 154, 50, 0.12);
}


/* Фильмы • Игры • Страсть */

.homeTagline {
    margin-top: 15px;

    display: flex;
    align-items: center;

    gap: 12px;

    color: rgba(255, 255, 255, 0.48);

    font-size: 14px;
    font-weight: 400;

    letter-spacing: 0.055em;
}

.homeTagline i {
    width: 3px;
    height: 3px;

    display: block;

    border-radius: 50%;

    background: #d69223;

    box-shadow:
        0 0 6px rgba(214, 146, 35, 0.55);
}


/* Правая часть — соцсети */

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

.homeSocialButton {
    height: 48px;
    min-width: 60px;

    padding: 0 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.025)
        ),
        rgba(10, 14, 20, 0.58);

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    text-decoration: none;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    opacity: 0.78;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;

    
}

.homeSocialButton img {
    display: block;

    width: 24px;
    height: 24px;

    object-fit: contain;

    opacity: 0.85;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.homeSocialButton:hover {
    opacity: 1;

    transform: translateY(-3px);

    border-color: rgba(217, 154, 50, 0.38);

    background:
        linear-gradient(
            145deg,
            rgba(217, 154, 50, 0.10),
            rgba(255, 255, 255, 0.025)
        ),
        rgba(10, 14, 20, 0.72);

    box-shadow:
        0 9px 25px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(217, 154, 50, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.homeSocialButton:hover img {
    transform: scale(1.08);
    opacity: 1;
}

.homeSocialButton:active {
    transform: translateY(-1px) scale(0.97);
}

.homeSocialButton.telegram:hover {
    border-color: rgba(42, 171, 238, 0.5);

    box-shadow:
        0 8px 24px rgba(42, 171, 238, 0.16);
}


.homeSocialButton.twitch:hover {
    border-color: rgba(145, 70, 255, 0.5);

    box-shadow:
        0 8px 24px rgba(145, 70, 255, 0.16);
}


.homeSocialButton.youtube:hover {
    border-color: rgba(255, 50, 50, 0.5);

    box-shadow:
        0 8px 24px rgba(255, 50, 50, 0.16);
}


.homeSocialButton.boosty:hover {
    border-color: rgba(245, 137, 35, 0.5);

    box-shadow:
        0 8px 24px rgba(245, 137, 35, 0.16);
}

@media (max-width: 800px) {

    /* ===== главная страница ===== */

    .homeHeader {
        width: calc(100% - 28px);

        margin: 0 auto;
        padding-top: 18px;

        box-sizing: border-box;

        flex-direction: column;
        align-items: flex-start;

        gap: 18px;
    }


    .homeBrand {
        width: 100%;

        gap: 14px;

        transform: none;
    }


    .homeLogo {
        width: 76px;
        height: 76px;
    }


    .homeSiteTitle {
        font-size: 28px;
        letter-spacing: 0.03em;
    }


    .homeTagline {
        margin-top: 8px;

        gap: 7px;

        font-size: 11px;
    }


    /* Соцсети */

    .homeSocialLinks {
        width: 100%;

        display: flex;
        justify-content: flex-start;

        gap: 8px;
    }


    .homeSocialButton {
        min-width: 48px;
        height: 40px;

        padding: 0 12px;
    }


    .homeSocialButton img {
        width: 21px;
        height: 21px;
    }


    /* ===== Фильмы / Игры ===== */

    .sectionChoice {
        width: calc(100% - 28px);

        margin: 0 auto;

        grid-template-columns: 1fr;

        gap: 16px;

        padding: 30px 0 28px;

        box-sizing: border-box;
    }


    .sectionChoiceCard {
        width: 100%;
        min-width: 0;

        min-height: 300px;

        border-radius: 18px;
    }


    .sectionChoiceImage {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }


    .sectionChoiceText {
        padding: 22px;
    }


    .sectionChoiceTitle {
        padding: 9px 18px;

        font-size: 22px;
    }


    .sectionChoiceSubtitle {
        font-size: 12px;
    }

}