/* === Body Background (soft gradient) === */
body {
    background: linear-gradient(135deg, #2a2a2f, #151519);
    background-size: 400% 400%;
    animation: animatedBackground 20s ease infinite;
    font-family: 'Poppins', sans-serif;
    color: #333;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  
  @keyframes animatedBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  /* === Card === */

.card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 460px;
    margin: auto;
  
    background: linear-gradient(135deg, #212327, #0c0d0f),
                linear-gradient(135deg, #404040, #121619) border-box;
    
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    
    border: 1px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
  
    /* Outer shadow */
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 1);
    z-index: 1;
    overflow-x: hidden;
  
    
  }
  
  /* Pseudo-element for gradient inner glow */
  .card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    padding: 2px; /* Control thickness of the glow */
    background: linear-gradient(135deg, #121619, #0c0d0f);
    opacity: 0.4;
    filter: blur(20px);
    z-index: -1;
    pointer-events: none;
  }
  

  .card-wrapper {
    display: inline-block;
    background: black;
    padding: 2px; /* thickness of black border */
    border-radius: 2.2rem;
    box-sizing: border-box;
    animation: fadeInUp 1s ease;
  }
  
  
  /* === Card Animation === */
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* === Mode Toggle Buttons (Buy/Sell) === */
  

.mode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #232323;
    border-radius: 20px;
    padding: 2px;
    width: fit-content;
    margin: auto;
  }
  
  .btn-toggle {
    flex: none;
    background: linear-gradient(145deg, #1f1f1f, #1f1f1f);
    border: none;
    color: #d2d4d3;
    font-weight: 600;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border-radius: 0; /* We'll fix corner radius separately */
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.6),
                inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    margin:0;
    position: relative;
    z-index: 0;
  }
  
  .btn-toggle:first-child {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
  
  .btn-toggle:last-child {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
  }
  
  .btn-toggle.active {
    background: #ebeef1;
    box-shadow: none;
    border-radius: 20px; /* Fully rounded pill shape for active */
    color: #000;
    font-weight: 700;

  }
  
  .btn-toggle:hover {
    background: #ebeef1;
    box-shadow: none;
    color: #000;
  }

/* === NavBar === */

.navbar {
    width: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 9999;
  }
  
  .container-navbar {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    height: 40px;
  }
  
  .nav-links a {
    color: #ffffff;
    margin-left: 2rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
  }
  
  .nav-links a:hover {
    color: #d4af37;
  }


  /* === Background Animation === */

  .background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10; /* Sit far behind everything */
    background: 
      radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.03) 0%, transparent 40%),
      radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 30%);
    background-size: 200% 200%;
    animation: moveBackground 60s ease infinite alternate;
    pointer-events: none;
  }
  
  /* Animation for background movement */
  @keyframes moveBackground {
    0% {
      background-position: 0% 0%;
    }
    100% {
      background-position: 100% 100%;
    }
  }
  
  

  
  
  /* === Form Labels === */
  .form-label {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    text-align: left;
    display: block;
  }
  
  /* === Inputs and Selects === */
  .form-control, .form-select, .select2-selection {
    background: #1b1c1e; /* Darker background */
    border: 1px solid #2a2a2d; /* Subtle border */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 1rem;
    padding: 1rem;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    /* New inset shadow for pressed look */
  box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8),
  inset -3px -3px 6px rgba(43, 43, 43, 0.2);
  }
  
  .form-control:focus, .form-select:focus, .select2-selection:focus {
    background: #1b1c1e; /* No color change on click */
    color: #d2d4d3; /* Keep text light */
    border: 1px solid #2a2a2d; /* Keep border subtle */
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8),
                inset -3px -3px 6px rgba(60,60,60,0.2); /* Same pressed shadow */
  }
  
  /* Placeholder color inside normal input fields */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: #bfc1c2; /* Light grey */
  opacity: 1; /* Full opacity */
}

  
  
  /* === Input Icons === */
  .input-icon-wrapper {
    position: relative;
    
  }
  
  .input-icon-wrapper input,
  .input-icon-wrapper .form-select {
    padding-right: 3rem !important;
  }
  
  .input-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
  }
  
  /* === Select2 Dropdown === */
  .select2-container--default .select2-selection--single {
    height: 55px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding-left: 1rem;
  }
  
  .select2-container--default .select2-results__option {
    background: #ffffff;
    color: #333;
  }
  
  .select2-container--default .select2-results__option:hover {
    background: #f0f0f0;
  }
  
  /* === InfoBox (Calculation Summary) === */
  #infoBox {
    background: #24433c;
    color: #feffff;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    padding: 1rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
    border:1px solid #000;
  }
  
  /* === Rate Notice === */
  #rateNotice {
    color: #feffff !important; 
    font-size: 0.95rem;
    margin-top: 1rem;
    text-align: center;
  }
  
  /* === Start Button === */
  .start-button {
    background: linear-gradient(135deg, #4783f0, #3b6fd0); /* Blue gradient */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Soft light border */
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.9rem 2.5rem;
    border-radius: 20px;
    margin-top: 2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Pop out effect */
    text-align: center;
    z-index: 999;
  }
  
  .start-button:hover {
    background: linear-gradient(135deg, #3b6fd0, #2f5bb3); /* Slightly darker on hover */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px) scale(1.03);
  }
  
  
  /* === Readonly Output Field === */
  .readonly-field {
    background: #1b1c1e; /* Match dark theme */
    border: 1px solid #2a2a2d; /* Subtle dark border */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    color: #d2d4d3;
    
    /* Inset bevel pressed look */
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8),
                inset -3px -3px 6px rgba(60,60,60,0.2);
  }
  
  
  /* === Step 2 Summary Text === */
  .summaryText {
    background-color: #24433c;
    color: #feffff;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
    border: 1px solid black;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05),
                inset 0 0 15px rgba(36, 67, 100, 0.05);
  }
  
  
  .highlight {
    color: #00c545;
    font-weight: 700;
  }
  
  #summaryRate {
    color: #feffff !important;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  /* === Phone Number Input Group === */

  .input-group {
    background: #1b1c1e;
    border: 1px solid #2a2a2d;
    border-radius: 20px;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.8),
                inset -3px -3px 6px rgba(43,43,43,0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  
  

  .input-group-text {
    background: #1b1c1e;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.05); /* << ADD THIS */
    color: #bfc1c2;
    font-weight: 600;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  
  
  #phoneInput {
    background: #1b1c1e;
    border: none;
    color: #d2d4d3;
    font-size: 1rem;
    padding: 1rem;
    flex: 1;
    border-radius: 0;
    height: 55px;
  }
  
  #phoneInput::placeholder {
    color: #bfc1c2;
    opacity: 1;
  }
  
