/* File: /assets/css/recharge-atm.css */

/* Reset và base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.recharge-atm-body {
  font-family: 'Arial', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.recharge-atm-container {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Tiêu đề */
.recharge-atm-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

/* Grid nạp tiền */
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.recharge-item {
  position: relative;
  height: 90px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.recharge-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  border-color: #667eea;
}

.recharge-item.active {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.recharge-item .amount {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.recharge-item .receive-label {
  font-size: 12px;
  color: #dc3545;
  margin: 3px 0;
}

.recharge-item .coin-amount {
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
}

.bonus-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

/* QR Payment */
.payment-info {
  margin: 20px 0;
  text-align: center;
}

.payment-info img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.qr-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

/* Buttons */
.btn-container {
  text-align: center;
  margin: 20px 0;
}

.recharge-btn {
  padding: 12px 40px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recharge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.recharge-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.recharge-btn.hide {
  display: none;
}

.refresh-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  padding: 8px 16px;
  font-size: 14px;
}

/* Lịch sử giao dịch */
.history-section {
  margin-top: 40px;
  border-top: 2px solid #e0e0e0;
  padding-top: 20px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.history-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.history-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
}

.history-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.history-table tr:hover {
  background-color: #f5f5f5;
}

.status-success {
  color: #4CAF50;
  font-weight: 600;
  background-color: rgba(76, 175, 80, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.amount-cell {
  font-weight: 600;
  color: #2196F3;
}

.no-history {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* Note section */
.note-section {
  margin-top: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}

.note-section strong {
  color: #333;
}

.note-section a {
  color: #667eea;
  text-decoration: none;
}

.note-section a:hover {
  text-decoration: underline;
}

/* Loading overlay */
.recharge-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.recharge-loading.hide {
  display: none;
}

.recharge-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .recharge-atm-container {
    padding: 20px;
  }

  .recharge-atm-title {
    font-size: 20px;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recharge-item {
    height: 80px;
  }

  .recharge-item .amount {
    font-size: 16px;
  }

  .recharge-item .coin-amount {
    font-size: 14px;
  }

  .recharge-btn {
    width: 100%;
    padding: 12px 20px;
  }

  .history-table {
    display: block;
    overflow-x: auto;
  }

  .history-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .history-table th,
  .history-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (min-width: 769px) {
  .recharge-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .history-table {
    font-size: 14px;
  }
}
.status-pending {
  color: #FF9800;
  font-weight: 600;
  background-color: rgba(255, 152, 0, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.status-failed {
  color: #f44336;
  font-weight: 600;
  background-color: rgba(244, 67, 54, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}
/* Thêm vào file CSS */

/* Header navigation */
.recharge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.back-home {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.back-home:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(-3px);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.user-coin {
  font-size: 12px;
  color: #4CAF50;
  font-weight: 600;
}

.user-id {
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 10px;
  margin-top: 2px;
}

.logout-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .recharge-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .user-profile {
    width: 100%;
    justify-content: center;
  }
}

.auth-loading {
  visibility: hidden;
}