/* app/assets/stylesheets/search.css */
.search-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.search-form {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.search-input {
    width: 100%;
    padding: 8px 10px;
    margin-top: 2px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.search-button {
    padding: 8px 20px;
    background: #dc3578; /*#007bff;*/
    margin-top: 2px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background: #0056b3;
}

.search-section {
    margin: 40px 0;
}

.search-section h2 {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.result-item:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

.result-item a {
    text-decoration: none;
    color: inherit;
}

.result-item h3 {
    margin: 0 0 10px 0;
    color: #007bff;
}

.result-item p {
    margin: 0;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.person-header,
.genre-header {
    margin-bottom: 15px;
}

.associated-movies,
.genre-movies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.associated-movies {
    font-size: 0.9em;
    color: #666;
}

.associated-movies strong {
    color: #333;
    margin-right: 5px;
}

.associated-movies a {
    color: #007bff;
    text-decoration: none;
}

.associated-movies a:hover {
    text-decoration: underline;
}

.associated-movies .more {
    color: #999;
    font-style: italic;
    margin-left: 5px;
}

.genre-movies ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.genre-movies li {
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    transition: background 0.2s;
}

.genre-movies li:hover {
    background: #e3f2fd;
}

.genre-movies a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.genre-movies .movie-title {
    color: #007bff;
    font-weight: 500;
}

.genre-movies .movie-year {
    color: #999;
    font-size: 0.9em;
}

.more-movies {
    margin-top: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}

.genre-result {
    background: #fff9e6;
}

.meta {
    font-size: 0.9em;
    color: #999;
    margin: 5px 0 0 0;
}

/* app/assets/stylesheets/search.css */

/* ... existing styles ... */

.genre-movies ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.genre-movies ul.remaining-movies {
    margin-top: 10px;
}

.genre-movies li {
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    transition: background 0.2s;
}

.genre-movies li:hover {
    background: #e3f2fd;
}

.genre-movies a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.genre-movies .movie-title {
    color: #007bff;
    font-weight: 500;
}

.genre-movies .movie-year {
    color: #999;
    font-size: 0.9em;
}

.toggle-movies-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    width: 100%;
    transition: background-color 0.2s;
}

.toggle-movies-btn:hover {
    background-color: #0056b3;
}

.toggle-movies-btn:active {
    transform: scale(0.98);
}

.genre-result {
    background: #fff9e6;
}

.meta {
    font-size: 0.9em;
    color: #999;
    margin: 5px 0 0 0;
}

mark {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
    color: #000;
}

.result-item a mark {
    color: #007bff;
}

.result-item h3 mark {
    background-color: #ffeb3b;
    color: #000;
}

.result-item p mark {
    background-color: #fff3cd;
    color: #000;
}

/* Autocomplete styles */
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: -2px;
    display: none;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-type {
    display: inline-block;
    padding: 4px 10px;
    background: #007bff;
    color: white;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 65px;
    text-align: center;
    flex-shrink: 0;
}

.autocomplete-type-movie {
    background: #007bff;
}

.autocomplete-type-person {
    background: #28a745;
}

.autocomplete-type-genre {
    background: #ffc107;
    color: #000;
}

.autocomplete-type-cinema {
    background: #6f42c1;
}

.autocomplete-content {
    flex: 1;
    min-width: 0;
}

.autocomplete-title {
    font-weight: 600;
    font-size: 1em;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-subtitle {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Keyboard navigation support */
.autocomplete-item:focus {
    background: #e9ecef;
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* Loading state (optional) */
.autocomplete-results.loading::after {
    content: "Searching...";
    display: block;
    padding: 12px 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ... existing styles ... */

.genre-movies-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.genre-movies-section:first-child {
    border-top: none;
    margin-top: 15px;
    padding-top: 0;
}

.subsection-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Highlight currently showing movies */
.movie-item-current {
    background: #e8f5e9 !important;
    border-left: 3px solid #28a745;
}

.movie-item-current:hover {
    background: #c8e6c9 !important;
}

/* ... rest of existing styles ... */
