/* ---------------- Presale Section ---------------- */
.presale-container {
  background: linear-gradient(180deg, #111 0%, #1a1a1a 100%);
  border: 2px solid gold;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
  margin: 20px auto;
}

.counter {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 8px;
}

.counter div {
  background: #222;
  border-radius: 10px;
  padding: 12px 5px;
  flex: 1;
  border: 1px solid #333;
}

.counter div span {
  font-size: 24px;
  font-weight: bold;
  color: #d4af37;
}

.counter div p {
  margin: 5px 0 0;
  font-size: 12px;
  color: #aaa;
}

.progress-container {
  width: 100%;
  background: #222;
  border-radius: 10px;
  margin: 15px 0;
  overflow: hidden;
}

.progress-bar {
  height: 20px;
  background: linear-gradient(90deg, #d4af37, #f1e5ac);
  border-radius: 10px;
  width: 0%;
  transition: width 1s ease-in-out;
}

.info-text {
  margin: 8px 0;
  font-size: 14px;
}

.highlight {
  color: #d4af37;
  font-weight: bold;
}

.bonus-text {
  color: #4caf50;
  font-weight: 600;
  margin: 5px 0;
}

input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #d4af37;
  background: #111;
  color: #fff;
  text-align: center;
  font-size: 16px;
}

input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ---------------- Referral Section ---------------- */
.referral-section {
  margin: 15px 0;
  text-align: left;
  background: rgba(212, 175, 55, 0.08);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.referral-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.referral-toggle span {
  margin-left: 10px;
  font-weight: 500;
}

.referral-content {
  display: none;
  margin-top: 10px;
}

.ref-link-container {
  display: flex;
  margin-top: 10px;
}

.ref-link-container input {
  border-radius: 10px 0 0 10px;
  margin: 0;
  text-align: left;
  font-size: 14px;
}

.copy-btn {
  width: auto;
  padding: 12px 15px;
  border-radius: 0 10px 10px 0;
  background: #333;
  color: #d4af37;
  cursor: pointer;
}

.ref-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.stat-box {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #d4af37;
}

.stat-label {
  font-size: 12px;
  color: #aaa;
}

/* ---------------- Buttons ---------------- */
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

.connect-btn {
  background: #0044ff;
  color: white;
}

.connect-btn:hover { 
  background: #0033cc; 
  transform: translateY(-2px);
}

.buy-btn {
  background: #d4af37;
  color: black;
  font-weight: bold;
}

.buy-btn:hover { 
  background: #b8962e; 
  transform: translateY(-2px);
}

.generate-btn {
  background: #4caf50;
  color: white;
  font-weight: 600;
}

.generate-btn:hover {
  background: #3d8b40;
  transform: translateY(-2px);
}

/* ---------------- Modals ---------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}

.modal-content {
  background: #111;
  border: 2px solid gold;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  color: #fff;
  box-shadow: 0 0 25px rgba(212,175,55,0.6);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #d4af37;
  font-size: 24px;
  cursor: pointer;
  width: auto;
  padding: 0;
}

/* Transaction Modal */
.tx-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.tx-icon i {
  font-size: 40px;
  color: #d4af37;
  transition: transform 0.3s ease;
}

.tx-text {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-top: 15px;
}

/* ---------------- Notification Modal ---------------- */
#notificationModal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 300px;
  max-width: 400px;
  background: #111;
  border: 2px solid gold;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 25px rgba(212,175,55,0.6);
  animation: fadeIn 0.3s ease forwards;
}

#notificationText {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin: 10px 0;
}

#notificationModal .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #d4af37;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
}

/* ---------------- Toast Notifications ---------------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #111;
  color: #fff;
  border: 2px solid gold;
  border-radius: 12px;
  padding: 15px 20px;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 15px rgba(212,175,55,0.6);
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.5s forwards, fadeOut 0.5s 4.5s forwards;
}

.toast i {
  font-size: 20px;
}

.toast.success { border-color: #4caf50; }
.toast.error   { border-color: #f44336; }
.toast.info    { border-color: #2196f3; }

/* ---------------- Animations ---------------- */
@keyframes fadeIn {
  0% {opacity: 0;}
  100% {opacity: 1;}
}

@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ---------------- Mobile Optimization ---------------- */
@media (max-width: 768px) {
  .presale-container { padding: 20px 15px; margin: 10px; }
  .counter div { padding: 10px 3px; }
  .counter div span { font-size: 18px; }
  .ref-stats { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  .counter div span { font-size: 16px; }
  .counter div p { font-size: 10px; }
  .referral-section { padding: 10px; }
}
