body {
    background-color: #222;
    color: #fff;
    font-family: 'Cairo', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background: #111;
    padding: 20px 0;
    text-align: center;
    font-size: 2rem;
    letter-spacing: 2px;
    color: #00c3ff;
}

#form {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

#search {
    width: 300px;
    padding: 10px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 1rem;
}

#form button {
    padding: 10px 20px;
    border: none;
    background: #00c3ff;
    color: #fff;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#form button:hover {
    background: #009ec3;
}

#main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 30px;
    max-width: 1200px;
    margin: auto;
}

/* كارت الفيلم */
.movie {
    background: #333;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.movie:hover {
    transform: translateY(-8px) scale(1.03);
}

.movie img {
    width: 100%;
    height: 370px;
    object-fit: cover;
    border-bottom: 3px solid #222;
}

.movie-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movie-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #fff;
}

.movie-info span {
    font-weight: bold;
    font-size: 1.1rem;
    padding: 5px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.movie-info .green {
    background: #1fd655;
    color: #fff;
}

.movie-info .orange {
    background: #ff9800;
    color: #fff;
}

.movie-info .red {
    background: #e74c3c;
    color: #fff;
}

.movie-info p, .movie-info h3:last-child {
    font-size: 0.95rem;
    color: #ccc;
    margin: 0;
    font-weight: normal;
    line-height: 1.5;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 600px) {
    #main {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .movie img {
        height: 250px;
    }
}
