body{

    background:#181818;
    color:white;

    font-family:Arial, sans-serif;

    margin:30px;

}

h1{

    text-align:center;
    margin-bottom:40px;

}

.movies{

    display:grid;

    grid-template-columns:repeat(auto-fill,200px);

    gap:30px;

    justify-content:center;

}

.card{

    background:#252525;

    border-radius:12px;

    overflow:hidden;

    transition:0.2s;

    text-align:center;

    padding-bottom:15px;

}

.card:hover{

    transform:scale(1.04);

}

.card img{

    width:100%;

    display:block;

}

.card h3{

    font-size:18px;

    margin:15px 10px 5px;

}

.year{

    color:#bbbbbb;

    margin-bottom:10px;

}

.rating{

    color:#ffcc00;

    margin-bottom:6px;

}

.my-rating{

    color:#57d163;

}

form{

    text-align:center;

    margin-bottom:40px;

}

input{

    width:350px;

    padding:10px;

    border-radius:8px;

    border:none;

    font-size:16px;

}

button{

    padding:10px 18px;

    border:none;

    border-radius:8px;

    cursor:pointer;

    font-size:16px;

    margin-left:10px;

}

.filters{

    display:flex;

    justify-content:center;

    gap:15px;

    flex-wrap:wrap;

    margin-bottom:40px;

}

.filters input,
.filters select,
.filters button{

    padding:10px;

    border-radius:8px;

    border:none;

    font-size:15px;

}

.filters button{

    cursor:pointer;

}

/* Затемненный фон */
#modal {
    display: none;

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.7);

    justify-content: center;
    align-items: center;

    z-index: 1000;
}

/* Само окно */
#modal-content {
    background: #2b2b2b;

    color: white;

    padding: 30px;

    border-radius: 12px;

    width: 450px;

    box-shadow: 0 0 20px rgba(0,0,0,.5);
}

/* Поле ввода */
#movieSearch {
    width: 100%;

    padding: 10px;

    font-size: 16px;

    margin-top: 15px;

    margin-bottom: 20px;

    box-sizing: border-box;
}

/* ---------------- Модальное окно ---------------- */

#modal {
    display: none;

    position: fixed;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,.75);

    justify-content: center;
    align-items: center;

    z-index: 1000;
}

#modal-content {

    width: 700px;
    max-height: 80vh;

    overflow-y: auto;

    background: #202020;

    border-radius: 12px;

    padding: 25px;

    box-shadow: 0 0 30px rgba(0,0,0,.5);
}

#movieSearch{

    width:100%;

    padding:12px;

    font-size:18px;

    border:none;

    border-radius:8px;

    margin-bottom:20px;
}

#searchResults{

    display:flex;

    flex-direction:column;

    gap:12px;
}

.search-item{

    display:flex;

    align-items:center;

    gap:15px;

    background:#2a2a2a;

    border-radius:10px;

    padding:10px;
}

.search-item img{

    width:60px;

    border-radius:6px;
}

.search-info{

    flex:1;
}

.search-title{

    font-size:18px;

    font-weight:bold;
}

.search-year{

    color:#999;
}

.add-button{

    padding:10px 18px;

    background:#2ecc71;

    border:none;

    border-radius:8px;

    cursor:pointer;

    font-size:16px;
}
#previewPoster{

    width:180px;

    border-radius:12px;

    margin-bottom:20px;

}

#previewTitle{

    margin:10px 0;

}

#previewGenres{

    color:#999;

    margin:15px 0;

}

#ratingButtons{

    display:flex;

    flex-wrap:wrap;

    justify-content:center;

    gap:10px;

    margin-top:20px;

    margin-bottom:25px;

}

.ratingButton{

    width:45px;

    height:45px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-size:18px;

    background:#333;

    color:white;

    transition:.2s;

}

.ratingButton:hover{

    background:#4CAF50;

}

.ratingButton.selected{

    background:#4CAF50;

}
#closeButton {
    margin-top: 20px;
}

.poster {
    position: relative;
}

.poster img {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.deleteButton {

    position: absolute;

    right: 10px;
    bottom: 10px;

    width: 36px;
    height: 36px;

    border: none;
    background: transparent;

    color: white;
    font-size: 22px;

    cursor: pointer;

    text-shadow:
        0 0 8px black,
        0 0 12px black;

    opacity: 0;

    transition: opacity .2s, transform .2s, color .2s;

}

.poster:hover .deleteButton {

    opacity: 1;

}

.deleteButton:hover {

    color: #ff4040;

    transform: scale(1.2);

}

/* ---------- Верхняя панель ---------- */

.header {

    position: relative;

    display: flex;

    justify-content: center;

    align-items: center;

    margin-bottom: 30px;

}


/* ---------- Иконка администратора ---------- */

.adminIcon {

    position: absolute;

    right: 0;

    top: 50%;

    transform: translateY(-50%);

    background: transparent;

    border: none;

    font-size: 20px;

    cursor: pointer;

    text-decoration: none;

    opacity: .45;

    transition: .2s;

}

.adminIcon:hover {

    opacity: 1;

    transform: translateY(-50%) scale(1.15);

}

.adminIcon:hover {

    opacity: 1;

    transform: scale(1.12);

}


/* ---------- Окно входа ---------- */

.loginModalContent {

    width: 320px;

    text-align: center;

}

.loginModalContent input {

    width: 100%;

    box-sizing: border-box;

    margin: 20px 0;

}

/* ---------- Модальные окна ---------- */

.modal {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .6);

    justify-content: center;

    align-items: center;

    z-index: 9999;

}

.modal-content {

    background: #fff;

    border-radius: 14px;

    padding: 30px;

    width: 400px;

    box-sizing: border-box;

    text-align: center;

}

.loginModalContent {

    width: 320px;

}

.loginModalContent input {

    width: 100%;

    box-sizing: border-box;

    margin: 20px 0;

}