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

:root {
  --bg: #060a12;
  --bg-card: #0d1320;
  --bg-card-hover: #111b2e;
  --accent: #3b9eff;
  --accent-glow: rgba(59, 158, 255, 0.25);
  --text: #e4e8f0;
  --text-dim: #6b7a94;
  --border: #1a2438;
  --success: #22c55e;
  --font-title: 'Bebas Neue', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 12px;
  padding-bottom: 60px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
}

.logo {
  font-family: var(--font-title);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--accent);
}

.header-maknara {
  height: 40px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
}

.logo-maknara-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoFloat 2s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(3px); }
  100% { transform: translateY(-3px); }
}

.logo-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-orbit rect {
  stroke-dasharray: 60 116;
  animation: orbitTrace 2.5s linear infinite;
}

@keyframes orbitTrace {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -176; }
}

.logo-maknara {
  width: 38px;
  height: 38px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: 10px;
}

/* Verified Line */
.verified-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #6a7a9a;
  margin: 0 0 14px;
}

.verified-icon {
  vertical-align: middle;
  opacity: 0.7;
  animation: lightningFlash 6s ease-in-out infinite;
}

.saiba-mais {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* Info Modal */
.info-overlay {
  z-index: 250;
}

.info-modal {
  max-width: 320px;
  padding: 20px;
}

.info-title {
  font-family: var(--font-title);
  font-size: 18px;
  color: #fff;
  letter-spacing: 1px;
}

.info-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 12px 0;
}

.info-text {
  font-size: 13px;
  color: #6a7a9a;
  line-height: 1.6;
  margin-bottom: 12px;
}

.info-pro-name {
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.info-pro-name:hover {
  color: var(--accent);
}

.info-highlight {
  color: #fff;
  font-weight: 500;
}

@keyframes lightningFlash {
  0%, 90%, 100% { opacity: 0.7; filter: brightness(1); }
  91% { opacity: 1; filter: brightness(3); }
  92.5% { opacity: 0.9; filter: brightness(1.5); }
  94% { opacity: 1; filter: brightness(2.5); }
  97% { opacity: 0.7; filter: brightness(1); }
}

/* Search */
.search-wrap {
  margin-bottom: 12px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.search-wrap.focused .search-icon {
  opacity: 1;
}

.search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px 12px 40px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search::placeholder {
  color: var(--text-dim);
  transition: opacity 0.3s ease;
}

.search.placeholder-fade::placeholder {
  opacity: 0;
}

.search:focus {
  border-color: #3b9eff;
  box-shadow: 0 0 0 2px rgba(59, 158, 255, 0.4), 0 0 16px rgba(59, 158, 255, 0.2);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px 8px;
  flex: 1;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: border-color 0.4s ease;
}

.tab::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: #3b9eff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: -1;
}

.tab:hover {
  border-color: rgba(59, 158, 255, 0.25);
}

.tab-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.4;
  transition: all 0.4s ease;
  filter: grayscale(0.3);
}

.tab:hover .tab-icon {
  opacity: 0.6;
}

.tab-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  transition: color 0.4s ease;
}

.tab.active {
  border-color: #3b9eff;
}

.tab.active::before {
  width: 200%;
  height: 200%;
}

.tab.active .tab-label {
  color: #fff;
}

.tab.active .tab-icon {
  opacity: 1;
  width: 56px;
  height: 56px;
  filter: brightness(10) grayscale(1);
}

/* Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  align-items: start;
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px 4px 8px;
  cursor: pointer;
  transition: all 0.25s ease-out;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.hero-card:hover {
  border-color: rgba(59, 158, 255, 0.35);
  background: var(--bg-card-hover);
  box-shadow: 0 0 12px rgba(59, 158, 255, 0.12);
}

.hero-card:active {
  transform: scale(0.96);
}

.hero-card.selected {
  border-color: var(--accent);
}

.hero-img-wrap {
  width: calc(100% - 4px);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #1a2438;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease-out;
}

.hero-card:hover .hero-img-wrap img {
  transform: scale(1.05);
}

.hero-emoji {
  font-size: 28px;
  line-height: 1;
}

.hero-name {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: var(--text);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #0d1220;
  border: 1px solid rgba(59, 158, 255, 0.15);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 16px 24px;
  position: relative;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 20px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Modal Hero Header */
