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

/* Root Variables */
:root {
    --main-font: 'Arial, sans-serif';
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --text-color: #333;
    --background-color: #f4f4f4;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Body and Main Layout */
body {
    font-family: var(--main-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    margin: 20px 0;
}

header {
    background-color: var(--text-color);
    padding: 20px;
    text-align: center;
}

header h1 {
    color: var(--white);
    font-size: 2.5em;
}

header h1 a {
    color: var(--white);
    text-decoration: none;
}

.container {
    padding: 20px;
}

/* Genre List */
.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.genre-list a {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.genre-list a:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Movie Grid Layout */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.movie-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow: hidden;
    text-align: center;
    padding: 10px;
}

.movie-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.movie-item h4 {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.movie-item p {
    font-size: 0.9em;
    color: #777;
    line-height: 1.5;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .movie-item h4 {
        font-size: 1.1em;
    }

    .movie-item p {
        font-size: 0.85em;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    .movie-item h4 {
        font-size: 1em;
    }

    .movie-item p {
        font-size: 0.8em;
    }
}
