body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #b80000; /* Red background */
    color: white; /* White text for body */
    min-height: 100vh; /* Ensure body fills viewport */
}

/* Title container */
.title-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #000000; /* Black background */
    text-align: center;
    padding: 10px 0; /* Vertical padding for height */
    z-index: 2000; /* Above all else */
}

.title-container h1 {
    margin: 0;
    font-size: 24px; /* Adjustable */
    color: white; /* White text */
    line-height: 1; /* Match height to text */
}

.title-container h1 a:hover,
.title-container h1 a:visited,
.title-container h1 a:link,
.title-container h1 a:active {
    color: #FFFFFF; /* Ensure all link states are white */
    text-decoration: none; /* No underline for any state */
}

.title-container h1 a:hover {
    text-decoration: underline; /* Optional: Underline on hover for usability */
}


/* Comparison header for process.php */
.comparison-header {
    text-align: center;
    margin: 5px 0;
    font-size: 20px;
    color: white;
}

.vs {
    font-weight: bold;
    margin: 0 10px;
}

/* Main container for search form */
.search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 60px auto 0; /* Increased top margin for title */
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Content container for process.php */
.content-container {
    max-width: 800px;
    margin: 80px auto 0; /* Adjusted for taller fixed header */
    padding: 20px;
}

/* Input wrapper for each search field */
.input-wrapper {
    position: relative;
    width: 300px;
    max-width: 100%;
}

/* Labels */
.input-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    color: white;
}

/* Search inputs */
.input-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* Focus state for inputs */
.input-wrapper input[type="text"]:focus {
    border-color: #ffcccc;
    box-shadow: 0 0 5px rgba(255, 204, 204, 0.5);
}

/* Autocomplete dropdown */
.autocomplete-items {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    border: 1px solid #ffffff;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.autocomplete-items div:hover {
    background-color: #ffcccc;
}

/* Submit button */
button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #ffffff;
    color: #b80000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover {
    background-color: #ffcccc;
    color: #b80000;
}

/* Error message */
.error-message {
    color: #ffcccc;
    font-size: 14px;
    margin-top: 5px;
}

/* Movie poster styling for process.php */
.movie-poster {
    max-width: 100px;
    height: auto;
}

/* Box Office Mojo container - 20% wider, 10% shorter */
.box-office-container {
    position: fixed;
    bottom: 50px; /* Space for footer */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    max-width: 336px; /* 280px + 20% = 336px */
    width: 90%;
    padding: 7px; /* Reduced from 8px, ~10% less vertical padding */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
    z-index: 1000;
}

/* Style the Box Office Mojo table */
.box-office-container table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    font-size: 9px; /* Reduced from 10px, 10% smaller */
}

.box-office-container td, .box-office-container th {
    padding: 3.6px; /* Reduced from 4px, 10% smaller */
    border: 1px solid #ffcccc;
    text-align: left;
}

.box-office-container th {
    background-color: rgba(255, 204, 204, 0.2);
    font-size: 10.8px; /* Reduced from 12px, 10% smaller */
}

.box-office-container td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Footer with copyright */
footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    z-index: 1000;
}

footer .copyright {
    margin: 0;
    font-size: 14px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    .input-wrapper {
        width: 100%;
    }
    button {
        width: 100%;
    }
    .box-office-container {
        width: 95%;
        padding: 4.5px; /* Reduced from 5px, ~10% less */
        max-width: 252px; /* 210px + 20% = 252px */
        bottom: 40px; /* Adjusted for footer */
    }
    footer {
        bottom: 5px;
    }
    footer .copyright {
        font-size: 12px;
        padding: 4px 8px;
    }
}