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

body {
    font-family: Arial, sans-serif;
    background-color: #121212; /* Dark mode background */
    color: #e0e0e0; /* Light text for contrast */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.container {
    text-align: center;
    background: #1e1e1e; /* Slightly lighter than body background */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 1200px; /* Lebih lebar untuk desktop */
}

h1 {
    color: #1db954; /* Darker green for better contrast */
    margin-bottom: 20px;
}

form {
    margin-top: 20px;
}

input[type="text"] {
    padding: 10px;
    width: calc(100% - 22px); /* Adjust width for better spacing */
    margin-bottom: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #2c2c2c; /* Dark input background */
    color: #e0e0e0; /* Light text for contrast */
}

button {
    padding: 10px 20px;
    background-color: #1db954; /* Darker green for buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%; /* Full width for mobile */
}

button:hover {
    background-color: #18a04b; /* Slightly darker green on hover */
}

#movie-details {
    margin-top: 20px;
    text-align: left; /* Align text to the left */
}

/* Movie Details Table Styles */
.movie-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #2c2c2c; /* Dark table background */
    border-radius: 5px;
    overflow: hidden; /* Ensure rounded corners are visible */
    table-layout: fixed; /* Fix layout to handle long text */
}

.movie-info-table th,
.movie-info-table td {
    padding: 10px;
    border: 1px solid #333;
    color: #e0e0e0; /* Light text for contrast */
    word-wrap: break-word; /* Break long words */
    overflow-wrap: anywhere; /* Handle very long text */
    white-space: normal; /* Allow wrapping */
}

.movie-info-table th {
    background-color: #1db954; /* Darker green for headers */
    color: white;
    text-align: left; /* Align headers to the left */
    width: 25%; /* Fixed width for headers */
}

.movie-info-table td {
    text-align: left; /* Align content to the left */
    width: 75%; /* Fixed width for content */
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .movie-info-table th,
    .movie-info-table td {
        font-size: 14px; /* Smaller font size for mobile */
    }
}

#results {
    margin-top: 20px;
    text-align: left;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #2c2c2c; /* Dark table background */
    border-radius: 5px;
    overflow: hidden; /* Ensure rounded corners are visible */
    table-layout: fixed; /* Fix layout to handle long URLs */
}

th, td {
    padding: 10px;
    border: 1px solid #333;
    text-align: center; /* Center align all text */
    color: #e0e0e0; /* Light text for contrast */
    word-wrap: break-word; /* Break long words */
    overflow-wrap: anywhere; /* Handle very long URLs */
    white-space: normal; /* Allow wrapping */
}

th {
    background-color: #1db954; /* Darker green for headers */
    color: white;
}

tr:nth-child(even) {
    background-color: #252525; /* Alternate row color */
}

tr:hover {
    background-color: #333; /* Hover effect */
}

/* Status Colors */
.found {
    color: #1db954; /* Green for "Found" status */
}

.unsure {
    color: #fbc02d; /* Yellow for "Unsure" status */
}

/* Loading Animation */
.loader {
    border: 4px solid #333;
    border-top: 4px solid #1db954;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none; /* Hidden by default */
}

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

/* Scrollable Table for Mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto; /* Horizontal scrolling */
        white-space: nowrap; /* Prevent wrapping */
    }

    th, td {
        min-width: 150px; /* Minimum width for columns */
    }
}

/* Footer Styles */
footer {
    margin-top: auto;
    padding: 10px;
    background-color: #1db954; /* Darker green for footer */
    color: white;
    width: 100%;
    text-align: center;
    font-size: 14px;
    position: relative;
    bottom: 0;
}

footer a {
    color: white;
    text-decoration: none;
}

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