/* === Back Button / Next Button === */
  
#backBtn, #nextBtn {
    padding:1em 2em 1em 2em;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 20px;
}

  /* === Info Section Under Card === */
  .info-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    margin-top: 3rem;
  }
  
  .info-section h5 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #333;
  }
  
  .info-section p {
    color: #666;
    font-size: 1rem;
    margin-top: 0.5rem;
  }
  
  /* === STEP 3 STYLES === */

  .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top: 4px solid #00c545;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;

    /* Fancy glow and gradient */
    background: radial-gradient(circle at center, rgba(0, 255, 100, 0.15) 0%, transparent 70%);
    box-shadow:
        0 0 10px rgba(0, 255, 100, 0.3),
        0 0 20px rgba(0, 255, 100, 0.2),
        0 0 30px rgba(0, 255, 100, 0.1);
    margin: 30px auto;
    position: relative;
}


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

.spinner-text {
  color: #00c545;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  margin-top: 10px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


.copy-button-small {
    background-color: #6c757d; /* Sleeker gray */
    border: none;
    color: white;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px; /* Slightly more rounded */
    cursor: pointer;
    display: inline-flex; /* align icon + text nicely */
    align-items: center;
    gap: 6px; /* space between icon and text */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s, transform 0.2s;
}

.copy-button-small:hover {
    background-color: #5a6268;
    transform: translateY(-2px); /* subtle lift on hover */
}



.main-header {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #cfcfcf;
}

.summary-box {
    text-align: center;
    margin-bottom: 20px;
}

.rate-text {
    font-size: 16px;
    color: #e3e3e3;
    margin-top: 10px;
}

.instruction-box {
    color: #dddddd;
    padding: 15px;
    border-radius: 20px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 700px;
    line-height: 1.6;
}


.notice-box {
    color: #dddddd;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700; /* corrected (no px) */
    line-height: 1.6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05),
                inset 0 0 15px rgba(36, 67, 100, 0.05);
    background: rgba(187, 33, 36, 0.5);
    padding: 20px 15px;
    text-align: center; /* New - to center the icon and text */
    position: relative;
    width: 100%;
    box-sizing: border-box;
}
.notice-box i {
    font-size: 40px;
    color: #ffcc00; /* Yellowish color for warning */
    margin-bottom: 10px;
    display: inline-block;
}

