body {
  font-family: sans-serif;
  margin: 0;
  background: #181818;
}

h1 {
  color: #ffffff;
  font-size: calc(18px + 1.5vw);
  margin: 0 0 5px 0;
}

.header-wrapper {
  position: relative;
  height: calc(140px + 24vw);
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/header-bg2.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.header-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, rgba(24, 24, 24, 0) 60%, #181818 100%);
  z-index: 1;
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 2;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.card {
  position: relative; 
  background: #212121;
  border: 5px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border 0.3s;
}

.card.votada {
  border-color: #CA00FF;
}

.card.disabled {
  filter: grayscale(100%);
  opacity: 0.7;
  pointer-events: none;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.card-content {
  padding: 1rem;
  flex-grow: 1;
}

.card h3 {
  margin: 0;
  color: #ffffff;
}

.card p {
  margin: 0.5rem 0 1rem;
  color: #777777;
}

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

.vote-popup {
  position: absolute;
  top: 10;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  font-size: 1em;
  font-weight: bold;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  width: auto;
}

.vote-popup.fade-out {
  opacity: 0;
}

button {
  padding: 0.5rem 1rem;
  border: none;
  background: #333;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #555;
}

.card-button {
  appearance: button;
  backface-visibility: hidden;
  background-color: #405cf5;
  border-radius: 6px;
  border-width: 0;
  box-shadow: rgba(50, 50, 93, .1) 0 0 0 1px inset, rgba(50, 50, 93, .1) 0 2px 5px 0, rgba(0, 0, 0, .07) 0 1px 1px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, sans-serif;
  font-size: 100%;
  height: 44px;
  line-height: 1.15;
  margin: 12px 0 0;
  outline: none;
  overflow: hidden;
  padding: 0 25px;
  position: relative;
  text-align: center;
  text-transform: none;
  transform: translateZ(0);
  transition: all .2s, box-shadow .08s ease-in;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: 40%;
}

.card-button:disabled {
  background-color: #333;
  cursor: default;
}

.card-button:focus {
  box-shadow: rgba(50, 50, 93, .1) 0 0 0 1px inset, rgba(50, 50, 93, .2) 0 6px 15px 0, rgba(0, 0, 0, .1) 0 2px 2px 0, rgba(50, 151, 211, .3) 0 0 0 4px;
}

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

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  max-width: 820px;
  width: 90%;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
}

#modal-synopsis {
  max-width: 580px;
  line-height: 1.5rem;
}

#modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  color: #000000;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  z-index: 5;
}

#modal-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
}

.modal-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.modal-nav-btn {
  background: none;
  border: 1px solid #999;
  padding: 0.5rem 1rem;
  color: #999;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.modal-nav-btn:hover {
  background: #999;
  color: #181818;
}

#language-switcher {
  margin-top: 1rem;
}

.lang-btn {
  color: #000000;
  margin: 0 0.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid #ccc;
  background: #eee;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
}

.lang-btn.active {
  background: #222;
  color: white;
}

#register-form input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#register-form button {
  padding: 0.5rem 1rem;
  background: #222;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#user-info {
  font-weight: bold;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  align-items: center;
}

#logout-btn {
  background: none;
  border: none;
  color: #f00;
  font-weight: bold;
  cursor: pointer;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #181818;
  color: #aaa;
  font-size: 0.8rem;
}

.site-footer a {
  color: #aaa;
  text-decoration: none;
  margin: 0 0.5rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

.form-legal-text {
  font-size: 0.75rem;
  color: #777777;
  text-align: left;
  margin-top: 1rem;
  line-height: 1.4;
  max-width: 580px;
}

.form-legal-text a {
  color: #3058dc;
  text-decoration: underline;
}

/* Legal pages styles */
.legal-content {
  max-width: 860px;
  margin: 2rem auto;
  padding: 2rem;
  color: #ddd;
  font-size: 0.95rem;
  line-height: 1.6;
  background: #1e1e1e;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.legal-content h1,
.legal-content h2 {
  color: #fff;
}

.legal-content p {
  margin-bottom: 1rem;
}

/* Responsive styles for small screens */ 

@media (max-width: 600px) {
  #card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .card {
    margin: 0 auto;
    width: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 2.5rem 1rem;
    max-width: 700px;
  }
}