/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #141414;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

header {
    text-align: center;
    padding: 20px 10px;
    border-bottom: 1px solid #303030;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header p {
    margin: 5px 0 0;
    color: #aaa;
}

main {
    padding: 20px;
}

/* Loader */
.loader {
    text-align: center;
    font-size: 1.2em;
    padding: 40px;
    color: #aaa;
}

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

.movie-card {
    background-color: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #303030;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.movie-card-poster {
    background-color: #333;
    width: 100%;
    height: 300px; /* Aspect ratio for posters */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2em;
    padding: 10px;
    box-sizing: border-box;
}

.movie-card-info {
    padding: 15px;
}

.movie-card-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-info p {
    margin: 0;
    color: #aaa;
    font-size: 0.9em;
}

/* Player Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #181818;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #fff;
}

#video-player {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 4px;
}
