:root {
    --primary-color: #D35143;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --bg-color: #eef2f7;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --placeholder-color: #999;
}

body.dark-mode {
    --secondary-color: #444;
    --text-color: #f5f5f5;
    --bg-color: #2c2c2c;
    --card-bg: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --placeholder-color: #777;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.theme-switch-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


.logo {
    width: 160px;
    height: auto;
}

h1 {
    color: var(--primary-color);
    margin: 0;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#movie-title {
    flex-grow: 1;
    padding: 12px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
}

#movie-title:focus {
    outline: none;
    border-color: var(--primary-color);
}

#search-button {
    padding: 12px 24px;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

#search-button:hover {
    background-color: #b94235;
}

.result-container {
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed var(--secondary-color);
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.placeholder-text {
    color: var(--placeholder-color);
    font-style: italic;
    text-align: center;
}

.movie-card {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
}

.movie-card .movie-info {
    flex: 1;
}

.movie-poster {
    width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.movie-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.movie-plot {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin-top: 10px;
}

.search-results-list {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.search-results-list li {
    background-color: var(--secondary-color);
    color: var(--text-color); 
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-results-list li:hover {
    background-color: #555; 
}

.search-results-list li img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

.search-results-list .result-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.search-results-list .result-title {
    font-weight: 600;
    font-size: 18px;
}

.search-results-list .result-type {
    font-size: 14px;
    font-weight: 400;
    color: var(--placeholder-color);
}

.show-seasons-btn {
    margin-top: 15px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-right: 10px; 
}

.show-seasons-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.seasons-title {
    margin-top: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
}

.seasons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.season-item {
    width: 150px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    background-color: var(--card-bg);
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.2s, background-color 0.2s;
}

.season-item:hover {
    box-shadow: 0 0 10px rgba(211, 81, 67, 0.5); 
    background-color: var(--secondary-color);
}

.season-item .season-poster {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

.season-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
    color: var(--text-color);
}

.episodes-title {
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.episodes-list {
    list-style: none;
    text-align: left;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0 10px;
}

.episodes-list li {
    background-color: var(--card-bg);
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color);
    border-left: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.episode-overview {
    font-size: 13px;
    color: var(--placeholder-color);
    margin-top: 5px;
    margin-bottom: 10px;
}

.watch-episode-btn {
    padding: 6px 15px;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-end;
    transition: background-color 0.2s;
}

.watch-episode-btn:hover {
    background-color: #b94235;
}
