
html {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  margin: 0;
  padding: 0;
  direction: rtl;
  min-height: 100vh;
}

.top-bar {
  background: #fff;
  padding: 15px 30px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar img {
  height: 28px;
}

.top-bar div {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.container {
  max-width: 1000px;
  margin: 30px auto;
  background: #fff;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-section {
  margin-bottom: 30px;
}

.user-box {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.user-box:focus-within {
  border-color: #ff004f;
  box-shadow: 0 0 0 3px rgba(255, 0, 79, 0.1);
}

.user-box img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-left: 20px;
  border: 3px solid #ff004f;
  transition: all 0.3s ease;
  object-fit: cover;
}

.user-info {
  flex-grow: 1;
  display: flex;
  gap: 15px;
  align-items: center;
}

#username {
  flex: 1;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #fff;
}

#username:focus {
  outline: none;
  border-color: #ff004f;
  box-shadow: 0 0 0 3px rgba(255, 0, 79, 0.1);
}

#verifyBtn {
  background: linear-gradient(45deg, #ff004f, #ff3366);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#verifyBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 79, 0.3);
}

#verifyBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.verification-status {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

.verification-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.verification-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.coins-section {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.coins-section h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 20px;
}

.coins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.coin-box {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.coin-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 79, 0.1), transparent);
  transition: left 0.5s ease;
}

.coin-box:hover::before {
  left: 100%;
}

.coin-box:hover {
  border-color: #ff004f;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 0, 79, 0.2);
}

.coin-box.selected {
  border-color: #ff004f;
  background: linear-gradient(135deg, #fff5f8, #fff);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 79, 0.3);
}

.coin-amount {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.coin-price {
  color: #ff004f;
  font-size: 18px;
  font-weight: 600;
}

.coin-box.special {
  background: linear-gradient(135deg, #fff8dc, #fffacd);
  border-color: #ffd700;
}

.coin-box.special:hover {
  border-color: #ffa500;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.coin-box.special.selected {
  border-color: #ffa500;
  background: linear-gradient(135deg, #fff8dc, #fffacd);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.coin-box.special .coin-price {
  color: #ff8c00;
  font-size: 14px;
}

#customCoins {
  width: 100%;
  padding: 8px 12px;
  margin-top: 10px;
  border: 2px solid #ffd700;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  background: #fff;
  transition: all 0.3s ease;
}

#customCoins:focus {
  outline: none;
  border-color: #ffa500;
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
}

.total {
  font-weight: bold;
  font-size: 20px;
  margin: 20px 0;
  text-align: left;
  color: #333;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #ff004f;
}

.btn-recharge {
  background: linear-gradient(45deg, #ff004f, #ff3366);
  color: white;
  border: none;
  border-radius: 12px;
  width: 100%;
  padding: 15px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-recharge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 79, 0.3);
}

.btn-recharge:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.popup, .overlay {
  display: none;
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
}

.overlay.show {
  display: block;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  backdrop-filter: blur(5px);
}

.popup.show {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-box {
  background: white;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  max-width: 400px;
  margin: 20px;
  animation: popupAnimation 0.3s ease-out;
}

@keyframes popupAnimation {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup-box button {
  background: linear-gradient(45deg, #ff004f, #ff3366);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  margin-top: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.popup-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 79, 0.3);
}

#popupIcon {
  font-size: 48px;
  margin-bottom: 15px;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.social-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.social-btn.facebook {
  background: #1877f2;
}

.social-btn.twitter {
  background: #1da1f2;
}

.social-btn.whatsapp {
  background: #25d366;
}

.social-btn.telegram {
  background: #0088cc;
}

.social-btn.copy {
  background: #17a2b8;
}

.social-btn.skip {
  background: #6c757d;
  font-size: 12px;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.confirm-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.confirm-btn.yes {
  background: #28a745;
  color: white;
}

.confirm-btn.no {
  background: #6c757d;
  color: white;
}

.confirm-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff004f;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 15px;
    padding: 20px;
  }
  
  .user-info {
    flex-direction: column;
    gap: 10px;
  }
  
  #verifyBtn {
    width: 100%;
  }
  
  .coins {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .coin-box {
    padding: 15px;
  }
}
