* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #0d0e12;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: #0d0e12;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  position: relative;
}

/* POKEDEX HEADER */
.pokedex-header {
  background-color: #dc0a2d;
  border: 4px solid #000000;
  border-radius: 24px;
  padding: 14px 16px;
  box-shadow: 0 8px 0 #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pokedex-lens {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #a8ecff 0%, #0088cc 60%, #004488 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.8), 0 4px 0 #000000;
  position: relative;
  animation: lensPulse 2.5s infinite ease-in-out;
}

.lens-reflection {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  position: absolute;
  top: 6px;
  left: 8px;
  filter: blur(1px);
}

@keyframes lensPulse {
  0%, 100% { box-shadow: 0 0 15px #00d2ff, inset 0 0 10px #ffffff; }
  50% { box-shadow: 0 0 30px #00d2ff, inset 0 0 20px #ffffff; }
}

.status-leds {
  display: flex;
  gap: 6px;
}

.led {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #000000;
}

.red-led { background-color: #ff3b30; animation: blink 1.5s infinite; }
.yellow-led { background-color: #ffcc00; }
.green-led { background-color: #34c759; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  background-color: rgba(0, 0, 0, 0.4);
  color: #ffcc00;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 204, 0, 0.5);
}

/* VIEWS */
.view-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hidden {
  display: none !important;
}

.hidden-input {
  display: none;
}

/* LOGO & MAIN TEXT */
.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pokemon-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(255, 204, 0, 0.3));
  animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.title {
  font-size: 20px;
  font-weight: 900;
  color: #ffcc00;
  margin-top: 8px;
  text-shadow: 0 2px 4px #000000;
}

.subtitle {
  font-size: 12px;
  color: #a1a1aa;
  margin-top: 4px;
}

.cache-info-badge {
  font-size: 10px;
  font-weight: 800;
  background-color: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 8px;
}

/* BUTTONS */
.action-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px;
}

.btn {
  width: 100%;
  padding: 15px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 3px solid #000000;
  box-shadow: 0 5px 0 #000000;
  transition: all 0.1s ease;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #000000;
}

.btn-yellow {
  background: linear-gradient(180deg, #ffde00 0%, #e6be00 100%);
  color: #111111;
}

.btn-blue {
  background: linear-gradient(180deg, #38b6ff 0%, #0077c8 100%);
  color: #ffffff;
}

.btn-red {
  background: linear-gradient(180deg, #ff3b30 0%, #c41e15 100%);
  color: #ffffff;
}

.icon {
  width: 22px;
  height: 22px;
}

/* DIVIDER */
.divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background-color: #27272a;
}

.divider-text {
  font-size: 11px;
  font-weight: 800;
  color: #71717a;
}

/* SEARCH BAR */
.search-bar-wrapper {
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 0 4px;
}

.search-input {
  flex: 1;
  background-color: #181c24;
  border: 2px solid #3f3f46;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
  user-select: text;
  -webkit-user-select: text;
}

.search-input:focus {
  border-color: #38b6ff;
}

.btn-search {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffde00 0%, #e6be00 100%);
  border: 2px solid #000000;
  box-shadow: 0 4px 0 #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-search:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000000;
}

.search-icon {
  width: 20px;
  height: 20px;
  color: #000000;
}

/* POKEDEX SCREEN & VIEWFINDER */
.pokedex-screen {
  width: 100%;
  background-color: #181c24;
  border: 4px solid #282e3d;
  border-radius: 24px;
  padding: 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 6px 0 #000000;
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: #000000;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewfinder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* LASER OVERLAY */
.laser-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(8, 51, 68, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
}

.laser-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #00f0ff, #ffffff, #00f0ff, transparent);
  box-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff;
  animation: laserScan 2s infinite ease-in-out;
  z-index: 10;
}

@keyframes laserScan {
  0% { top: 0%; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: 96%; opacity: 0.8; }
}

.scan-status-box {
  margin: auto;
  background-color: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  backdrop-filter: blur(4px);
  z-index: 20;
}

.scan-title {
  font-size: 12px;
  font-weight: 900;
  color: #00f0ff;
  letter-spacing: 1px;
  animation: blink 1s infinite;
}

.scan-desc {
  font-size: 10px;
  color: #a1a1aa;
  margin-top: 2px;
}

/* CARD RESULT MODAL */
.card-result-box {
  width: 100%;
  background-color: #181c24;
  border: 4px solid #ffcc00;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 8px 0 #000000;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-result-header {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #27272a;
  padding-bottom: 12px;
}

.card-art {
  width: 80px;
  height: 112px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3f3f46;
  background-color: #000000;
  flex-shrink: 0;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.rarity-badge {
  font-size: 10px;
  font-weight: 900;
  color: #ffcc00;
  background-color: rgba(255, 204, 0, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 204, 0, 0.4);
  text-transform: uppercase;
}

.card-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 2px;
}

.card-code {
  font-size: 10px;
  color: #38b6ff;
  font-family: monospace;
  margin-top: 4px;
}

/* PRICE GRID */
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.price-box {
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid #27272a;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 10px;
  font-weight: 800;
  color: #34c759;
}

.price-main {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 4px;
}

.price-sub {
  font-size: 10px;
  color: #71717a;
  font-family: monospace;
}

.price-detail {
  font-size: 11px;
  font-weight: 700;
  color: #d4d4d8;
  margin-top: 2px;
}

.cache-status-tag {
  font-size: 10px;
  font-weight: 800;
  color: #34c759;
  background-color: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.3);
  padding: 6px;
  border-radius: 8px;
  text-align: center;
}

/* FOOTER */
.pokedex-footer {
  text-align: center;
  padding: 8px 0;
  font-size: 10px;
  font-weight: 800;
  color: #52525b;
  letter-spacing: 1px;
}
