* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a0a0c;
    --secundary-color: #16161a;
    --accent-color: #e2b616;
    --text-color: #f2f2f2;
    --gray-color: #94a3b8;
    --color-info: #38bdf8;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--secundary-color);
}

#logoImg {
    height: 70px;
    border-radius: 30%;}

.name {
    font-size: 2rem;
    color: var(--accent-color);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    outline: none;
    width: 250px;
}

.search-btn {
    border: none;
    background-color: var(--accent-color);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover{
    transform: scale(1.05);
    transition: 0.3s;
}

.icon {
    width: 20px;
    height: 20px;
    align-items: center;
}

.search-btn:hover {
    opacity: 0.8;
}

.main-content {
    padding: 40px;
}

.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    text-align: center;
}

.movie-image{
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.movie-card{
    background-color: var(--secundary-color);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

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

.movie-info{
    padding: 15px;
}

.movie-title{
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.movie-date{
    color: var(--gray-color);
}

.footer{
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: var(--secundary-color);
}

.hidden{
    display: none !important;
}

@media(max-width: 768px){
    .header{
        flex-direction: column;
        gap: 20px;
    }
    .search-input{
        width: 100%;
    }
    .search-form{
        width: 100%;
    }
}

#last{
    color: var(--gray-color);
}

.menu-btn {
    background-color: var(--secundary-color);
    border: none;
}

.menu-btn:hover {
    transform: scale(1.05);
    transition: 0.3s;
    cursor: pointer;
}

.sidebar{
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background-color: #111827;
    padding: 30px 20px;
    transition: 0.3s;
    z-index: 1000;
}

.sidebar.active{
    left: 0;
}

.category-list{
    list-style: none;
}

.category-list li{
    padding: 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.category-list li:hover{
    background-color: #1f2937;
}

.movie-modal{
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2000;
}

.modal-content{
    background-color: #111827;
    width: 900px;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.close-modal{
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-body{
    display: flex;
    gap: 30px;
    padding: 30px;
}

@media(max-width: 768px){
    .modal-body{
        flex-direction: column;
    }
}

.modal-image{
    width: 300px;
    border-radius: 12px;
}

.modal-info{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loading {
    text-align: center;
    color: var(--gray-color);
}

.loading{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.spinner{
    width: 60px;
    height: 60px;
    border: 5px solid #1f2937;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin{
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}

.error-message{
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}