body {
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
    background-color: #f5f5f5;
    color: #333;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
    position: relative;
}

.back-button {
    color: #fff;
    font-size: 1.2em;
    margin-right: 15px;
    text-decoration: none;
}

.search-header h2 {
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

#theme-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2em;
}

body.light-mode #theme-toggle {
    color: #333;
}

.search-content {
    padding: 20px;
}

.search-bar {
    display: flex;
    margin-bottom: 20px;
    background-color: #333;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-mode .search-bar {
    background-color: #e0e0e0;
}

#search-input {
    flex-grow: 1;
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    color: #fff;
    font-size: 1em;
    outline: none;
}

body.light-mode #search-input {
    color: #333;
}

#search-input::placeholder {
    color: #aaa;
}

#search-button {
    background-color: #e50914;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-button:hover {
    background-color: #f40612;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters select {
    padding: 10px;
    border: none;
    border-radius: 8px;
    background-color: #333;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

body.light-mode .filters select {
    background-color: #e0e0e0;
    color: #333;
}

.search-results {
    margin-top: 20px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.search-result-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-mode .search-result-item {
    background-color: #e0e0e0;
}

.search-result-item:hover {
    transform: scale(1.05);
}

.search-result-item img {
    width: 100%;
    height: 200px; /* Increased height */
    object-fit: cover;
    display: block;
}

.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-item:hover .poster-overlay {
    opacity: 1;
}

.poster-overlay p {
    margin: 5px 0;
    font-size: 0.9em;
    text-align: center;
}

.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #e50914;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.no-results {
    display: none;
    text-align: center;
    margin-top: 20px;
    font-size: 1.2em;
    color: #aaa;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(27, 25, 25, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
}

body.light-mode .bottom-nav {
    background-color: rgba(255, 255, 255, 0.9);
}

.bottom-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
}

.bottom-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bottom-nav li.active a,
.bottom-nav li a:hover {
    color: #fff;
}

body.light-mode .bottom-nav li a {
    color: #666;
}

body.light-mode .bottom-nav li.active a,
body.light-mode .bottom-nav li a:hover {
    color: #333;
}

.bottom-nav li i {
    font-size: 1.5em;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

.bottom-nav li a:hover i {
    transform: scale(1.2);
}