/* Dark Theme Styling */
body {
    background-color: #121212;  /* Dark background */
    color: #ffffff;  /* White text */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Style links */
a {
    color: #4db8ff;  /* Light blue links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Center content */
.container {
    width: 80%;
    margin: auto;
    padding: 20px;
}

/* Movie display styles */
.movie {
    background-color: #1e1e1e;
    padding: 15px;
    margin: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Images */
img {
    max-width: 100%;
    border-radius: 5px;
}

/* Movie Blocks for Responsive Layout */
.movies-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.movie-block {
    margin: 10px;
    text-align: center;
    flex-basis: 100%;
}

.movie-block img {
    max-width: 150px;
    margin-bottom: 10px;
}

/* Section Title Styling */
.section-title {
    text-align: center;
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Responsive CSS */
@media (min-width: 600px) {
    .movie-block {
        flex-basis: 45%; /* Two movies per row on medium screens */
    }
}

@media (min-width: 768px) {
    .movie-block {
        flex-basis: 30%; /* Three movies per row on large screens */
    }
}

/* Small screen adjustments (phones) */
@media (max-width: 600px) {
    .section-title {
        font-size: 20px;
    }

    .movie-block img {
        max-width: 100px; /* Smaller images on smaller screens */
    }

    .movie-block {
        flex-basis: 100%; /* One movie per row on small screens */
    }

    h1 {
        font-size: 24px;
    }
}


.filter-bar {
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
    padding: 20px 25px 10px;
    z-index: 100;
    border-bottom: 4px solid #28a745;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.filter-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-bar input[type="text"] {
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    background-color: white;
    color: black;
}

.filter-bar select {
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    background-color: #1e1e1e;
    color: white;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
    outline: none;
    background-color: #ddd;
}

.user-dropdown {
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 5px;
    margin-top: 5px;
    min-width: 160px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 999;
}

.dropdown-menu a {
    display: block;
    color: white;
    padding: 10px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #333;
}

.btn {
    background-color: #28a745;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: #218838;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #222;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
}

.modal-close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

.error-message {
    color: #ff4d4d;
    margin-top: 10px;
}
.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    padding: 20px;
    justify-items: center;
}

.movie-block {
    text-align: center;
}

.movie-block img {
    width: 100%;
    max-width: 140px;
    height: auto;
}

.loader {
    text-align: center;
    margin: 20px;
    display: none;
}

@media (min-width: 1200px) {
    .movies-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .movies-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .movies-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Account Page === */
.account-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
  }
  
  .account-heading {
    color: rgb(3,88,49);
    margin-bottom: 20px;
  }
  
  .account-section {
    margin-bottom: 40px;
  }
  
  .account-form-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 20px;
    align-items: center;
  }
  
  .account-form-grid label {
    text-align: right;
    padding-right: 10px;
  }
  
  .account-form-grid input[type=text],
  .account-form-grid input[type=password] {
    width: 100%;
    padding: 8px;
    background: #121212;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 6px;
  }
  
  .account-btn {
    background: rgb(3,88,49);
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
  }
  
  .account-btn:hover {
    background: rgb(3,88,49);
  }
  
  .account-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .account-table th,
  .account-table td {
    padding: 8px;
    border-bottom: 1px solid #333;
  }
  
  .account-table th {
    background: #222;
    text-align: left;
  }

    
  .account-form-grid label {
    text-align: right;
    padding-right: 10px;
  }
  
  .account-form-grid input[type=text],
  .account-form-grid input[type=password] {
    width: 100%;
    padding: 8px;
    background: #121212;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 6px;
  }
  
  .account-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
  }
  
  

  /* === Insert Page === */
.insert-container {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
    width: 400px;
    margin: auto;
    color: #e0e0e0;
  }
  
  .insert-container h2 {
    text-align: center;
    color: #ffffff;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #bdbdbd;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #333;
    background-color: #333;
    color: #e0e0e0;
    border-radius: 5px;
  }
  
  .form-group select[multiple] {
    height: 100px;
  }
  
  input[type="submit"] {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
  }
  
  input[type="submit"]:hover {
    background-color: #218838;
  }
  
  a {
    color: #4caf50;
    text-decoration: none;
  }
  
  a:hover {
    text-decoration: underline;
  }
  


  /* === Login Page === */
.login-box {
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px #000;
    text-align: center;
    max-width: 360px;
    width: 100%;
    margin: auto;
    margin-top: 10vh;
  }
  
  .login-box h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
  }
  
  .login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border: none;
    background-color: #2b2b2b;
    color: white;
  }
  
  .login-box button {
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
  }
  
  .login-box button:hover {
    background-color: #218838;
  }
  
  .login-box .error {
    color: #ff4d4d;
    margin-top: 10px;
  }
  
  .login-box .back-link {
    margin-top: 30px;
    display: block;
    color: #bbbbbb;
    text-decoration: none;
  }
  
  .login-box .back-link:hover {
    color: #ffffff;
  }
  


  /* === Profile Page === */
body.profile-page {
    background: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
  }
  
  .profile-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
  }
  
  .profile-container h2 {
    margin-top: 0;
    color: #00ff88;
  }
  
  .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .form-row label {
    flex: 0 0 150px;
  }
  
  .form-row input[type=text] {
    flex: 1;
    padding: 8px;
    background: #121212;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 6px;
    box-sizing: border-box;
  }
  
  .icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .icon-grid input {
    display: none;
  }
  
  .icon-grid label {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
  }
  
  .icon-grid label img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    display: block;
  }
  
  .icon-grid input:checked + label {
    border-color: #00ff88;
  }
  
  .btn {
    background: #00ff88;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
  }
  
  .btn:hover {
    background: #00cc66;
  }
  
  .btn.danger {
    background: #ff4444;
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 5px;
  }
  
  .btn.danger:hover {
    background: #cc0000;
  }
  
  table.profile-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
  }
  
  .profile-history th,
  .profile-history td {
    padding: 8px;
    border-bottom: 1px solid #333;
    text-align: center;
    vertical-align: middle;
  }
  
  .profile-history th:first-child,
  .profile-history td:first-child {
    text-align: left;
  }
  
  .back-btn {
    background: #444;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
  }
  
  .back-btn:hover {
    background: #666;
  }
  