/* ===== WALLET CONNECT - UPDATE ===== */
.btn-connect-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #1e3a2b, #2a503b);
  border: 2px solid #6fcf97;
  color: #d6ffe6;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  box-shadow: 4px 4px 0px #0a1a12;
  transition: 0.2s;
  min-width: 140px;
  justify-content: center;
}

.btn-connect-wallet:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0a1a12;
  background: #2a503b;
}

.btn-connect-wallet.connected {
  background: linear-gradient(135deg, #2d1a1a, #3a1a1a);
  border-color: #cf6f6f;
  color: #ffb5b5;
}

.btn-connect-wallet.connected:hover {
  background: #4a1a1a;
  border-color: #ff6f6f;
}

.btn-connect-wallet i {
  color: #6fcf97;
}

.btn-connect-wallet.connected i {
  color: #cf6f6f;
}

.btn-connect-wallet:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0b0d0e;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  color: #e3f0e6;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  image-rendering: pixelated;
  transition: filter 0.3s ease;
}

.pixel-wrapper {
  max-width: 900px;
  width: 100%;
  background: #111415;
  border: 4px solid #2d4a3b;
  box-shadow: 0 0 0 2px #1f2e27, 0 0 0 6px #0a0f0c;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* ===== HEADER ===== */
.hood-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 4px dashed #2d4a3b;
  padding-bottom: 1.2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.robinhood-icon {
  display: flex;
  align-items: center;
  background: #1e2d25;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  border: 2px solid #6fcf97;
  gap: 0.5rem;
}

.robinhood-icon svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 4px #8effb5);
}

.robinhood-icon span {
  font-size: 0.6rem;
  color: #b5ffb5;
  font-family: 'Press Start 2P', monospace;
}

.brand-name {
  font-size: 1.5rem;
  color: #b5ffb5;
  text-shadow: 3px 3px 0px #0a1a12;
  font-family: 'Press Start 2P', monospace;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1c2d24;
  border: 2px solid #6fcf97;
  color: #b5ffb5;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  box-shadow: 4px 4px 0px #0a1a12;
  transition: 0.2s;
}

.btn-back:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0a1a12;
}

/* ===== WALLET CONNECT ===== */
.btn-connect-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #1e3a2b, #2a503b);
  border: 2px solid #6fcf97;
  color: #d6ffe6;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  box-shadow: 4px 4px 0px #0a1a12;
  transition: 0.2s;
}

.btn-connect-wallet:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0a1a12;
  background: #2a503b;
}

.btn-connect-wallet.connected {
  background: #1c2d24;
  border-color: #9affb0;
  cursor: default;
}

.btn-connect-wallet i {
  color: #6fcf97;
}

.wallet-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0a0f0c;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 2px solid #2d4a3b;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
}

/* ===== CREATE AGENT FORM ===== */
.create-agent-container {
  margin: 2rem 0;
}

.page-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 3px 3px 0px #0a1a12;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.page-title i {
  color: #6fcf97;
}

.page-subtitle {
  text-align: center;
  color: #8fb3a0;
  font-size: 0.65rem;
  margin-bottom: 2rem;
  font-family: 'Press Start 2P', monospace;
}

.agent-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.7rem;
  color: #b5ffb5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 2px 2px 0px #0a1a12;
}

.form-group label i {
  color: #6fcf97;
  font-size: 0.8rem;
}

.form-group input[type="text"],
.form-group input[type="file"] {
  padding: 0.8rem 1rem;
  background: #0a0f0c;
  border: 2px solid #2d4a3b;
  border-radius: 4px;
  color: #e3f0e6;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  transition: 0.2s;
}

.form-group input[type="text"]:focus {
  border-color: #6fcf97;
  outline: none;
  box-shadow: 0 0 20px #2aff8a33;
}

.form-group input[type="text"]::placeholder {
  color: #4a6b5a;
}

.form-group small {
  font-size: 0.45rem;
  color: #7a9e89;
  font-family: 'Press Start 2P', monospace;
}

/* ===== FILE UPLOAD ===== */
.file-upload-wrapper {
  position: relative;
  border: 2px dashed #2d4a3b;
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  background: #0a0f0c;
}

.file-upload-wrapper:hover {
  border-color: #6fcf97;
  background: #0f1814;
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-placeholder i {
  font-size: 2rem;
  color: #6fcf97;
  margin-bottom: 0.5rem;
}

.file-upload-placeholder p {
  font-size: 0.6rem;
  color: #b5ffb5;
  font-family: 'Press Start 2P', monospace;
}

.file-upload-placeholder small {
  font-size: 0.45rem;
  color: #7a9e89;
  font-family: 'Press Start 2P', monospace;
}

.file-preview {
  margin-top: 1rem;
  display: none;
}

.file-preview img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 4px;
  border: 2px solid #6fcf97;
  image-rendering: pixelated;
}

/* ===== AUTO FIELDS ===== */
.auto-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: #0a0f0c;
  padding: 1.5rem;
  border-radius: 4px;
  border: 2px solid #2d4a3b;
}

