:root {
  --accent-color: #8ed049;
  --bg-primary: #0f1216;
  --bg-secondary: rgb(24, 28, 35);
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --warning-color: #f39c12;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  font-family: "Ubuntu", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header Styles */
header {
  align-items: center;
  background-color: var(--bg-secondary);
  box-shadow: var(--box-shadow);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.logo-container {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.side-logo {
  height: 40px;
}

.main-logo {
  height: 50px;
}

nav ul {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav a {
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  background-color: rgba(142, 208, 73, 0.2);
  color: var(--accent-color);
}

.nav-sobre {
  padding: 0;
}

.aluna img {
  cursor: pointer;
  height: 50px;
  width: auto;
}

.aluna {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
}

.aluna h3 {
  color: var(--cor-texto);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.aluna h4 {
  color: var(--cor-texto);
  font-family: var(--fonte-fira-code);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

.aluna img {
  border-radius: 50%;
}

/* Main Content Styles */
main {
  flex: 1;
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem;
  width: 100%;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-container {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  padding: 2rem;
}

.section-title {
  border-bottom: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: lighter;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.sobre p, .sobre ul {
  margin-bottom: 16px;
}

.sobre ul {
  margin-left: 48px;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid #444;
  color: var(--text-primary);
  font-family: inherit;
  padding: 0.75rem;
  width: 100%;
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(142, 208, 73, 0.2);
  outline: none;
}

.checkbox-group {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.checkbox-group input {
  width: auto;
}

.btn {
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: #7bb93a;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-warning:hover {
  background-color: #e67e22;
}

.edit-btn {
  background-color: var(--bg-primary);
}

.edit-btn:hover {
  background-color: black;
}

.edit-btn, .delete-btn {
  min-width: 48%;
}

/* Filtros Section */
.filters-section {
  background: linear-gradient(90deg, rgba(166, 247, 80, 0.1) 0%, rgba(0, 0, 0, 0) 20rem), var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.filters-title {
  color: var(--accent-color);
  font-size: 1.5rem;
  margin: 0;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.filter-select {
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: inherit;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(142, 208, 73, 0.2);
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-color);
  border-radius: var(--border-radius);
  background-color: transparent;
  color: var(--accent-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.filter-btn:hover {
  background-color: rgba(142, 208, 73, 0.1);
}

.filter-btn.active {
  background-color: var(--accent-color);
  color: var(--bg-primary);
}

.filter-btn.clear {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.filter-btn.clear:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

.filter-btn.clear.active {
  background-color: var(--danger-color);
  color: white;
}

/* Adicione ao seu CSS para melhor feedback visual */
.filter-btn.active {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.filter-btn.clear.active {
  background-color: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

#sort-order:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(142, 208, 73, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* Estilização dos Selects */
.filter-select {
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: inherit;
  appearance: none; /* Remove estilo padrão do navegador */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238ed049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(142, 208, 73, 0.2);
}

.filter-select:hover {
  border-color: var(--accent-color);
}

/* Estilização das options */
.filter-select option {
  background-color: rgb(24, 28, 35);
  color: var(--text-primary);
  padding: 0.5rem;
}

.filter-select option:hover,
.filter-select option:focus,
.filter-select option:checked {
  background-color: var(--accent-color);
  color: var(--bg-primary);
}

/* Para navegadores Webkit (Chrome, Safari) */
.filter-select::-webkit-scrollbar {
  width: 8px;
}

.filter-select::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.filter-select::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

.filter-select::-webkit-scrollbar-thumb:hover {
  background: #7bb93a;
}

/* Estilo do dropdown (para alguns navegadores) */
.filter-select::-webkit-list-box,
.filter-select::-webkit-dropdown {
  background-color: rgb(24, 28, 35);
  border: 1px solid #444;
  border-radius: var(--border-radius);
}

/* Para Firefox */
@-moz-document url-prefix() {
  .filter-select {
    color: var(--text-primary);
    text-shadow: 0 0 0 var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
  }

  .filter-select option {
    background-color: rgb(24, 28, 35);
    color: var(--text-primary);
  }

  .filter-select option:checked {
    background-color: var(--accent-color);
    color: var(--bg-primary);
  }
}

/* Para Internet Explorer (suporte básico) */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .filter-select {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
  }

  .filter-select option {
    background-color: rgb(24, 28, 35);
    color: var(--text-primary);
  }
}

/* Container adicional para melhor suporte */
.select-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-container::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238ed049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Estilo para selects dentro de formulários também */
.form-control[type="select"],
.form-control select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238ed049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.form-control[type="select"]:focus,
.form-control select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(142, 208, 73, 0.2);
}

/* Search Box */
.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-box input {
  flex: 1;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.movie-card {
  background: linear-gradient(90deg, rgba(166, 247, 80, 0.2) 0%, rgba(0, 0, 0, 0) 20rem), var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
}

.card-img {
  display: flex;
  justify-content: center;
  max-height: 144px;
  max-width: 100%;
  transition: opacity 0.3s ease;
}

.card-img:not([src]),
.card-img[src=""],
.card-img[src*="undefined"] {
  opacity: 0;
}

.card-img.loading {
  opacity: 0.5;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 0.3; }
  100% { opacity: 0.5; }
}

.card-body-img {
  background: linear-gradient(90deg, rgba(142, 208, 73, 0.14) 0%, rgb(15, 18, 22) 20rem), var(--bg-secondary);
  box-shadow: inset 0 0 0.5px 1px hsla(89.3, 59%, 55.1%, 0), 0 0 0 1px hsla(91.6, 40.2%, 36.1%, 0.45), 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02), 0 0.9px 1.5px hsla(230, 13%, 9%, 0.045), 0 3.5px 6px hsla(230, 13%, 9%, 0.09);
  display: flex;
  flex-direction: column;
  height: 200px;
  justify-content: center;
  justify-items: center;
  padding: 24px;
  width: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 422px;
  padding: 24px;
}


.card-title {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.rating {
  color: var(--warning-color);
  font-weight: bold;
}

/* Stats Section */
.stats-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 1.5rem;
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  color: var(--accent-color);
  font-size: 2rem;
  font-weight: bold;
  font-weight: lighter;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
}

/* Footer Styles */
footer {
  background-color: var(--bg-secondary);
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
}

footer a {
  color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }
}

/* Star Rating */
.star-rating {
  direction: row-reverse;
  display: inline-flex;
  justify-content: flex-end;
}

.star-rating input {
  display: none;
}

.star-rating label {
  color: #ddd;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0 0.1rem;
  transition: color 0.3s;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
  color: var(--warning-color);
}

/* Modal */
.modal {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 500px;
  padding: 2rem;
  width: 90%;
}

.modal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}