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

body {
    font-family: 'Helvetica', 'Arial', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 90%;
    max-width: 900px;
}

h1 {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

p {
    text-align: center;
    margin-bottom: 20px;
    color: #7f8c8d;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

#user-select,
#movie-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

#user-select:focus,
#movie-select:focus {
    border-color: #3498db;
    outline: none;
}

#recommend-btn,
#predict-btn {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#recommend-btn:hover,
#predict-btn:hover {
    background-color: #2980b9;
}

#result-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.result-column {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.result-column h2 {
    font-size: 1.05rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: left;
}

.result-column p,
.result-column ul {
    text-align: left;
    color: #2c3e50;
    margin: 0;
}

.result-column ul {
    padding-left: 20px;
}

@media (max-width: 640px) {
    #result-box {
        grid-template-columns: 1fr;
    }
}

.error {
    color: #e74c3c;
}

/* Two buttons side by side, and the rating-prediction cards */
.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#prediction-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

#prediction-result:empty {
    display: none;
}

.prediction-card {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.prediction-card h3 {
    font-size: 1rem;
    color: #2c3e50;
}

.prediction-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.prediction-card p {
    margin: 0;
}

#prediction-result .actual {
    grid-column: 1 / -1;
    margin: 0;
}

.result-column ul + p,
.result-column p + ul {
    margin-top: 8px;
}

@media (max-width: 640px) {
    .buttons,
    #prediction-result {
        grid-template-columns: 1fr;
    }
}
