body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 16px;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

h1 {
    font-size: 1.8rem;
    text-align: center;
    margin: 24px 0;
}

.search-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.search-container {
    position: relative;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    padding-right: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    -webkit-appearance: none;
}

.clear-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    display: none;
    line-height: 1;
}

.clear-button:hover {
    color: #333;
}

.search-container.has-content .clear-button {
    display: block;
}

/* Title Autocomplete Styles */
.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover,
.autocomplete-item:active {
    background-color: #f8f8f8;
}

.autocomplete-item .year {
    color: #666;
    font-size: 0.9em;
    margin-left: 8px;
}

.autocomplete-item img {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    object-fit: cover;
    border-radius: 4px;
}

.autocomplete-item .title {
    display: inline-block;
    vertical-align: middle;
}

.autocomplete-item > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Country Selector Styles */
.country-dropdown {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.country-option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.country-option:hover {
    background-color: #f8f8f8;
}

.country-option.selected {
    background-color: #e3f2fd;
}

.country-option.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
}

.country-option.no-results:hover {
    background-color: white;
}

/* Movie Card Styles */
.movie-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.movie-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.movie-poster {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

.movie-info {
    flex: 1;
}

.movie-info h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
}

.streaming-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.streaming-section {
    margin-bottom: 15px;
}

.streaming-section h3 {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.streaming-option {
    background: #f8f8f8;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.streaming-option a {
    color: #007bff;
    text-decoration: none;
    display: block;
    padding: 4px 0;
}

.streaming-option a:hover {
    text-decoration: underline;
}

.price {
    color: #28a745;
    font-weight: bold;
}

/* Error Message Styles */
.error-message {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.error-message .error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-message h3 {
    color: #dc3545;
    margin-bottom: 10px;
}

.error-message p {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
}

/* Media Queries */
@media (min-width: 768px) {
    .movie-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .movie-poster {
        width: 200px;
        margin: 0;
    }

    .movie-info h2 {
        text-align: left;
    }

    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 24px;
    }
}