.modal-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-right: 40px;
}

.modal-hero-img-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  padding: 2px;
  flex-shrink: 0;
  background: conic-gradient(from var(--border-angle, 0deg), #3b9eff, transparent 40%, transparent 60%, #3b9eff);
  animation: borderSpin 2.5s linear infinite;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderSpin {
  to { --border-angle: 360deg; }
}

.modal-hero-img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.modal-hero-info {
  flex: 1;
  min-width: 0;
}

.modal-hero-name {
  font-family: var(--font-title);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1;
}

.modal-hero-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}

/* Modal Loading */
.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.modal-loading-lottie {
  width: 140px;
  height: 140px;
}

.modal-loading-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-top: 8px;
}

/* Counter Cards */
.counter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.counter-card:hover {
  border-color: rgba(59, 158, 255, 0.3);
}

.counter-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.counter-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #1a2438;
  flex-shrink: 0;
}

.counter-emoji {
  font-size: 28px;
  width: 52px;
  height: 52px;
  background: #1a2438;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.counter-info {
  flex: 1;
  min-width: 0;
}

.counter-name {
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 1px;
  color: #fff;
}

.counter-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.counter-badge.top {
  background: #3d2e00;
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.38);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    border-color: rgba(255, 215, 0, 0.3);
    transform: scale(1);
  }
  50% {
    border-color: rgba(255, 215, 0, 1);
    transform: scale(1.03);
  }
}

.counter-badge.rec {
  background: #1f1800;
  color: #8B6914;
  border: 1px solid rgba(139, 105, 20, 0.38);
}

/* Modal Footer - Pro Player Link */
.modal-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.modal-footer-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.pro-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 158, 255, 0.3);
  text-underline-offset: 2px;
  cursor: pointer;
  transition: text-decoration-color 0.2s;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
}

.pro-link:hover {
  text-decoration-color: var(--accent);
}

/* Pro Player Modal */
.pro-overlay {
  z-index: 300;
}

.pro-modal {
  width: 340px;
  max-width: 340px;
  height: 260px;
  padding: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  border-radius: 12px;
}

.pro-modal .modal-close {
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  font-size: 15px;
  border-radius: 6px;
}

.pro-content {
  display: flex;
  height: 100%;
}

.pro-photo {
  width: 55%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px 0 0 12px;
  display: block;
  background: #0d1220;
  flex-shrink: 0;
}

.pro-body {
  width: 45%;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.pro-name {
  font-family: var(--font-title);
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
}

.pro-team {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
}

.pro-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

.pro-bio {
  font-size: 10px;
  color: #6a7a9a;
  line-height: 1.55;
  padding-bottom: 12px;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pro-bio::-webkit-scrollbar {
  display: none;
}

.pro-instagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  margin-top: auto;
  background: rgba(59, 158, 255, 0.08);
  border: 1px solid rgba(59, 158, 255, 0.2);
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.pro-instagram:hover {
  background: rgba(59, 158, 255, 0.15);
  border-color: var(--accent);
}

.pro-instagram svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 0 4px;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--accent);
  color: var(--text);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: default;
}

.page-dots {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 0 2px;
}

.page-info {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Error */
.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 16px;
  color: #f87171;
  font-size: 14px;
  text-align: center;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  z-index: 50;
  background: var(--bg);
}

.footer-left {
  color: #3a4a60;
}

.footer-links {
  color: #3a4a60;
}

.footer-links a {
  color: #3a4a60;
  text-decoration: none;
  transition: color 0.2s;
}

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