:root {
  color-scheme: dark;
  --bg-color: #0b0b0f;
  --card-bg: rgba(18, 18, 24, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --line: rgba(255, 255, 255, 0.08);

  /* Premium Gradients */
  --primary-gradient: linear-gradient(135deg, #ff1e27 0%, #d2001a 50%, #7d00b5 100%);
  --btn-hover-gradient: linear-gradient(135deg, #ff3840 0%, #e6001d 50%, #9000cc 100%);
  --text-gradient: linear-gradient(135deg, #ffffff 40%, #ff6b73 100%);
  
  --accent-glow: rgba(229, 9, 20, 0.25);
  --success-color: #10b981;
  --error-color: #f43f5e;
  --warning-color: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Background glows */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  mix-blend-mode: screen;
}

.orb-1 {
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.9) 0%, rgba(125, 0, 181, 0) 70%);
  animation: float-orb-1 18s infinite alternate ease-in-out;
}

.orb-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(125, 0, 181, 0.9) 0%, rgba(229, 9, 20, 0) 70%);
  animation: float-orb-2 24s infinite alternate ease-in-out;
}

@keyframes float-orb-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 12%) scale(1.1); }
}

@keyframes float-orb-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10%, -6%) scale(1.15); }
}

.shell {
  min-height: 100vh;
  width: min(460px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.claim-box {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px;
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 50px rgba(229, 9, 20, 0.05);
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(229, 9, 20, 0.45));
  animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(229, 9, 20, 0.45));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 28px rgba(229, 9, 20, 0.75));
  }
}

h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 26px;
}

/* Timer styles */
.timer-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 28px;
  text-align: center;
}

.timer-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.timer-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 4px;
}

.timer-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.timer-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Button styles */
button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-gradient);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

button:hover:not(:disabled) {
  background: var(--btn-hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(229, 9, 20, 0.35);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Results panel */
.result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-align: center;
}

.status-badge-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.status-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}

.status-badge.checking {
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.08);
}

.status-badge.eligible {
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.08);
}

.status-badge.not-eligible {
  color: var(--error-color);
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.08);
}

.allocation-container {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.alloc-title {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.result strong {
  display: block;
  color: var(--text-primary);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 500;
}

.tx-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.tx-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.external-icon {
  width: 14px;
  height: 14px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 6, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  animation: fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  position: relative;
  width: min(390px, 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: #111116;
  padding: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
  from { transform: translateY(12px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.modal-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.wallet-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  box-shadow: none;
  justify-content: flex-start;
}

.wallet-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.01);
}

.wallet-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.metamask-icon {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M29.56 16L16 2L2.44 16L16 30L29.56 16Z" fill="%23E2761B"/><path d="M16 30L29.56 16L24.8 14.4L16 30Z" fill="%23E2761B"/></svg>');
}

.core-icon {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 2L2 9V23L16 30L30 23V9L16 2Z" fill="%23E20613"/></svg>');
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  box-shadow: none;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.close-button svg {
  width: 14px;
  height: 14px;
}

#walletModalMessage {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Responsive Overrides */
@media (max-width: 480px) {
  .shell {
    padding: 20px 0;
  }
  .claim-box {
    padding: 24px;
    border-radius: 20px;
  }
  h1 {
    font-size: 26px;
  }
  .timer-number {
    font-size: 28px;
  }
  .timer-label {
    font-size: 8px;
  }
  .result strong {
    font-size: 24px;
  }
}

@media (max-width: 340px) {
  .timer-number {
    font-size: 22px;
  }
  .timer-label {
    letter-spacing: 0px;
  }
}