@media (max-width: 580px) {
  .auto-fields {
    grid-template-columns: 1fr;
  }
}

.auto-field-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111415;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  border: 1px solid #2d4a3b;
  min-height: 40px;
}

.auto-value {
  font-size: 0.6rem;
  color: #b5ffb5;
  font-family: 'Press Start 2P', monospace;
}

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.45rem;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: #1e3a2b;
  color: #b5ffb5;
  border: 1px solid #6fcf97;
}

.status-badge.default {
  background: #2d1a2d;
  color: #e6b5ff;
  border: 1px solid #b56fcf;
}

/* ===== FORM ACTIONS ===== */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn-reset,
.btn-submit {
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid;
}

.btn-reset {
  background: #1c1c1c;
  color: #8fb3a0;
  border-color: #3b5e4b;
  box-shadow: 4px 4px 0px #0a0f0c;
}

.btn-reset:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0a0f0c;
}

.btn-submit {
  background: #1e3a2b;
  color: #d6ffe6;
  border-color: #6fcf97;
  box-shadow: 4px 4px 0px #0a1a12;
}

.btn-submit:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0a1a12;
  background: #2a503b;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== RESPONSE MESSAGE ===== */
.response-message {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', monospace;
  text-align: center;
}

.response-message.success {
  background: #1e3a2b;
  border: 2px solid #6fcf97;
  color: #b5ffb5;
}

.response-message.error {
  background: #3a1a1a;
  border: 2px solid #cf6f6f;
  color: #ffb5b5;
}

/* ===== LOADING OVERLAY & POPUP ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== LOADING POPUP - TIDAK KENA BLUR ===== */
.loading-popup {
  background: #111415;
  border: 4px solid #2d4a3b;
  border-radius: 8px;
  padding: 2.5rem 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 
    0 0 0 2px #1f2e27, 
    0 0 0 6px #0a0f0c, 
    0 0 60px rgba(0, 255, 170, 0.15);
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

@keyframes popIn {
  from {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.loading-icon {
  font-size: 4rem;
  color: #6fcf97;
  margin-bottom: 1rem;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.loading-spinner {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.pixel-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #2d4a3b;
  border-top: 4px solid #6fcf97;
  border-radius: 4px;
  animation: spin 1s linear infinite;
  image-rendering: pixelated;
  position: relative;
}

.pixel-spinner::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid rgba(111, 207, 151, 0.2);
  border-radius: 4px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.2rem;
  color: #b5ffb5;
  margin-bottom: 0.3rem;
  text-shadow: 3px 3px 0px #0a1a12;
  font-family: 'Press Start 2P', monospace;
}

.loading-subtitle {
  font-size: 0.6rem;
  color: #8fb3a0;
  margin-bottom: 1.5rem;
  font-family: 'Press Start 2P', monospace;
}

.loading-progress {
  margin: 1.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #0a0f0c;
  border: 2px solid #2d4a3b;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2d4a3b, #6fcf97, #b5ffb5);
  width: 0%;
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.5rem;
  color: #b5ffb5;
  font-family: 'Press Start 2P', monospace;
}

.loading-steps {
  text-align: left;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #0a0f0c;
  border-radius: 4px;
  border: 2px solid #1f2e27;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0;
  font-size: 0.5rem;
  font-family: 'Press Start 2P', monospace;
  color: #4a6b5a;
  transition: all 0.3s;
}

.step i {
  font-size: 0.6rem;
  color: #2d4a3b;
  transition: all 0.3s;
  width: 16px;
  text-align: center;
}

.step.active {
  color: #b5ffb5;
}

.step.active i {
  color: #6fcf97;
  animation: pulse 1s ease-in-out infinite;
}

.step.completed {
  color: #6fcf97;
}

.step.completed i {
  color: #6fcf97;
}

/* ===== FIX UNTUK STEP COMPLETED ICON ===== */
.step.completed i.fa-circle {
  color: #6fcf97;
}

.step.completed i.fa-check-circle {
  color: #6fcf97;
}

.step.completed i.fa-spinner {
  display: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.loading-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.5rem;
  background: #0a0f0c;
  border-radius: 4px;
  border: 1px solid #1f2e27;
  font-size: 0.5rem;
  font-family: 'Press Start 2P', monospace;
  color: #8fb3a0;
}

.loading-status i {
  color: #6fcf97;
}

/* ===== BLUR EFFECT - HANYA UNTUK BACKGROUND ===== */
body.loading-active .pixel-wrapper {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

body.loading-active .pixel-wrapper * {
  pointer-events: none;
}

/* ===== PASTIKAN LOADING POPUP TIDAK TERKENA BLUR ===== */
body.loading-active .loading-popup,
body.loading-active .loading-popup * {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto !important;
}

/* ===== FOOTER ===== */
.footer-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 4px dashed #2d4a3b;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.45rem;
  color: #7a9e89;
  font-family: 'Press Start 2P', monospace;
}

.footer-note a {
  color: #b5ffb5;
  text-decoration: none;
  border-bottom: 2px dotted #3b5e4b;
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fa-spin {
  animation: spin 1s linear infinite;
}