/* =========================
   BASE
========================= */

body {
  background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSMjsq_11bqXgjjAf3pFPn05tiqAJxKAUwOzw&usqp=CAU");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  padding-bottom: 32px;
}

h1,
h2,
p,
.navbar a,
.dropdown .dropbtn,
.dropdown-content a,
button,
.caption,
.spoiler-toggle-label,
.spoiler-badge {
  font-family: avenir-light;
}

h1,
h2,
p,
.caption,
.spoiler-toggle-label {
  color: white;
  text-shadow: 0px 2px 5px red;
}

a:link {
  text-decoration: none;
  color: white;
}

a:hover,
a:active {
  text-decoration: underline;
}

a:visited {
  color: white;
}

/* =========================
   NAVBAR
========================= */

.navbar {
  overflow: hidden;
  background-color: #333;
  width: 100%;
}

.navbar a {
  float: left;
  font-size: 16px;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  margin: 0;
}

.navbar a:hover,
.dropdown:hover .dropbtn {
  background-color: red;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  display: block;
  text-align: left;
}

.dropdown-content a:link,
.dropdown-content a:visited {
  color: black;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* =========================
   TYPOGRAPHY
========================= */

h1 {
  font-size: 40pt;
  margin: 50px 20px;
  text-align: center;
}

h2 {
  font-size: 35px;
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
}

h2.phase,
h2.next-installment,
h2.coming-soon {
  margin-top: 25pt;
}

p {
  font-size: large;
  text-align: justify;
}

/* =========================
   BUTTONS
========================= */

.search-button,
.database,
button.universe {
  font-size: 32px;
  background-color: red;
  border: none;
  text-transform: uppercase;
  color: white;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  display: inline-block;
}

.search-button:hover,
.database:hover,
button.universe:hover,
div.item:hover {
  transition: 0.3s;
  transform: scale(1.05);
}

button.contentHider {
  color: white;
  text-shadow: 0px 2px 5px red;
  border: none;
  background: none;
  font-size: 40px;
  font-weight: 900;
  text-decoration: underline;
  text-align: center;
  display: flex;
  margin: 20pt auto 0;
}

button.contentHider.next,
button.contentHider.upcoming {
  margin-top: 5px;
}

/* =========================
   SEARCH AREA
========================= */

.search-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

#character-search {
  width: 700px;
  max-width: 70vw;
  height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid #666;
  font-size: 24px;
  box-sizing: border-box;
}

div.search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 140px;
}

.spoiler-toggle-row {
  margin-top: 20px;
  text-align: center;
}

.spoiler-toggle-label {
  font-size: 24px;
}

.back-row,
.universe {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* =========================
   RESULTS / CARDS
========================= */

#results {
  width: 100%;
  margin-top: 40px;
}

.results-section {
  margin-top: 40px;
}

.results-section h2 {
  margin-bottom: 20px;
}

.results-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 20px;
  padding: 20px 40px;
  scroll-behavior: smooth;
  align-items: flex-start;
}

.results-grid .item {
  flex: 0 0 auto;
  width: 350px;
  margin: 0;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

.results-grid .item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  box-shadow: 0px 2px 25px red;
}

.caption {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

/* =========================
   SPOILER STYLES
========================= */

.spoiler-item {
  outline: 3px solid gold;
  border-radius: 12px;
  background-color: rgba(255, 215, 0, 0.08);
  box-shadow: 0px 0px 20px gold;
}

.spoiler-item .caption {
  color: gold;
  text-shadow: 0px 2px 8px black;
}

.spoiler-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: gold;
  color: black;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 2;
}

/* =========================
   SCROLLBAR
========================= */

.results-grid::-webkit-scrollbar {
  height: 10px;
}

.results-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.results-grid::-webkit-scrollbar-thumb {
  background: red;
  border-radius: 10px;
}

/* =========================
   LEGACY / GENERAL ITEM RULES
   Keep only if used elsewhere
========================= */

div.item {
  vertical-align: top;
  display: inline-block;
  width: 100%;
}

/* =========================
   RESPONSIVE
========================= */

@media screen and (min-width: 500px) {
  h2,
  b {
    font-size: 50px;
  }
}

@media screen and (min-width: 1000px) {
  h2 {
    font-size: 50pt;
  }

  .row {
    display: flex;
    flex-direction: row;
  }

  div.search-container {
    margin: 140px 200px;
  }
}

@media screen and (min-width: 1200px) {
  #character-search {
    width: 650px;
  }
}

@media screen and (min-width: 1400px) {
  div.search-container {
    margin: 140px 400px;
  }
}