:root {
  --bg-color: #0f0f13;
  --text-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-hover-bg: rgba(255, 255, 255, 0.1);
  --modal-bg: rgba(20, 20, 25, 0.85);
  
  --color-analyst: #8869b3;
  --color-diplomat: #33a474;
  --color-sentinel: #4298b4;
  --color-explorer: #e4ae3a;

  --font-main: 'Noto Sans SC', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--color-analyst);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--color-diplomat);
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--color-explorer);
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header */
header {
  text-align: center;
  padding: 4rem 2rem 2rem;
}

header h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.filter-btn[data-filter="Analyst"]:hover, .filter-btn[data-filter="Analyst"].active { border-color: var(--color-analyst); box-shadow: 0 0 15px rgba(136, 105, 179, 0.3); }
.filter-btn[data-filter="Diplomat"]:hover, .filter-btn[data-filter="Diplomat"].active { border-color: var(--color-diplomat); box-shadow: 0 0 15px rgba(51, 164, 116, 0.3); }
.filter-btn[data-filter="Sentinel"]:hover, .filter-btn[data-filter="Sentinel"].active { border-color: var(--color-sentinel); box-shadow: 0 0 15px rgba(66, 152, 180, 0.3); }
.filter-btn[data-filter="Explorer"]:hover, .filter-btn[data-filter="Explorer"].active { border-color: var(--color-explorer); box-shadow: 0 0 15px rgba(228, 174, 58, 0.3); }

/* Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--type-color);
  opacity: 0.7;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  background: var(--card-hover-bg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border-color: var(--type-color);
}

.card-img-wrapper {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.1);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 0.2rem;
  color: #fff;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.card-tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--modal-bg);
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
  }
}

.modal-header-side {
  flex: 1;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  border-right: 1px solid rgba(255,255,255,0.05);
}

.modal-img {
  width: 200px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 15px 15px rgba(0,0,0,0.4));
}

.modal-code {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--type-color);
}

.modal-name {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.modal-info-side {
  flex: 2;
  padding: 3rem 2.5rem;
}

.modal-slogan {
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  margin-bottom: 2rem;
  color: #fff;
  border-left: 4px solid var(--type-color);
  padding-left: 1rem;
}

.info-section {
  margin-bottom: 2rem;
}

.info-section h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.8rem;
}

.info-section p {
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.08);
}

.tag.strength { color: #81c784; border: 1px solid rgba(129, 199, 132, 0.2); }
.tag.weakness { color: #e57373; border: 1px solid rgba(229, 115, 115, 0.2); }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f0f13; 
}
::-webkit-scrollbar-thumb {
  background: #333; 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555; 
}
