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

body {
  font-family: "Fredoka", sans-serif;
  background: #922ef3;
  min-height: 100vh;
  color: white;
  padding: 20px;
  /* background: url(./images/bg.jpg); */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

body::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  background-image: url(/images/brawl-pattern-new.png);
  background-repeat: repeat;
  background-size:
    197px 197px,
    100%;
  opacity: 0.4;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  padding: 10px 20px 15px;
}

.header h1 {
  font-size: 3em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 3px 3px 0px rgb(0, 0, 0);
}

.header p {
  font-size: 1.2em;
  color: #fff;
  font-weight: bold;
  text-shadow: 2px 2px 0px rgb(0, 0, 0);
}

.gems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

.gem-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  border: 2px solid #000;
  box-shadow:
    0 2px 0 #000,
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 3px 0 rgba(228, 208, 255, 0.4),
    inset 0 0 0 1px #000;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.gem-image {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.gem-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(0, 255, 4, 0.6));
  animation: gemFloat 3s ease-in-out infinite;
}

@keyframes gemFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.gem-info {
  text-align: center;
}

.gem-amount {
  font-size: 48px;
  font-weight: 900;
  color: #ffd700;
  text-shadow:
    0 4px 3px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.5);
  letter-spacing: 2px;
}

.gem-label {
  font-size: 18px;
  font-weight: bold;
  color: #00fff2;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: -5px;
}

.claim-btn {
  background: linear-gradient(135deg, #ff3864 0%, #ff0844 100%);
  color: white;
  border: none;
  padding: 12px 40px;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 30px;
  cursor: pointer;
  box-shadow:
    0 4px 15px rgba(255, 8, 68, 0.4),
    inset 0 -2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}

.claim-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.claim-btn:hover::before {
  width: 400px;
  height: 300px;
}

.claim-btn:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 25px rgba(255, 8, 68, 0.6),
    inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.claim-btn:active {
  transform: scale(0.95);
}

/* Skins Grid */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* Skin Card */
.skin-card {
  background: #2a2d3a;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.skin-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 12px rgba(0, 0, 0, 0.4),
    0 16px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skin-card:active {
  transform: translateY(-4px);
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal */
.modal {
  background: #2a2d3a;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.modal-header {
  padding: 30px 30px 20px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: #3d4152;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
  background: #f44336;
  transform: rotate(90deg);
}

.modal-gem-preview img {
  max-width: 100px;
}

.modal-gem-info {
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.modal-gem-amount {
  font-size: 2rem;
}
.modal-gem-label {
  font-size: 1.5rem;
}

/* Modal Content */
.modal-content {
  padding: 30px;
}

.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 0.95em;
  font-weight: 600;
  color: #a8a8a8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1em;
  font-weight: 600;
  font-family: "Fredoka", sans-serif;
  background: #1e2029;
  border: 2px solid #3d4152;
  border-radius: 12px;
  color: #fff;
  transition: all 0.3s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-field:focus {
  outline: none;
  border-color: #5b8dee;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(91, 141, 238, 0.2);
}

.input-field::placeholder {
  color: #5a5a6a;
}

.search-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.2em;
  font-weight: 700;
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(135deg, #5b8dee 0%, #4a7bd8 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow:
    0 4px 12px rgba(91, 141, 238, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(91, 141, 238, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-btn:active {
  transform: translateY(0);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Error Message */
.error-message {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 12px;
  padding: 15px;
  color: #ff6b6b;
  font-weight: 500;
  text-align: center;
  margin-top: 15px;
  display: none;
}

.error-message.active {
  display: block;
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
  display: none;
}

.loading.active {
  display: block;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #5b8dee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Player Profile Result */
.player-result {
  display: none;
}

.player-result.active {
  display: block;
  animation: fadeIn 0.3s;
}

.player-card {
  background: linear-gradient(135deg, #3d4152 0%, #2f3241 100%);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.player-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #5b8dee, #4a7bd8);
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 141, 238, 0.4);
}

.player-name {
  font-size: 1.5em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.player-tag {
  font-size: 0.95em;
  color: #a8a8a8;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-item {
  background: #1e2029;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.85em;
  color: #a8a8a8;
  font-weight: 500;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #5b8dee;
}

.claim-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.2em;
  font-weight: 700;
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow:
    0 4px 12px rgba(76, 175, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.claim-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(76, 175, 80, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .header h1 {
    font-size: 2.2em;
  }

  .modal {
    margin: 0 10px;
  }
}

/* Progress Container */
.progress-container {
  text-align: center;
  padding: 30px 20px;
}

.progress-bar-wrapper {
  width: 100%;
  height: 8px;
  background: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 10px;
  transition: width 0.025s ease;
}

.progress-text {
  color: #e0e0e0;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.progress-percentage {
  color: #4caf50;
  font-size: 14px;
  font-weight: 600;
}

/* Verification Container */
.verification-container {
  text-align: center;
  padding: 30px 20px;
}

.verification-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.verification-title {
  color: #ff9800;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.verification-message {
  color: #a8a8a8;
  font-size: 14px;
  margin-bottom: 25px;
  line-height: 1.5;
}

.verify-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.verify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.verify-btn:active {
  transform: translateY(0);
}

/* countdown */
/* Super Compact Countdown */
.compact-countdown {
  background: linear-gradient(135deg, #e4002b 0%, #e7002b 100%);
  border-radius: 10px;
  padding: 10px 20px;
  margin: 20px auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 300px;
  box-shadow:
    0 2px 0 #000,
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 3px 0 rgba(228, 208, 255, 0.4),
    inset 0 0 0 1px #000;
}

.countdown-text {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.countdown-mini {
  font-size: 18px;
  font-weight: bold;
  color: #ffd700;
  font-family: "Fredoka", sans-serif;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.countdown-mini span {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

@media (max-width: 480px) {
  .compact-countdown {
    padding: 8px 15px;
  }

  .countdown-text {
    font-size: 12px;
  }

  .countdown-mini {
    font-size: 16px;
  }
}