.wallet-address {
  font-size: 24px;
  word-break: break-word;
  display: inline-block;
  max-width: 100%;
  text-align: center;
}

@media (max-width: 576px) {
  .wallet-address {
    font-size: 18px;
  }
}



.instruction-warning {
    color: #dddddd;
    padding: 0px;
    border-radius: 20px;
    margin: 30px 0;
    font-size: 18px;
    font-weight: 700px;
    line-height: 1.6;
}

.payment-details, .user-info {
    padding: 15px 0;
    color: #fff;
}

.payment-details div,
.user-info div {
    flex-wrap: wrap;
}

.payment-details {
  background-color: #24433c;
  color: #feffff;
  border: 1px solid black;
  border-radius: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05),
              inset 0 0 15px rgba(36, 67, 100, 0.05);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.account-number {
    font-size: 22px;
    font-weight: bold;
    word-break: break-all; /* important */
    text-align: center;
}

#zenosBankName {
  word-break: break-word; /* bank name wraps naturally */
  text-align: center;
}

.step3-wrapper {
  width: 100%;
  max-width: 100%;
  padding: 15px;
  box-sizing: border-box;
}

#transactionPendingScreen,
#zenosBankAccount,
#userWallet,
.account-number,
span,
p {
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}


@media (max-width: 576px) {
  .main-header {
    font-size: 22px;
    text-align: center;
  }

  .summary-box h3,
  .rate-text {
    font-size: 16px;
    text-align: center;
  }

  .account-number {
    font-size: 18px;
    text-align: center;
  }

  .copy-button-small {
    padding: 5px 10px;
    font-size: 12px;
  }

  .payment-details,
  .user-info,
  .notice-box,
  .instruction-box {
    padding: 12px;
    font-size: 15px;
    text-align: center;
  }

  .payment-details div,
  .user-info div {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/** REGISTRATION SUCCESS **/

.success-checkmark {
  width: 80px;
  height: 80px;
  stroke: #00c545;
  stroke-width: 4;
  stroke-linecap: round;
  overflow: visible;        /* ✅ Critical to avoid clipping */
  display: inline-block;
  animation: pop 0.4s ease-out forwards;
  shape-rendering: geometricPrecision;
  margin-top:-40px;
}

#registerSuccess {
  padding: 20px;
  overflow: visible;
}

.success-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px; /* Adjust as needed */
  flex-direction: column;
  text-align: center;
}

.card.compact-success {
  min-height: 100px; /* Adjust based on your checkmark size */
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke: #00c545;
  animation: strokeCircle 0.6s ease-in-out forwards;
}

.success-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: strokeCheck 0.4s 0.4s ease-in-out forwards;
}

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

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

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}


/** INSUFFICIENT BALANCE **/

.alert-box {
  background: rgba(255, 75, 75, 0.15);
  border: 1px solid rgba(255, 100, 100, 0.4);
  color: #ffb3b3;
  font-weight: 600;
  padding: 14px 20px;
  margin-bottom: 20px;
  border-radius: 15px;
  text-align: center;
  backdrop-filter: blur(5px);
  animation: slideFadeIn 0.5s ease-out;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99;
  border-radius: 2rem;
}

.loader-spinner {
  border: 4px solid #333;
  border-top: 4px solid #00c545;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
  margin-bottom: 15px !important;

}

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

.loader-text {
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

/** FORM VALIDATION **/

.validation-notice {
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  margin-top: 6px;
  color: #ffffff; /* Neutral by default */
  transition: color 0.3s ease;
}

.validation-notice.invalid {
  color: #ff5555; /* Bright red for error */
}
