:root {
  --color-pokemon: #ffcb05;
  --color-pokemon-dark: #3d7dca;
  --color-naruto: #ff6600;
  --color-naruto-dark: #333333;
  --color-dragonball: #f85c1d;
  --color-dragonball-dark: #004a99;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: #1a1a1a;
  color: white;
  width: 100%;
  min-height: 100vh;
  transition: background 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow-x: hidden;
}

#app-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 2rem;
  backdrop-filter: blur(8px);
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.hub-header {
  width: 100%;
  padding-top: 0.75rem;
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 1s ease-out;
}

.hub-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.25;
  margin-bottom: 2.5rem;
  background: linear-gradient(45deg, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.5));
  overflow-wrap: anywhere;
}

.series-selector {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.series-btn {
  padding: 1rem 2rem;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
}

.series-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.5);
}

.btn-pokemon { border-bottom: 4px solid var(--color-pokemon); }
.btn-naruto { border-bottom: 4px solid var(--color-naruto); }
.btn-dragonball { border-bottom: 4px solid var(--color-dragonball); }

.search-container {
  width: 100%;
  max-width: 700px;
  margin-bottom: 3rem;
  position: relative;
}

input[type="text"] {
  width: 100%;
  padding: 1.2rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1.3rem;
  outline: none;
  transition: all 0.3s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.status-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.8;
  height: 20px;
}

.character-display {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.character-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: zoomIn 0.5s ease-out;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.character-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.character-img-container {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: rgba(0,0,0,0.2);
}

.character-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.character-card:hover .character-img {
  transform: scale(1.1);
}

.character-card h3 {

  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}

.character-card p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

.character-card .badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0,0,0,0.3);
  align-self: flex-start;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem;
  font-size: 1.5rem;
  opacity: 0.6;
  border: 2px dashed var(--glass-border);
  border-radius: 30px;
}

.hub-footer {
  margin-top: 5rem;
  padding: 3rem;
  width: 100%;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.swagger-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.swag-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  transition: all 0.3s;
}

.swag-link:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  #app-container {
    padding: 1.5rem;
  }

  .hub-header {
    margin-bottom: 3rem;
  }

  .series-selector {
    gap: 1rem;
  }

  .series-btn {
    padding: 0.9rem 1.25rem;
    border-radius: 14px;
    font-size: 0.95rem;
    letter-spacing: 1px;
  }

  .search-container {
    max-width: 620px;
    margin-bottom: 2rem;
  }

  .character-display {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    padding: 0;
  }

  .character-card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  .empty-state {
    padding: 4rem 2rem;
  }

  .hub-footer {
    margin-top: 3.5rem;
    padding: 2rem 1rem;
  }

  .swagger-links {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  #app-container {
    padding: 1rem;
  }

  .hub-header {
    margin-bottom: 2rem;
  }

  h1 {
    font-size: clamp(1.35rem, 9vw, 2rem);
    margin-bottom: 1.5rem;
    filter: drop-shadow(3px 3px 0 rgba(0,0,0,0.5));
  }

  .series-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    max-width: 360px;
    margin: 0 auto;
  }

  .series-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: 12px;
    letter-spacing: 0.5px;
  }

  input[type="text"] {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    font-size: 1rem;
  }

  .status-text {
    min-height: 36px;
    height: auto;
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: center;
  }

  .character-display {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .character-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .character-img-container {
    height: 220px;
    border-radius: 12px;
  }

  .character-card:hover,
  .series-btn:hover,
  .swag-link:hover {
    transform: none;
  }

  .character-card h3 {
    font-size: 0.85rem;
  }

  .character-card p {
    font-size: 0.95rem;
  }

  .empty-state {
    padding: 3rem 1rem;
    border-radius: 18px;
    font-size: 1rem;
  }

  .hub-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
  }

  .swagger-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .swag-link {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
  }
}
