/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #212529;
    font-size: 16px;
    line-height: 1.6;
}

.card {
    background-color: #ffffff;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Header */
header {
    background-color: #343a40;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    border-bottom: 3px solid #ffc107;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
}

/* Navigation Bar */
nav {
    background-color: #495057;
    display: flex;
    justify-content: center;
    padding: 10px;
}

nav a {
    color: #ffc107;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}

nav span {
    color: #ffc107;
    margin-left: 10px;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    font-size: 2rem;
    color: #343a40;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: #343a40;
    color: #ffc107;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}

/* Profile List */
.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.profile-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-image {
    max-width: 100%;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile-item h3 {
    font-size: 1.2rem;
    color: #343a40;
}

.profile-item a {
    display: inline-block;
    background-color: #ffc107;
    color: #343a40;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.profile-item a:hover {
    background-color: #e0a800;
}

/* Movie List */
.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    list-style: none;
}

.movie-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.movie-poster img {
    width: 100%;
    height: auto;
}

.movie-details {
    padding: 15px;
    text-align: left;
}

.movie-details h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #343a40;
}

.movie-details p {
    margin: 5px 0;
    color: #495057;
}

.details-link {
    display: inline-block;
    margin-top: 10px;
    color: #ffc107;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.details-link:hover {
    color: #e0a800;
}

/* Watchlist */
.watchlist {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.watchlist h2 {
    text-align: center;
    font-size: 2rem;
    color: #343a40;
    margin-bottom: 20px;
}

.watchlist ul {
    list-style: none;
    padding: 0;
}

.watchlist li {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f8f9fa;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.watchlist li img {
    border-radius: 8px;
    width: 100px;
    height: auto;
    flex-shrink: 0;
}

.watchlist li a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.watchlist li a:hover {
    color: #0056b3;
}

.watchlist li p {
    margin: 5px 0;
    color: #495057;
    flex: 1;
}

.watchlist form {
    margin-left: auto;
}

.watchlist button {
    background-color: #ffc107;
    color: #343a40;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.watchlist button:hover {
    background-color: #e0a800;
}

/* Responsive Design for Watchlist */
@media (max-width: 768px) {
    .watchlist li {
        flex-direction: column;
        align-items: flex-start;
    }

    .watchlist li img {
        width: 100%;
    }

    .watchlist li a {
        margin: 10px 0;
        font-size: 1.2rem;
    }
}

/* Profile Page Layout */
.profile-detail-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-detail-card {
    text-align: center;
    padding: 1.5rem;
}

.profile-detail-card h1 {
    margin: 0.5rem 0;
    color: #333;
}

/* Profile Image */
.profile-detail-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem 0;
    border: 2px solid #ccc;
}

/* Profile Info */
.profile-detail-info {
    margin-top: 1rem;
    text-align: left;
}

.profile-detail-info p {
    font-size: 1rem;
    margin: 0.5rem 0;
}

/* User Reviews */
h2 {
    margin: 1.5rem 0 0.5rem;
    color: #444;
}

.user-reviews {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.user-reviews li {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.user-reviews li p {
    margin: 0.5rem 0;
}

/* Friends List */
.friends-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.profile-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 150px;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid #ccc;
}

.profile-card h2 {
    font-size: 1rem;
    margin: 0;
}

.profile-card a {
    text-decoration: none;
    color: #007bff;
}

.profile-card a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-post-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-post-status:hover {
    background-color: #0056b3;
}

/* Movie Detail Page */
.movie-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.movie-detail h2 {
    margin-top: 0;
    color: #333;
}

.movie-detail p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #555;
}

/* Movie Poster */
.movie-poster {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto 1rem;
    border: 2px solid #ccc;
}

/* Reviews Section */
.movie-detail h3 {
    margin-top: 2rem;
    color: #444;
}

.movie-detail ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.movie-detail ul li {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.movie-detail ul li p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #555;
}

/* Review Form */
form {
    margin-top: 2rem;
}

form textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.5rem;
    font-size: 1rem;
    resize: vertical;
}

form label {
    font-weight: bold;
    margin-top: 1rem;
    display: block;
}

form select {
    width: 100px;
    margin-top: 0.5rem;
    padding: 0.4rem;
    font-size: 1rem;
}

form button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #0056b3;
}

/* No Poster Available */
.movie-detail p {
    text-align: center;
}

/* No Reviews Message */
.movie-detail ul p {
    font-style: italic;
    color: #777;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .movie-detail {
        padding: 1rem;
    }

    .movie-poster {
        max-width: 100%;
    }

    form textarea {
        font-size: 0.9rem;
    }

    form button {
        width: 100%;
    }
}

/* Container */
.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Title */
h2.text-center {
    color: #333;
    font-size: 1.75rem;
}

/* Form Styling */
form.card {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

form .form-group {
    margin-bottom: 1rem;
}

form .form-label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

form .form-control {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form .form-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #777;
}

form button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #0056b3;
}

/* Movie Search */
#movie_search {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

#movie_list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#movie_list li {
    padding: 0.5rem;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

#movie_list li:last-child {
    border-bottom: none;
}

#movie_list li:hover {
    background-color: #f0f0f0;
}

/* Selected Movie */
#selected_movie_name {
    font-size: 0.9rem;
    font-style: italic;
    color: #555;
}

/* Add Movie Section */
.mt-4.text-center {
    margin-top: 2rem;
    text-align: center;
}

.mt-4.text-center h5 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.mt-4.text-center .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mt-4.text-center .btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    #movie_search,
    form .form-control {
        font-size: 0.9rem;
    }

    form button {
        font-size: 0.9rem;
        width: 100%;
    }
}

/* Search bar styling */
.search-form {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.search-form input[type="text"] {
    width: 300px;
    padding: 10px 15px;
    border: 2px solid #ccc;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-form input[type="text"]:focus {
    border-color: #007bff; /* Blue highlight on focus */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.search-form button {
    padding: 10px 20px;
    border: 2px solid #007bff;
    background-color: #007bff;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    border-color: #0056b3;
}

.search-form button:active {
    transform: scale(0.98); /* Slight shrink on click */
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding: 15px;
    }
}
