* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #FFFFFF;
    font-family: "Inter", sans-serif;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.background {
    background-image: url(img/tyson-moultrie-BQTHOGNHo08-unsplash.jpg);
    background-size: cover;
    background-position: center;
    height: 211px;
    width: 100%;
    opacity: 0.3;
    position: relative;
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7) 0%, rgba(22, 33, 62, 0.7) 100%);
}

nav {
    position: absolute;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 5.125rem 2.625rem 4.875rem;
}

nav h1 {
    font-size: 2.625rem;
    font-weight: 800;
    margin: 0;
}

nav p {
    font-size: 0.875rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #FEC654;
}

/* Search Bar */
.search-bar {
    position: absolute;
    display: flex;
    justify-content: center;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    background-color: #2E2E2F;
    height: 38px;
    width: calc(100% - 5.5rem);
    max-width: 690px;
    gap: 0.5rem;
    border-radius: 6px;
    font-family: inherit;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.search-bar i {
    padding-left: 0.8125rem;
    align-self: center;
    color: #9CA3AF;
}

.search-bar input {
    width: 100%;
    background-color: inherit;
    border: none;
    color: #A5A5A5;
    font-size: 0.875rem;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: #6B7280;
}

.search-bar input:focus {
    outline: none;
    color: #FFFFFF;
}

.search-bar input:-webkit-autofill,
.search-bar input:-webkit-autofill:hover,
.search-bar input:-webkit-autofill:focus {
    -webkit-text-fill-color: #A5A5A5;
    -webkit-box-shadow: 0 0 0px 1000px #2E2E2F inset;
    transition: background-color 5000s ease-in-out 0s;
}

.search-bar button {
    padding: 0 2.4375rem;
    background-color: #4B4B4B;
    border: none;
    color: #ffffff;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #5B5B5B;
}

.search-bar button:active {
    transform: scale(0.98);
}

/* Main Content */
.movie-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Empty State */
.empty-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #787878;
    text-align: center;
}

.empty-section .add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #FFFFFF;
    cursor: pointer;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.empty-section .add:hover {
    color: #FEC654;
}

.empty-section .fa-circle-plus {
    font-size: 1.125rem;
}

/* Movie Section */
.movie-section {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.movie-section img {
    width: 99px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.movie-card {
    display: flex;
    align-items: flex-start;
    gap: 1.3125rem;
    padding-bottom: 1.5rem;
    border-bottom: 1.5px solid #2C2C2C;
}

.movie-card * {
    margin: 0;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.head h3 {
    font-size: 1.125rem;
    font-weight: 500;
}

.head p {
    font-size: 0.75rem;
    color: #D1D5DB;
}

.subhead {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    flex-wrap: wrap;
}

.content .subhead p {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9CA3AF;
}

.fa-star {
    font-size: 0.9375rem;
    color: #FEC654;
    margin-right: 0.25rem;
}

.fa-circle-plus, 
.fa-circle-check, 
.fa-circle-minus {
    font-size: 1rem;
}

.fa-circle-check {
    color: #10B981;
}

.watchlist {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.watchlist:hover {
    color: #FEC654;
}

.watchlist * {
    pointer-events: none;
}

.desc {
    line-height: 1.5;
    color: #A5A5A5;
    font-size: 0.875rem;
}

.read-more, 
.read-less {
    color: #60A5FA;
    cursor: pointer;
    font-weight: 500;
}

.read-more:hover,
.read-less:hover {
    text-decoration: underline;
}

.read-less, 
.read-content {
    display: none;
}

/* Error Section */
.error-section {
    display: none;
    padding: 0 2rem;
    color: #787878;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: center;
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 3rem 2rem 3.5rem;
    }
    
    nav h1 {
        font-size: 2rem;
    }
    
    .search-bar {
        width: calc(100% - 3rem);
    }
    
    .movie-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .movie-section img {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    nav h1 {
        font-size: 1.5rem;
    }
    
    nav p {
        font-size: 0.75rem;
    }
}