body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 4px solid #5cb85c;
}

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

header p {
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

main {
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
}

h2 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

.mood-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative; /* For suggestions dropdown */
}

#mood-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#mood-suggestions {
    position: absolute;
    top: 100%; /* Position below the input field */
    left: 0;
    right: calc(100px + 10px); /* Adjust based on button width and gap */
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.mood-suggestions-container .suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.mood-suggestions-container .suggestion-item:hover {
    background-color: #f0f0f0;
}


#get-recommendations-btn {
    padding: 12px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#get-recommendations-btn:hover {
    background-color: #4cae4c;
}

.movie-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.movie-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.movie-card h3 {
    font-size: 1.2rem;
    margin: 10px 0 5px;
    color: #333;
}

.movie-card p {
    font-size: 0.9rem;
    color: #666;
    text-align: left;
}

.movie-card .rating {
    font-weight: bold;
    color: #5cb85c;
    margin-top: 10px;
}

#loading-message, #error-message {
    text-align: center;
    font-size: 1.1rem;
    color: #777;
    padding: 20px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #aaa;
    margin-top: 40px;
}

footer a {
    color: #5cb85c;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
