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;
}

/* Extra search link */
.extra-search-link {
    text-align: center;
    margin: 15px 0;
}

.extra-search-link a {
    color: #ffcccc; /* Matches your theme’s accent color */
    text-decoration: none;
    font-size: 1.1em;
}

.extra-search-link a:hover {
    text-decoration: underline;
    color: #ffffff; /* White on hover for contrast */
}

/* Box Office Mojo container */
.box-office-container {
    position: fixed;
    bottom: 50px; /* Space for footer */
    left: 50%;
    transform: translateX(-50%);
    max-width: 336px; /* 280px + 20% */
    width: 90%;
    padding: 7px;
    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;
}

.box-office-container td, .box-office-container th {
    padding: 3.6px;
    border: 1px solid #ffcccc;
    text-align: left;
}

.box-office-container th {
    background-color: rgba(255, 204, 204, 0.2);
    font-size: 10.8px;
}

.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);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* Mobile Adjustments */
@media (max-width: 768px) { /* Adjusted to common mobile breakpoint */
    /* Stack search container vertically */
    .search-container {
        flex-direction: column;
        align-items: stretch;
        margin: 70px auto 0; /* Extra space for fixed title */
        padding: 15px; /* Slightly less padding */
        gap: 15px; /* Reduced gap for tighter layout */
    }

    /* Full-width inputs */
    .input-wrapper {
        width: 100%;
    }

    /* Larger inputs and labels for touch */
    .input-wrapper label {
        font-size: 18px; /* Bigger for readability */
    }

    .input-wrapper input[type="text"] {
        padding: 12px 15px; /* Larger padding for touch */
        font-size: 18px; /* Larger text */
    }

    /* Larger autocomplete items */
    .autocomplete-items div {
        padding: 12px; /* Bigger touch target */
        font-size: 16px; /* More readable */
    }

    /* Full-width, larger button */
    button {
        width: 100%;
        padding: 12px; /* Bigger touch target */
        font-size: 18px; /* Larger text */
    }

    /* Adjust fixed elements */
    .box-office-container {
        width: 90%;
        max-width: 300px; /* Slightly smaller max-width */
        padding: 5px; /* Reduced padding */
        bottom: 60px; /* More space above footer */
    }

    .box-office-container table {
        font-size: 10px; /* Slightly larger for readability */
    }

    .box-office-container th {
        font-size: 12px;
    }

    footer {
        bottom: 10px; /* Closer to bottom */
    }

    footer .copyright {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* Extra search link */
    .extra-search-link {
        margin: 20px 0; /* More spacing */
    }

    .extra-search-link a {
        font-size: 1.2em; /* Slightly larger for emphasis */
    }

    /* Process.php adjustments */
    .content-container {
        margin: 90px auto 70px; /* Space for header and footer */
        padding: 15px;
    }

    .movie-poster {
        max-width: 80px; /* Smaller posters on mobile */
    }
}

/* iPhone-specific tweaks (portrait, narrow screens) */
@media (max-width: 414px) { /* Matches iPhone 12/13/14 width */
    .title-container h1 {
        font-size: 20px; /* Smaller title */
    }

    .search-container {
        margin-top: 60px; /* Adjusted for smaller title */
    }

    .box-office-container {
        max-width: 280px; /* Tighter fit */
        bottom: 50px;
    }
}