@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #1a237e;
    margin-bottom: 10px;
}

p {
    color: #555;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.upload-group {
    margin-bottom: 20px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.upload-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

#logoUpload {
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

#movieUrl {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#movieUrl:focus {
    outline: none;
    border-color: #4a90e2;
}

#generateBtn, .button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

#generateBtn:hover, .button:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4a90e2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.output-container {
    margin-top: 30px;
    min-height: 300px; /* Placeholder height */
    display: flex;
    justify-content: center;
    align-items: center;
}

#imageCanvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

#error-container {
    color: #D8000C; /* Red for errors */
    background-color: #FFD2D2; /* Light red background */
    border: 1px solid #D8000C;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Movie Details Container --- */
.details-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    text-align: left;
    transition: all 0.3s ease-in-out;
}

.details-container h2 {
    font-size: 24px;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
}

.details-container p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 15px;
}

.details-container p strong {
    color: #212529;
    margin-right: 8px;
}

.details-container a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.details-container a:hover {
    text-decoration: underline;
}
