/**
 * 🏗️ Build Confirmation Modal Styles
 */

/* ========== Modal Overlay ========== */
.build-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.build-confirm-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== Modal Container ========== */
.build-confirm-modal {
  background: #1a1a1a;
  border: 2px solid #FFD700;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

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

/* ========== Modal Header ========== */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
  margin: 0;
  font-family: 'Bebas Neue', Arial, sans-serif;
  letter-spacing: 1px;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s;
  line-height: 1;
  padding: 0;
}

.close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

/* ========== Build Details ========== */
.build-details {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: #999;
  font-size: 14px;
}

.detail-value {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

/* ========== Cost Breakdown ========== */
.cost-breakdown {
  background: rgba(255, 215, 0, 0.08);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.after-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 2px solid rgba(255, 215, 0, 0.3);
  margin-top: 8px;
  font-weight: bold;
  font-size: 18px;
}

.cost-label,
.balance-label,
.after-label {
  color: #ccc;
  font-size: 14px;
}

.cost-value,
.balance-value,
.after-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tire-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.tire-amount {
  color: #FFD700;
  font-weight: bold;
  font-size: 18px;
  font-family: 'Bebas Neue', Arial, sans-serif;
}

.tire-amount.success {
  color: #00ff00;
}

.tire-amount.warning {
  color: #ff6b6b;
}

.usd-amount {
  color: #999;
  font-size: 14px;
}

/* ========== Modal Actions ========== */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-cancel,
.btn-confirm {
  padding: 15px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Bebas Neue', Arial, sans-serif;
  letter-spacing: 1px;
}

.btn-cancel {
  background: transparent;
  border: 2px solid #666;
  color: #999;
}

.btn-cancel:hover {
  border-color: #999;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-confirm {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-confirm:active {
  transform: translateY(0);
}

/* ========== 余额不足状态 ========== */
.insufficient-funds {
  background: rgba(255, 107, 107, 0.1);
  border: 2px solid #ff6b6b;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.insufficient-funds .warning-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.insufficient-funds .warning-title {
  color: #ff6b6b;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.insufficient-funds .warning-message {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 16px;
}

.btn-buy-tires {
  padding: 12px 24px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-buy-tires:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .build-confirm-modal {
    padding: 24px;
    width: 95%;
  }
  
  .modal-header h3 {
    font-size: 20px;
  }
  
  .modal-actions {
    flex-direction: column-reverse;
  }
  
  .btn-cancel,
  .btn-confirm {
    width: 100%;
    padding: 12px;
  }
}
